https://github.com/bionomia/dwc_agent

Ruby gem to cleanse Darwin Core terms containing people names prior to passing to its dependent parser. Comes with a command-line utility.

https://github.com/bionomia/dwc_agent

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Ruby gem to cleanse Darwin Core terms containing people names prior to passing to its dependent parser. Comes with a command-line utility.

Basic Info
  • Host: GitHub
  • Owner: bionomia
  • License: mit
  • Language: Ruby
  • Default Branch: master
  • Homepage:
  • Size: 257 KB
Statistics
  • Stars: 5
  • Watchers: 3
  • Forks: 1
  • Open Issues: 6
  • Releases: 0
Created almost 8 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

DwC Agent

Ruby 3.0 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

ruby require "dwc_agent" names = DwcAgent.parse '13267 (male) W.J. Cody; 13268 (female) W.E. Kemp' => [#<struct Namae::Name family="Cody", given="W.J.", suffix=nil, particle=nil, dropping_particle=nil, nick=nil, appellation=nil, title=nil>, #<struct Namae::Name family="Kemp", given="W.E.", suffix=nil, particle=nil, dropping_particle=nil, nick=nil, appellation=nil, title=nil>]

Parsing is occasionally messy & so it is advisable to make use of the additional clean method for each parsed name.

ruby require "dwc_agent" names = DwcAgent.parse 'Chaboo, Bennett, Shin' => [#<struct Namae::Name family=nil, given="Chaboo", suffix=nil, particle=nil, dropping_particle=nil, nick=nil, appellation=nil, title=nil>, #<struct Namae::Name family=nil, given="Bennett", suffix=nil, particle=nil, dropping_particle=nil, nick=nil, appellation=nil, title=nil>, #<struct Namae::Name family=nil, given="Shin", suffix=nil, particle=nil, dropping_particle=nil, nick=nil, appellation=nil, title=nil>] DwcAgent.clean names[0] => #<struct Namae::Name family="Chaboo", given=nil, suffix=nil, particle=nil, dropping_particle=nil, nick=nil, appellation=nil, title=nil>

A cleaned name might produce all nil attributes if it does not pass logic checks. You can use a utility method to see if this is the case:

ruby if cleaned_name != DwcAgent.default # Do something with the Namae::Name attributes else # Perhaps use your unparsed input some other way end

There's also a similarity score to compare the structure of two given names. The greater the score, the more likely aliases refer to the "same" name. For instance, "John C." scores a 2 when compared to "John Charles", a 1.1 when compared to "John" alone whereas it scores a 0 when compared to "Joshua" or "John R.". If two names share the same family name, this utility method could be used to down-weight search results if the given name portions of the names are unlikely matches.

ruby require "dwc_agent" score = DwcAgent.similarity_score('John C.', 'John') => 1.1

Or, from the command-line:

bash gem install dwc_agent dwcagent "13267 (male) W.J. Cody; 13268 (female) W.E. Kemp" => [{"title":null,"appellation":null,"given":"W.J.","particle":null,"family":"Cody","suffix":null,"dropping_particle":null,"nick":null},{"title":null,"appellation":null,"given":"W.E.","particle":null,"family":"Kemp","suffix":null,"dropping_particle":null,"nick":null}]

bash 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/bionomia/dwc_agent/issues.

Copyright

Authors: David P. Shorthouse

Copyright (c) 2024

Owner

  • Name: Bionomia
  • Login: bionomia
  • Kind: organization

Linking natural history specimens to the world's collectors

GitHub Events

Total
  • Push event: 5
  • Commit comment event: 2
Last Year
  • Push event: 5
  • Commit comment event: 2

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 175
  • Total Committers: 1
  • Avg Commits per committer: 175.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
David Shorthouse d****e@g****m 175

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 19
  • Total pull requests: 0
  • Average time to close issues: 3 months
  • Average time to close pull requests: N/A
  • Total issue authors: 7
  • Total pull request authors: 0
  • Average comments per issue: 2.58
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dshorthouse (9)
  • nickynicolson (2)
  • mjy (2)
  • infinite-dao (2)
  • LocoDelAssembly (1)
  • matdillen (1)
  • nielsraes (1)
Pull Request Authors
Top Labels
Issue Labels
enhancement (3) bug (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • rubygems 204,903 total
  • Total dependent packages: 0
  • Total dependent repositories: 5
  • Total versions: 134
  • Total maintainers: 1
rubygems.org: dwc_agent

Parses the typically messy content in Darwin Core terms that contain people names

  • Versions: 134
  • Dependent Packages: 0
  • Dependent Repositories: 5
  • Downloads: 204,903 Total
Rankings
Downloads: 6.2%
Dependent repos count: 9.9%
Average: 15.0%
Dependent packages count: 15.8%
Stargazers count: 21.1%
Forks count: 22.1%
Maintainers (1)
Last synced: 11 months ago

Dependencies

dwc_agent.gemspec rubygems
  • bundler ~> 2 development
  • rake ~> 12 development
  • rspec ~> 3.4 development
  • namae ~> 1
  • namecase ~> 2
.github/workflows/ruby.yml actions
  • actions/checkout v2 composite
  • ruby/setup-ruby 473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e composite
Gemfile rubygems