Explorar o código

Updated README

luozhouyang %!s(int64=5) %!d(string=hai) anos
pai
achega
932ab5f363
Modificáronse 1 ficheiros con 7 adicións e 4 borrados
  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
 
 ```