Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With Korean dictionary, I got random results #28

Open
hyunwoongko opened this issue Apr 13, 2024 · 1 comment
Open

With Korean dictionary, I got random results #28

hyunwoongko opened this issue Apr 13, 2024 · 1 comment

Comments

@hyunwoongko
Copy link

hyunwoongko commented Apr 13, 2024

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
Copy link
Owner

zverok commented Apr 19, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants