Browse Source

Updated README

luozhouyang 5 năm trước cách đây
mục cha
commit
932ab5f363
1 tập tin đã thay đổi với 7 bổ sung4 xóa
  1. 7 4
      README.md

+ 7 - 4
README.md

@@ -37,7 +37,7 @@ From pypi:
 
 ```bash
 # pip install strsim # deprecated, do not use this!
-pip install strsimpy
+pip install -U strsimpy
 ```
 
 ## Overview
@@ -245,12 +245,15 @@ In "Length of Maximal Common Subsequences", K.S. Larsen proposed an algorithm th
 
 ```python
 from strsimpy.longest_common_subsequence import LongestCommonSubsequence
-
 lcs = LongestCommonSubsequence()
-# Will produce 4.0
 print(lcs.distance('AGCAT', 'GAC'))
-# Will produce 1.0
+4
+print(lcs.length('AGCAT', 'GAC'))
+2
 print(lcs.distance('AGCAT', 'AGCT'))
+1
+print(lcs.length('AGCAT', 'AGCT'))
+4
 
 ```