louismullie / treat

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

TF_IDF issue with gem version, but Collection issue with master branch #32

Closed geomic closed 12 years ago

geomic commented 12 years ago

I'm trying to work TF_IDF out. If I use the gem install version, I cannot run c.words[0].tf_idf as per another ticket.

If I use your master branch, I cannot initialize a Collection. In rails console I do (which used to work in the gem install version):

include Treat include Treat::Entities

c = Collection('data') # which fails...

louismullie commented 12 years ago

Use the master branch with:

require 'treat'
include Treat::Core::DSL
c = collection('data')

(as per the error message you should be getting when trying to use the old DSL).

geomic commented 12 years ago

Ah, many thanks!

Works like a charm now, after also doing gem install srx-english

louismullie commented 12 years ago

I added a wiki page detailing the new DSL, and made it clearer in the main wiki that the master branch now uses this.

geomic commented 12 years ago

Thanks Louis. Your "The value of an entity is available.." section also helps immensely.