### Install probablepeople Source: https://probablepeople.readthedocs.io/en/latest/index.html Use pip to install the probablepeople library. This is the first step before using the library. ```bash pip install probablepeople ``` -------------------------------- ### Tag name string with labels and type Source: https://probablepeople.readthedocs.io/en/latest/index.html The `tag` method returns an OrderedDict of labeled components and the string type (Person, Household, or Corporation). Use this when you need structured data with distinct labels. ```python >>> import probablepeople >>> probablepeople.tag('Mr George "Gob" Bluth II') (OrderedDict([ ('PrefixMarital', 'Mr'), ('GivenName', 'George'), ('Nickname', '"Gob"'), ('Surname', 'Bluth'), ('SuffixGenerational', 'II')]), 'Person') ``` ```python >>> probablepeople.tag('Lucille & George Bluth') (OrderedDict([ ('GivenName', 'Lucille'), ('And', '&'), ('SecondGivenName', 'George'), ('Surname', 'Bluth')]), 'Household') ``` ```python >>> probablepeople.tag('Sitwell Housing Inc') (OrderedDict([ ('CorporationName', 'Sitwell Housing'), ('CorporationLegalType', 'Inc')]), 'Corporation') ``` -------------------------------- ### Parse name string into components Source: https://probablepeople.readthedocs.io/en/latest/index.html The `parse` method splits a string into labeled components. It's useful for breaking down names or company strings into their constituent parts. ```python >>> import probablepeople >>> probablepeople.parse('Mr George "Gob" Bluth II') [('Mr', 'PrefixMarital'), ('George', 'GivenName'), ('"Gob"', 'Nickname'), ('Bluth', 'Surname'), ('II', 'SuffixGenerational')] ``` ```python >>> probablepeople.parse('Lucille & George Bluth') [('Lucille', 'GivenName'), ('&', 'And'), ('George', 'GivenName'), ('Bluth', 'Surname')] ``` ```python >>> probablepeople.parse('Sitwell Housing Inc') [('Sitwell', 'CorporationName'), ('Housing', 'CorporationName'), ('Inc', 'CorporationLegalType')] ``` -------------------------------- ### Handle RepeatedLabelError in probablepeople Source: https://probablepeople.readthedocs.io/en/latest/index.html Custom exception handling for `RepeatedLabelError` when the `tag` method encounters issues with duplicate labels. This allows for custom error processing using the original and parsed strings. ```python try: tagged_name, name_type = probablepeople.tag(string) except probablepeople.RepeatedLabelError as e : some_special_instructions(e.parsed_string, e.original_string) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.