Skip to content

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

@pamin2222

Description

@pamin2222

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.

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