Skip to content

Commit 6eb0b3c

Browse files
author
willzhen
committed
Add readme
1 parent ca79c84 commit 6eb0b3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ text模块提供了一些字符串处理相关的算法能力。
1212
## SliceSame
1313
- SliceSame——判断两个字符串数字是否相同。
1414

15-
example: [TestSliceSmae](https://github.com/memory-overflow/go-common-library/blob/main/text/text_test.go#L29)
15+
example: [TestSliceSmae](https://github.com/memory-overflow/go-text-algorithm/blob/main/text_test.go#L29)
1616
```go
1717
import (
1818
"testing"
@@ -36,7 +36,7 @@ ac 自动机是一种多模式串的匹配算法。
3636

3737
比较容易想到的做法是,调用 n 次 `strings.Contains(s, xxx)`。假设 n 个单词平局长度为 k, 这样处理的算法时间复杂度为 O(n * k * m)。而使用 ac 自动机可以加速上述过程,整体算法时间复杂度只需要 O(n*k + m)。
3838

39-
example: [TestActrie](https://github.com/memory-overflow/go-common-library/blob/main/text/text_test.go#L9)
39+
example: [TestActrie](https://github.com/memory-overflow/go-text-algorithm/blob/main/text_test.go#L9)
4040
```go
4141
import (
4242
"testing"
@@ -59,7 +59,7 @@ func TestActrie(t *testing.T) {
5959
## 计算文本编辑距离
6060
编辑距离(Edit Distance):是一个度量两个字符序列之间差异的字符串度量标准,两个单词之间的编辑距离是将一个单词转换为另一个单词所需的单字符编辑(插入、删除或替换)的最小数量。一般来说,编辑距离越小,两个串的相似度越大。
6161

62-
example: [TestLevenshtein](https://github.com/memory-overflow/go-common-library/blob/main/text/text_test.go#L24)
62+
example: [TestLevenshtein](https://github.com/memory-overflow/go-text-algorithm/blob/main/text_test.go#L24)
6363
```go
6464
import (
6565
"testing"
@@ -76,7 +76,7 @@ func TestLevenshtein(t *testing.T) {
7676
## 计算文本相似度
7777
通过编辑距离,计算两个文本的相似度。
7878

79-
example: [TestTextSim](https://github.com/memory-overflow/go-common-library/blob/main/text/text_test.go#L17)
79+
example: [TestTextSim](https://github.com/memory-overflow/go-text-algorithm/blob/main/text_test.go#L17)
8080
```go
8181
import (
8282
"testing"

0 commit comments

Comments
 (0)