I've found a great python library implementing Levenshtein functions (distance, ratio, etc.) at http://code.google.com/p/pylevenshtein/ but the project seems inactive and the documentation is nowhere to be found. I was wondering if anyone knows better than me and can point me to the documentation.
Asked
Active
Viewed 2.3k times
24
-
It looks like the author even included a gendoc.sh that would generate documentation.txt from a website for you, but that website is now done. I assume the official documentation no longer exists where the author means it to. – sihrc Aug 08 '13 at 19:31
-
1@sihrc, that URL refers to a *tool* used to generate the documentation. It's not available at that URL anymore but you can [still find it elsewhere](http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/python-levenshtein/files/genextdoc.py?revision=1.1.1.1&content-type=text%2Fplain). – Brian Cain Aug 08 '13 at 19:34
4 Answers
51
Here is an example:
# install with: pip install python-Levenshtein
from Levenshtein import distance
edit_dist = distance("ah", "aho")

Renaud
- 16,073
- 6
- 81
- 79
-
19They should add these 2 lines on their PyPI page, it's worth a thousand words. – Serge Mosin Jun 13 '19 at 07:20
-
1@SergeMosin here we go https://github.com/ztane/python-Levenshtein/pull/39 – Renaud Jun 17 '19 at 12:35
17
You won't have to generate the docs yourself. There's an online copy of the original Python Levenshtein API: http://www.coli.uni-saarland.de/courses/LT1/2011/slides/Python-Levenshtein.html

lecodesportif
- 10,737
- 9
- 38
- 58
-
2The official documentation now links here: https://rawgit.com/ztane/python-Levenshtein/master/docs/Levenshtein.html – Emil Stenström May 03 '17 at 08:41
2
Follow instructions at the updated version: https://github.com/joncasdam/python-Levenshtein
To get a generated documentation. This was updated 3 months back.

sihrc
- 2,728
- 2
- 22
- 43
1
download it from that google repo
extract it
download http://kambing.ui.ac.id/gentoo-portage/dev-python/python-levenshtein/files/genextdoc.py to the same folder where you extracted
double click on gendoc.sh
you should now see a levenstein.html which is the documentation

Joran Beasley
- 110,522
- 12
- 160
- 179