similar:用 Python 编写的类似文本查找器

时间:2021-06-02 12:15:18
【文件属性】:
文件名称:similar:用 Python 编写的类似文本查找器
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-02 12:15:18
Python 类似 - 用 Python 编写的类似文本查找器 similar是一个 Python 库,用于从拼写错误的文本中找到正确的拼写。 用法 >> > from similar import best_match >> > best_match ( 'rasbery' , [ 'apple' , 'raspberry' , 'pear' ]) raspberry 安装 该工具适用于 Python 2 和 Python 3。它可以与 Pip 一起安装: pip install similar 笔记 您还可以为 wordlist 使用文件对象: from similar import Similar s = Similar ( 'rasbery' , open ( 'wordlist.txt' )) print ( s . best ()) 或发电机: from similar im
【文件预览】:
similar-master
----setup.py(1KB)
----.gitignore(39B)
----requirements.txt(27B)
----.travis.yml(131B)
----MANIFEST.in(13B)
----similar()
--------similar.py(1KB)
--------__init__.py(104B)
--------exceptions.py(158B)
----LICENSE.txt(1KB)
----README.rst(1KB)
----test_similar.py(1KB)
----test_wordlist.txt(54B)
----tox.ini(114B)

网友评论