Skip to content

v2.7.0

Choose a tag to compare

@derek73 derek73 released this 28 Oct 01:58
· 21 commits to master since this release
0462403

nameparser 2.7 is the first release working towards the new language and vocabulary model described in the vocabulary model RFC. It introduces more nuanced handling of titles and particles, adjusts the default vocabulary to better align with example name corpora, and surfaces alternative name readings in the published API. Highlights:

  • Titles that are also given names read as titles only inside a title phrase. Chief Justice John Roberts gives title Chief Justice, given John, where 2.6 gave title Chief, given Justice; outside a phrase the word is a name, so Justice Smith gives given Justice. (#752, #853)
  • Credentials joined by a hyphen or a slash, or split by a space, read as one credential. John Smith, MD/PhD gives suffix MD/PhD, where 2.6 gave given MD/PhD, family John Smith. (#752, #797)
  • Given names written short read as given names. Chas. Smith and Ma. Cristina Reyes give the given name Chas. and Ma., where 2.6 read both as titles. (#789)
  • An ambiguity report names the reading the parse did not take. Ambiguity.alternative says what the word would have been and why. (#752)

Some default words changed role: King, Prince, Sheikh, Sultan and other titles that are also given names are titles only inside a title phrase (King Curtis gives given King), bon, dí and heer are no longer particles, and herren and heren are no longer titles. Lexicon.default().add(titles={"king"}) makes a word a title everywhere again. (#752, #766)

A Lexicon, Parser or locale pack pickled by an earlier release no longer loads; re-pickle after upgrading. Policy, ParsedName and HumanName pickles still load. (#752)

Full list of changes: https://nameparser.readthedocs.io/en/latest/release_log.html