Skip to content

Commit 932ab5f

Browse files
committed
Updated README
1 parent 6437aa4 commit 932ab5f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ From pypi:
3737

3838
```bash
3939
# pip install strsim # deprecated, do not use this!
40-
pip install strsimpy
40+
pip install -U strsimpy
4141
```
4242

4343
## Overview
@@ -245,12 +245,15 @@ In "Length of Maximal Common Subsequences", K.S. Larsen proposed an algorithm th
245245

246246
```python
247247
from strsimpy.longest_common_subsequence import LongestCommonSubsequence
248-
249248
lcs = LongestCommonSubsequence()
250-
# Will produce 4.0
251249
print(lcs.distance('AGCAT', 'GAC'))
252-
# Will produce 1.0
250+
4
251+
print(lcs.length('AGCAT', 'GAC'))
252+
2
253253
print(lcs.distance('AGCAT', 'AGCT'))
254+
1
255+
print(lcs.length('AGCAT', 'AGCT'))
256+
4
254257

255258
```
256259

0 commit comments

Comments
 (0)