Human Names API
This contains utilities, blockers, and comparers relevant to human names
normalize_name(name: StructValue) -> StructValue
Convert to uppercase, normalize whitespace, and remove non-alphanumeric.
| PARAMETER | DESCRIPTION | 
|---|---|
| name | The name to normalize. 
                  
                    TYPE:
                       | 
| RETURNS | DESCRIPTION | 
|---|---|
| name_normed | The normalized name. 
                  
                    TYPE:
                       | 
          are_aliases(
    name1: StringValue, name2: StringValue
) -> BooleanValue
are_aliases(name1, name2)
Determine if two names are nickname interchangeable.
This is case-insensitive, and whitespace is stripped from both ends. The same name returns True.
          is_nickname_for(
    nickname: StringValue, canonical: StringValue
) -> BooleanValue
is_nickname_for(nickname, canonical)
Determine if a name is a nickname for another name.
This is case-insensitive, and whitespace is stripped from both ends. The same name returns True.
    
              Bases: MatchLevel
How closely two names match.
class-attribute
      instance-attribute
  
ELSE = 6
None of the above.
class-attribute
      instance-attribute
  
EXACT = 1
The names are exactly the same.
class-attribute
      instance-attribute
  
GIVEN_SURNAME = 2
The given and surnames both match.
class-attribute
      instance-attribute
  
INITIALS = 4
The first letter of the given name matches, and the surnames match.
class-attribute
      instance-attribute
  
NICKNAMES = 3
The given names match with nicknames, and the surnames match.
class-attribute
      instance-attribute
  
NULL = 0
At least one given or surname is NULL from either side.
class-attribute
      instance-attribute
  
TYPO = 5
The given names are the same (forgiving typos), and the surnames match.
    Compare names. Assumes the names have already been normalized/featurized.
class-attribute
      instance-attribute
  
Levels = NameMatchLevel
The levels of name comparison.
__call__(
    table: Table | None = None,
    *,
    left: StructValue | None = None,
    right: StructValue | None = None,
) -> IntegerValue
Compare two names.
| PARAMETER | DESCRIPTION | 
|---|---|
| left | The left name. 
                  
                    TYPE:
                       | 
| right | The right name. 
                  
                    TYPE:
                       | 
| RETURNS | DESCRIPTION | 
|---|---|
| t | The comparison result. 
                  
                    TYPE:
                       | 
    Prepares, blocks, and compares based on a human name.
A name is a Struct of the type `struct< prefix: string, given: string, middle: string, surname: string, suffix: string, nickname: string,
`.
compare(t: Table) -> Table
Compare the left and right names.
| PARAMETER | DESCRIPTION | 
|---|---|
| t | The table to compare. 
                  
                    TYPE:
                       | 
| RETURNS | DESCRIPTION | 
|---|---|
| t | The compared table. 
                  
                    TYPE:
                       | 
prepare_for_fast_linking(t: Table) -> Table
Add columns with the normalized name.
| PARAMETER | DESCRIPTION | 
|---|---|
| t | The table to prep. 
                  
                    TYPE:
                       | 
| RETURNS | DESCRIPTION | 
|---|---|
| t | The prepped table. |