{"id":2613,"library":"nameparser","title":"Nameparser","description":"Nameparser is a simple Python module designed for parsing human names into their distinct components, such as title, first, middle, last, suffix, and nickname. It supports a variety of common name formats for Latin-based languages and is currently at version 1.1.3, receiving updates for bug fixes and feature enhancements.","status":"active","version":"1.1.3","language":"en","source_language":"en","source_url":"https://github.com/derek73/python-nameparser","tags":["name parsing","human names","text processing","natural language processing"],"install":[{"cmd":"pip install nameparser","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"HumanName","correct":"from nameparser import HumanName"}],"quickstart":{"code":"from nameparser import HumanName\n\nname = HumanName(\"Dr. Juan Q. Xavier de la Vega III (Doc Vega)\")\n\nprint(f\"Title: {name.title}\")\nprint(f\"First: {name.first}\")\nprint(f\"Middle: {name.middle}\")\nprint(f\"Last: {name.last}\")\nprint(f\"Suffix: {name.suffix}\")\nprint(f\"Nickname: {name.nickname}\")\nprint(f\"Full Name (formatted): {name}\")","lang":"python","description":"Parses a full name string into a `HumanName` object, allowing access to its individual components as attributes like `title`, `first`, `middle`, `last`, `suffix`, and `nickname`."},"warnings":[{"fix":"If you relied on `full_name` returning the exact original string, store the original string separately or adjust your code to expect the formatted output.","message":"The `full_name` attribute's behavior changed. Before v1.0.4, it returned the original input string. Since v1.0.4, it returns a formatted string output based on the parsed components.","severity":"breaking","affected_versions":">=1.0.4"},{"fix":"Thoroughly test parsing outcomes for a representative set of names if upgrading from pre-1.0.0 versions to ensure consistent results.","message":"Version 1.0.0 introduced significant refactoring of prefix handling and support for prefixes on first names, which may alter parsing results for certain names compared to older versions.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Call `name_instance.parse_full_name()` after modifying constants that affect parsing or ensure constants are configured before instantiation/first parsing.","message":"If you customize the parser's constants (e.g., adding new titles, prefixes, suffixes) after a `HumanName` instance has been created or its `full_name` attribute set, you must explicitly call `name.parse_full_name()` to re-parse the name and apply the new configurations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"To force capitalization of mixed-case names, use `name.capitalize(force=True)` or set `nameparser.config.CONSTANTS.force_mixed_case_capitalization = True` globally.","message":"By default, `HumanName` will not adjust the capitalization of names that are already in mixed case. It primarily corrects all upper or all lower case names.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For non-English names, consider customizing `nameparser.config.Constants` with language-specific titles, prefixes, and suffixes, or evaluate alternative libraries if primary use is non-Latin or non-English.","message":"The library is primarily designed for English names. While it can be useful for other Latin-based languages, it may not perform optimally for languages with significantly different name structures without custom configuration.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}