Project

mitier

0.0
No commit activity in last 3 years
No release in over 3 years
MITIE library wrapped in Ruby with FFI. See https://github.com/mit-nlp/MITIE
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 2.1.1
~> 0.10.3
~> 10.0
~> 3.0
~> 0.39.0

Runtime

~> 1.9.10
 Project Readme

Mitier

Simple FFI wrapper for MIT's MITIE library. Currently only wraps named entity extraction part.

For details on what MITIE is and does visit it's GitHub page.

Installation

Add this line to your application's Gemfile:

gem 'mitier'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mitier

Usage

To use the gem make sure you have MITIE compiled and libmitie shared library placed where it can be found by the system. Also, you are going to need trained models. Download links can be found on MITIE GitHub page

To run named entity recognition:

extractor = Mitier::Extractor.new(TRAINED_MODEL_PATH).load
extractor.process_ner SOME_TEXT

If you only want to run text tokenizer:

tokenizer = Mitier::Tokenizer.new SOME_TEXT
tokenizer.process

Development

To run the specs environment variable TEST_MODEL_PATH needs to be set and then run bundle exec rspec. Environment variables are loaded with Dotvim so you need to have .env file with that variable present. There is .env.example in the repo.

You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/satek/mitier.

License

The gem is available as open source under the terms of the MIT License.