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

index out of range #13

Open
jyhnnhyj opened this issue Mar 15, 2019 · 1 comment
Open

index out of range #13

jyhnnhyj opened this issue Mar 15, 2019 · 1 comment

Comments

@jyhnnhyj
Copy link

I'm using version 1.0.2 - fails when I use the single word "hallo" - here is a quick repro:

$ python
Python 3.7.1 (default, Dec 14 2018, 19:28:38)
>>> from whatlang import WhatLang
>>> wl = WhatLang()
>>> wl.predict_lang("hallo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "........../site-packages/whatlang/predict_lang.py", line 32, in predict_lang
    if len(pred[0]) == 0:
IndexError: list index out of range
@whiletruelearn
Copy link
Contributor

@jyhnnhyj Not sure where you have downloaded the library from . But the import statement looks wrong. It should have been from whatthelang import WhatTheLang

For this particular input, the result i see is CANT_PREDICT which makes sense as this is not an english word.

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