-
Notifications
You must be signed in to change notification settings - Fork 128
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
TypeError: no implicit conversion from nil to integer when tokenizing #66
Comments
This seems like it's the language detection feature causing the bug. Does the bug disappear if you remove |
I actually wanted to use the treat gem for language detection of user text input. Without language detection i get "english" for all sentences. e.g.
|
Has anyone found a solution to this? On my Mac language recognition doesn't seem to work: Treat.core.language.detect = true
a = "I want to know God's thoughts; the rest are details. - Albert Einstein"
b = "El mundo de hoy no tiene sentido, así que ¿por qué debería pintar cuadros que lo tuvieran? - Pablo Picasso"
c = "Un bon Allemand ne peut souffrir les Français, mais il boit volontiers les vins de France. - Goethe"
d = "Wir haben die Kunst, damit wir nicht an der Wahrheit zugrunde gehen. - Friedrich Nietzsche"
puts a.language # => nil
puts b.language # => nil
puts c.language # => nil
puts d.language # => nil Before that I did a require 'treat'
Treat::Core::Installer.install
Treat::Core::Installer.install 'german' Is there something else required for language recognition to work? |
Running through a few examples from the manual, cannot get tokenize to work. Here is a paste from irb:
The text was updated successfully, but these errors were encountered: