Skip to content

[Word2Word][EN-TH] Some words are missing from x2ys dict #12

New issue

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

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

Already on GitHub? # to your account

Open
pamin2222 opened this issue Apr 12, 2019 · 0 comments
Open

[Word2Word][EN-TH] Some words are missing from x2ys dict #12

pamin2222 opened this issue Apr 12, 2019 · 0 comments

Comments

@pamin2222
Copy link

w2w_th_en_err

<ipython-input-108-242465236c9f> in <module>
      1 en_word = "unicorn"
      2 print(en_word)
----> 3 en2th(en_word)

/usr/local/lib/python3.6/site-packages/word2word/word2word.py in __call__(self, query, n_best)
     10             print("Sorry. There's no such word in the dictionary.")
     11         x = self.word2x[query]
---> 12         ys = self.x2ys[x]
     13         words = [self.y2word[y] for y in ys]
     14         return words[:n_best]

KeyError: 10130```


The word 'unicorn' exists in "word2x" dict but not in "x2ys" dict.
@pamin2222 pamin2222 changed the title [EN-TH] Some words are missing from x2ys dict [Word2Word][EN-TH] Some words are missing from x2ys dict Apr 12, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant