Ruby gem to cleanse Darwin Core terms containing people names prior to passing to its dependent parser.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
spec
.gitignore
.rspec
.ruby-version
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
dwc_agent.gemspec

README.md

DwC Agent

Ruby 2.4 gem that cleanses messy Darwin Core terms like recordedBy or identifiedBy prior to passing to its dependent Namae gem, which executes the parsing. It also produces similarity scores between two given names.

Gem Version Gem Downloads Continuous Integration Status

Usage

require "dwc_agent"
names = DwcAgent.parse '13267 (male) W.J. Cody; 13268 (female) W.E. Kemp'
=> [#<Name family="Cody" given="W.J.">, #<Name family="Kemp" given="W.E.">]
require "dwc_agent"
score = DwCAgent.similarity_score('John C.', 'John')
=> 1.1

Or, from the command-line:

gem install dwc_agent
dwcagent "13267 (male) W.J. Cody; 13268 (female) W.E. Kemp"
=> [{"given":"W.J.","family":"Cody"},{"given":"W.E.","family":"Kemp"}]
gem install dwc_agent
dwcagent-similarity "John C." "John"
=> 1.1

License

dwc_agent is released under the MIT license.

Support

Bug reports can be filed at https://github.com/dshorthouse/dwc_agent/issues.

Copyright

Authors: David P. Shorthouse

Copyright (c) 2018 Canadian Museum of Nature