我想检查两个字符串是否相似。。。。 例如:
string1 = "Select a valid choice. **aaaa** is not one of the available choices."
string2 = "Select a valid choice. **bbbb** is not one of the available choices."
或者
string3 = "Ensure this value has at most 30 characters (it has 40 chars)."
string4 = "Ensure this value has at most 60 characters (it has 110 chars)."
如果我比较string1和string2,它应该返回True
;如果我比较string1和string3,它应该返回False
。你知道吗
你可以使用Levenshtein distance
从here复制的代码
相关问题 更多 >
编程相关推荐