name-spotter

Gem Version Continuous Integration Status Dependency Status

Finds biodiversity scientific names in texts using TaxonFinder (by Patrick Leary) or NetiNeti (by Lakshmi Manohar Akella) libraries. This gem works with Ruby >= 2.0

Requirements

  • Docker

Installation

Install the gem

gem install name-spotter

Install and run TaxonFinder and NetiNeti docker containers

docker pull gnames/netineti
docker pull gnames/taxonfinder
docker run -d -p 0.0.0.0:1234:1234 --name tf gnames/taxonfinder
docker run -d -p 0.0.0.0:6384:6384 --name nn gnames/netineti

Usage

If you are using localhost and default ports for NetiNeti and TaxonFinder:

require "name-spotter"

neti_client       = NameSpotter::NetiNetiClient.new()
tf_client         = NameSpotter::TaxonFinderClient.new()
neti_name_spotter = NameSpotter.new(neti_client)
tf_name_spotter   = NameSpotter.new(tf_client)

neti_name_spotter.find(your_text)
tf_name_spotter.find(your_text)

If you have installed NetiNeti and TaxonFinder on a machine with non-default port:

neti_client = NameSpotter::NetiNetiClient.new(host: "example.com",
                                              port: 5555)
#or
neti_client = NameSpotter::NetiNetiClient.new(host: "123.123.123.111",
                                              port: 5555)

If you want to get results in JSON or XML formats

neti_name_spotter.find(your_text, "json")
neti_name_spotter.find(your_text, "xml")

Development

To run tests start TaxonFinder and NetiNeti on your local machine with default configurations and run

bundle exec rake

Contributing to name-spotter

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Authors: Chuck Ha, Anthony Goddard, Dmitry Mozzherin, David Shorthouse

Copyright (c) 2012-2016 Marine Biological Laboratory. See LICENSE.txt for further details.