Closed yudhiesh closed 3 years ago
I think you can use term
, distance
and count
to access the data https://symspellpy.readthedocs.io/en/latest/api/symspellpy.html#data-classes
I think you can use
term
,distance
andcount
to access the data https://symspellpy.readthedocs.io/en/latest/api/symspellpy.html#data-classes
Do I unpack these from the returned SuggestItem
?
Yea, so something like
for suggestion in suggestions:
print(suggestion.term, suggestion.distance, suggestion.count)
should work
Thanks that worked just needed to alter it as each suggestion is a list in itself
for suggestion in suggestions:
for sug in suggestion:
print(sug.term, sug.distance, sug.count)
I am looping over a list of words to make corrections on their spelling but I am facing this issue where all the outputs are in the form of
<symspellpy.symspellpy.SuggestItem object at 0x7f4857ac8080>
.I am using version
6.7.0
.Sample list of words:
Code:
Output: