String similarity searching using the FastSS algorithm.
Project description
- FastSS is a string similarity searching algorithm. For each query, which
consists of query string s and distance d, it retrieves all the words in a dictionary whose edit distance from s is equal or smaller than d. FastSS is an offline searching algorithm, as it needs to create an index of its dictionary before it can search. For more information on FastSS you can visit the website of its inventors at <http://fastss.csg.uzh.ch/>.
Here are some of the characteristics of this implementation, to help you decide whether it fits your purposes:
Very fast searching at the cost of a rather large index size.
Indices are plain sqlite databases so they carry ACID guarantees.
Only unicode strings are supported.
Example of usage:
>>> import fastss >>> manager = fastss.FastSSManager('idx') >>> manager.create_index(False) # Insert lemmas in the index, using 20% of their length as the depth: >>> manager.update_index([u'Mike', u'Johnny', u'johnny'], lambda s: int(len(s)*.2)) # Search: >>> for match in manager.search('Mike', 2): print match (u'Mike', 0) >>> for match in manager.search('johnny', 1): print match (u'johnny', 0) (u'Johnny', 1) >>> for match in manager.search('johnny', 1, nocase=True): print match (u'Johnny', 0) (u'johnny', 0) >>> for match in manager.search('johny', 2, nocase=True): print match (u'johnny', 1) (u'Johnny', 1)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file fastss-0.095.zip
.
File metadata
- Download URL: fastss-0.095.zip
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3b3f2dee38e488c0761cee44e4a9278d5aa2a683b838fc01e90c41df40c908a |
|
MD5 | 4ea8ddb5aecd8d886ea1b112e3faf917 |
|
BLAKE2b-256 | 09d365f4bedbfffa423b9d36c69b8dde34006b08364df6ae3372faf974513c25 |
File details
Details for the file fastss-0.095.tar.gz
.
File metadata
- Download URL: fastss-0.095.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a26aae1b0c789bbfa62e20fd8d4a1ed38b95f2b0b165645800f486ec48cfc99 |
|
MD5 | 2f1213a62ea8f70106ee237543e0dee8 |
|
BLAKE2b-256 | 20b9a0602254d885d3debd1931a91139ecfa013c87deb802340237d4b7c54575 |
File details
Details for the file fastss-0.095.win32.exe
.
File metadata
- Download URL: fastss-0.095.win32.exe
- Upload date:
- Size: 203.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 738531763e5e3c29aa6eadaea417daf905a581c4b743af0847ea3a71ff3cc51a |
|
MD5 | 54d80afe8a7e1b5b770724874390f0e7 |
|
BLAKE2b-256 | aaa829d7621d5388442e826cd2b5c31c7edc443302e943511b17a2d9b12ea7ca |