Sub topic 11
Screening names against lists
This chapter assumes you know what a sanctions list entry contains (primary name, aliases, identifiers) and have read basic Python. It covers how a screening tool compares a customer name to list names, and why that comparison produces both false positives and false negatives.
What screening does
Name screening compares the names of customers, owners, and counterparties with the names on sanctions lists. A screening tool cannot decide that two names belong to the same person. It can only score how alike they look and flag the pairs above a chosen threshold. A human then reviews each flag, which is the topic of the next chapter.
Names are hard to compare because the same person appears in many forms:
- Accents and case differ ("Doé" and "DOE").
- Word order differs ("Doe, Jonathan" and "Jonathan Doe").
- Transliteration from other scripts gives several valid spellings.
- Aliases, short forms, and typing errors add more variants.
The screening pipeline
Normalization comes first, because comparing raw strings would miss obvious matches. The example below applies the pipeline to invented names.
import unicodedata
from difflib import SequenceMatcher
def normalize(name):
# Strip accents, lowercase, drop commas, collapse whitespace.
decomposed = unicodedata.normalize('NFKD', name)
no_accents = ''.join(c for c in decomposed if not unicodedata.combining(c))
return ' '.join(no_accents.casefold().replace(',', ' ').split())
def similarity(a, b):
# Sort tokens so 'Doe, John' and 'John Doe' compare as equal.
ta = ' '.join(sorted(normalize(a).split()))
tb = ' '.join(sorted(normalize(b).split()))
return SequenceMatcher(None, ta, tb).ratio()
listed_names = ['Doe, Jonathan', 'Example Trading Co']
customer = 'Jonathan Doé'
for entry in listed_names:
s = similarity(customer, entry)
print(entry, round(s, 2), 'REVIEW' if s >= 0.85 else 'clear')The code does three things. normalize removes accents and case differences. similarity sorts the words so order no longer matters, then returns a ratio between 0 and 1. The loop flags any entry scoring 0.85 or higher. Here "Jonathan Doé" matches "Doe, Jonathan" exactly after normalization, so it scores 1.0 and goes to review. "Example Trading Co" scores far lower and is cleared.
This is a toy. Real tools also screen every alias, handle transliteration, and use identifiers such as date of birth or nationality to confirm or rule out a match.
The threshold trade-off
The threshold controls two kinds of error.
| Setting | False positives | False negatives |
|---|---|---|
| Low threshold (for example 0.70) | Many. Analysts review unrelated names. | Few. |
| High threshold (for example 0.95) | Few. | More. Spelling variants slip through. |
A false positive is an alert on someone who is not the listed party. A false negative is a listed party that the tool fails to flag. A false negative can mean a sanctions breach, so firms usually accept more false positives. Too many alerts still hurt, because tired reviewers make mistakes.
Common errors
- Screening only the customer and ignoring owners and controllers. The ownership rules from the earlier chapter apply here.
- Comparing against primary names only, and skipping aliases.
- Tuning the threshold to cut alert volume without testing what it now misses.
- Treating a score as proof. A score is a prompt for review.
Exercise
A tool uses a threshold of 0.95 and no longer flags "Jonathon Doe" against a listed "Jonathan Doe". Which error type is this, and what are two ways to reduce it?
Show answer
It is a false negative. Reduce it by lowering the threshold, and by adding matching that tolerates spelling variants, such as edit distance or phonetic comparison. Screening every alias and using identifiers such as date of birth also helps.