Repository navigation
v2.7.0
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 Robertsgives titleChief Justice, givenJohn, where 2.6 gave titleChief, givenJustice; outside a phrase the word is a name, soJustice Smithgives givenJustice. (#752, #853) - Credentials joined by a hyphen or a slash, or split by a space, read as one credential.
John Smith, MD/PhDgives suffixMD/PhD, where 2.6 gave givenMD/PhD, familyJohn Smith. (#752, #797) - Given names written short read as given names.
Chas. SmithandMa. Cristina Reyesgive the given nameChas.andMa., where 2.6 read both as titles. (#789) - An ambiguity report names the reading the parse did not take.
Ambiguity.alternativesays 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