Open aliw77 opened 10 years ago
This seems like it's the language detection feature causing the bug. Does the bug disappear if you remove Treat.core.language.detect = true
?
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.
2.0.0p195 :009 > puts "El mundo de hoy no tiene sentido".language
english
=> nil
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: