wolfgarbe / SymSpell

SymSpell: 1 million times faster spelling correction & fuzzy search through Symmetric Delete spelling correction algorithm
https://seekstorm.com/blog/1000x-spelling-correction/
MIT License
3.12k stars 284 forks source link

support for trigram dictionaries #135

Open deshruch opened 1 year ago

deshruch commented 1 year ago

Does symspell have support for trigram or n-gram dictionaries? I see only 2 methods: load_dictionary load_bigram_dictionary

deshruch commented 1 year ago

I was trying to get suggestions for "Disco Dance Party"

I have added Disco Dance and Dance Party to my bigram dictionary. The suggester still suggests: suggestions = sym_spell.lookup_compound("disco danc party",max_edit_distance=3) for suggestion in suggestions: print(suggestion)

disco danc party, 0, 0