NameParser 0.1.0

A library for parsing person names into their individual components.
Documentation
  • Coverage
  • 20%
    2 out of 10 items documented0 out of 3 items with examples
  • Size
  • Source code size: 111.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.53 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • aeshirey/NameParser
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • aeshirey

NameParser for Rust

This library is an approximation of my NameParserSharp C# library used to parse peoples' names into constituent parts. For example:

let p = PersonName::parse("Johannes Diderik van der Waals").unwrap();
assert_eq!(p.first, "Johannes");
assert_eq!(p.middle, "Diderik");
assert_eq!(p.last, "van der Waals");
assert_eq!(p.suffix, "");

The original project and therefore my direct C# port are LGPL-encumbered. This implementation is inspired by but not a port of the C#; therefore, I believe it is not LGPL-encumbered. As such, I am releasing this under the MIT license.

This version does not have all the functionality of the other libraries. Notably:

  • It only handles parenthetical nicknames such as James (Jimmy) Carter
  • The set of prefixes, suffixes, conjunctions, etc., is more limited.
  • It doesn't handle parsing out multiple persons from a single input. For example, John D. and Katherine T. MacArthur doesn't parse out to become two individuals.