Skip to content

With Korean dictionary, I got random results #28

Open
@hyunwoongko

Description

@hyunwoongko

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.

Activity

zverok

zverok commented on Apr 19, 2024

@zverok
Owner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      With Korean dictionary, I got random results · Issue #28 · zverok/spylls