Fast and Accurate SpellChecker
Project description
symspell_rust
Rust python bindings for symspell
Quick examples using Python:
>>> from symspell_rust import SymspellPy
>>> sym_spell = SymspellPy(max_distance=2, prefix_length=7, count_threshold=1)
>>> if not sym_spell.load_dictionary("./data/frequency_dictionary_en_82_765.txt",0,1," "):
print("File Not Found")
>>> suggestions = sym_spell.lookup_compound("whereis th elove hehad dated forImuch of thepast who couqdn'tread in sixtgrade and ins pired him",2)
>>> for cand in suggestions:
print(f"Term->{cand.term} \n Distance->{cand.distance} \n Count->{cand.count}")
>>> segment_obj = sym_spell.word_segmentation("whereisthelove",2)
>>> print(f"String->{segment_obj.segmented_string} \n Distance->{segment_obj.distance_sum} \n Prob_Log_Sum->{segment_obj.prob_log_sum}")
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 Distribution
symspell_rust-0.1.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for symspell_rust-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9f41a69bbefe3de11f931d57a252400383abc90729742d978c98e1cb9241d0c |
|
MD5 | 05b80dc974a46613afa1058fede9f16c |
|
BLAKE2b-256 | 0508e3a61e37870a277f3ad132381251e4b1c695bf5bf16ee5f53d43c1443b05 |