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.
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