louismullie / treat

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

When bundling treat in a rails app, no rake tasks for installing language packs appear. #88

Closed EverybodyKurts closed 9 years ago

EverybodyKurts commented 10 years ago

According to this link, https://github.com/louismullie/treat/wiki/Manual#getting-language-packages, there should be this rake task: rake treat:install[english].

Unfortunately, running rake -T shows that there are no Treat rake tasks present.

Can anybody help out? Thanks!

louismullie commented 9 years ago

The rake task provided is for development purposes only.

However, it should be extremely easy to create your own rake task:

  # Installs a language pack (default to english).
  # A language pack is a set of gems, binaries and
  # model files that support the various workers 
  # that are available for that particular language.
  # Syntax: rake treat:install (installs english)
  # - OR -  rake treast:install[some_language]
  task :install, [:language] do |t, args|
    language = args.language || 'english'
    Treat::Core::Installer.install(language)
  end