Closed tytosecode closed 1 year ago
Taken from this stackoverflow answer:
Seems that the alphabet is staticly determined in this line.
Below that line there's a commented out section of code that takes the alphabet from the dictionary, why was it commented out and can this be corrected? Alternatively can more symbols be added to the alphabet such as hyphen?
I believe that section was commented out because it turned out that it took a very very long time to run for certain languages. Looking at it now, it's a pretty naive solution, so I'm sure there is a better way to do what I was trying to accomplish (get a list of the unique letters in a file), but the quick solution would be to just add a hyphen to the alphabet string.
Additionally, it doesn't look like the English dictionary file included with Typo even has any words that include hyphens, so even if the old method of constructing the alphabet was used, it wouldn't solve this problem.
E.g:
.dic
file contains:wi-fi
spell-check
line-break
.aff
file is empty.Expected behaviour:
wifi
-> Suggest[wi-fi]
spellcheck
-> Suggest[spell-check]
linebreak
-> Suggest[line-break]
Actual behaviour:
wifi
-> Suggest[]
spellcheck
-> Suggest[]
linebreak
-> Suggest[]
The suggestions work as intended when using the
hunspell 1.7.0
cmd with the same.dic
and.aff
setup. Am I missing anything?