With Korean dictionary, I got random results
hyunwoongko opened this issue · 1 comments
hyunwoongko commented
you can get dictionary here.
https://github.com/spellcheck-ko/hunspell-dict-ko/releases/download/0.7.94/ko-aff-dic-0.7.94.zip
I changed name of dictionary to 'ko_KR' from 'ko'.
from spylls.hunspell import Dictionary
dic = Dictionary.from_files('ko_KR')
word = "가방"
print(dic.lookup(word))
This code returns True sometimes, and it also returns False sometimes.
Please run this code 20 times, then you can see same results with me.
I don't understand why this happens. Thanks.
zverok commented
That’s interesting. For now, I have no consistent theory why it could be stochastic, there are very few possibilities of randomness inside the code 🤔
But as I know very little about the Korean writing systems/encoding, might be related to it somehow.
A couple of questions to try to understand that:
- is this word actually correct or not?..
- if you’ll try to
print([*dic.lookuper.good_forms(word)])
, what it returns? Is it stable?