louismullie / treat

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

NoMethodError for the segment method #59

Closed mooreryan closed 11 years ago

mooreryan commented 11 years ago

When I try and call segment on a paragraph, I get this error:

NoMethodError: undefined method `segment' for Treat::Workers::Processors::Segmenters::Scalpel:Class

Here is the call that gives the error (this is right from the documentation btw): p = paragraph('A walk in the park. A trip on a boat.').segment

Checked the issues and didn't see anything like this...hopefully it hasn't been asked before.

Thanks

louismullie commented 11 years ago

Hey @mooreryan, have you run the Treat installer? This error is probably due to the fact that Scalpel is not installed. Let me know if gem install scalpel fixes it.

mooreryan commented 11 years ago

Yes, thank you. That did fix it. I only had treat in my Rails Gemfile.

I couldn't find anything about installing scalpel in the doc page...Am I just missing it? Also, I'm wondering if there are any other dependencies not specifically listed in the manual as there are a couple of other things in the manual that aren't working with just the treat and scalpel gems.

louismullie commented 11 years ago

You have to manually add every gem you plan on using to your Gemfile (this is to prevent cluttering with 60+ gems).

mooreryan commented 11 years ago

Ah, so if I include the commented out part of your Gemfile in mine, then I will have access to all functionality mentioned in the docs, correct?

louismullie commented 11 years ago

Yes, correct! Closing this unless you have further issues