Sha256: 383df7048b3bc79c138494498a97e244cd141317733dfd447a8e5435cdcc18e7

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

= Biodiversity

Parses taxonomic scientific name and breaks it into semantic elements.

== Installation

To install gem you need RubyGems >= 1.3.6

  $ sudo gem install biodiversity #for ruby 1.8.x
  $ sudo gem install biodiversity19 #for ruby 1.9.x

== Example usage

You can parse file with taxonomic names from command line. File should contain one scientific name per line

  nnparser file_with_names
  
You can use it as a library

  require 'biodiversity'
  
  parser = ScientificNameParser.new
  
  # to parse a scientific name into a ruby hash
  parser.parse("Plantago major")
  
  #to get json representation
  parser.parse("Plantago").to_json
  #or
  parser.parse("Plantago")
  parser.all_json
  
  # to clean name up
  parser.parse("             Plantago       major    ")[:scientificName][:normalized] 
  
  # to get only cleaned up latin part of the name
  parser.parse("Pseudocercospora dendrobii (H.C. Burnett) U. Braun & Crous 2003")[:scientificName][:canonical]
  
  # to get detailed information about elements of the name
  parser.parse("Pseudocercospora dendrobii (H.C. Burnett 1883) U. Braun & Crous 2003")[:scientificName][:details]
  
  # to resolve lsid and get back RDF file
  LsidResolver.resolve("urn:lsid:ubio.org:classificationbank:2232671")

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
biodiversity19-0.6.3 README.rdoc
biodiversity-0.6.3 README.rdoc
biodiversity19-0.6.2 README.rdoc
biodiversity19-0.6.1 README.rdoc
biodiversity-0.6.1 README.rdoc
biodiversity-0.6.0 README.rdoc
biodiversity19-0.6.0 README.rdoc