louismullie / treat

Natural language processing framework for Ruby.
Other
1.37k stars 128 forks source link

Error when calling apply(:topics) #86

Closed felipeclopes closed 10 years ago

felipeclopes commented 10 years ago

I added the Treat gem into a Rails 4 application and when I try to extract entities from a text I get the following exception:

Errno::ENOENT: No such file or directory @ rb_sysopen - /user/.rvm/gems/ruby-2.1.2@project/gems/treat-2.1.0/models/reuters/industry.xml
from /user/.rvm/gems/ruby-2.1.2@project/gems/treat-2.1.0/lib/treat/workers/extractors/topics/reuters.rb:57:in `read'

So I know I can download these files from http://louismullie.com/treat/reuters/, is there any way that his could be done in the installation of the gem?

louismullie commented 10 years ago

Hi @felipeclopes,

You can install these as part of the english language package:

require 'treat'
Treat::Core::Installer.install 'english'

Let me know if that does not address your question.

ghost commented 9 years ago

I tried this steps. @louismullie but still this doesn't resolved my problem. No such file or directory @ rb_sysopen - /home/hari/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/treat-2.1.0/models/reuters/industry.xml