Sub topic 10
Reading list entries: identifiers, aliases and file formats
This chapter assumes you know what the OFAC, UN, EU and UK lists are and have read basic Python. It covers how a single list entry is built and how to load one reliably.
What an entry contains
Every regime publishes records for persons, entities, vessels and aircraft. The fields differ, but the same building blocks recur.
- Record ID. OFAC uses a UID, the UN a reference number such as QDi.001 (individual) or QDe.004 (entity), the EU a logical ID, and the UK a unique ID. Store this ID with every alert. Names change, but the ID identifies the record.
- Primary name and aliases. Aliases include other spellings, former names and transliterations. Lists often mark an alias as strong or weak (OFAC "a.k.a." versus "weak a.k.a."; the UN "good" versus "low" quality). Weak aliases produce many false positives, so apply a stricter threshold to them rather than ignoring them.
- Identifiers. Dates of birth, places of birth, nationalities, passport or national ID numbers, company registration numbers, vessel IMO numbers and addresses. Some are partial, such as a birth year only, or several alternative dates.
- Listing details. The program or regime, the legal instrument, and for some lists a narrative reason.
OFAC puts many identifiers in a free-text remarks field, so you may need to parse them out. The other regimes generally use structured fields.
File formats
| Regime | Typical machine-readable formats |
|---|---|
| OFAC | Delimited files (SDN, address, alias and comments files), XML, and an Advanced XML format |
| UN | XML (also HTML and PDF for people) |
| EU | XML and CSV through the Financial Sanctions Files service |
| UK | The UK Sanctions List in several formats, including XML and CSV |
Check each publisher's page for current file names and schemas, because they change.
Loading entries with their aliases
OFAC's delimited format stores aliases in a separate file linked by the UID. The sketch below uses invented data and groups aliases under each entry.
import csv
import io
from collections import defaultdict
entries_csv = """uid,name,type,program
1001,EXAMPLE TRADING CO,entity,PROGRAM-X
1002,"DOE, Jonathan",individual,PROGRAM-Y
"""
aliases_csv = """uid,alias_type,alias
1001,a.k.a.,EXAMPLE TRADE LTD
1002,a.k.a.,JOHN DOE
1002,weak a.k.a.,JON D
"""
aliases = defaultdict(list)
for row in csv.DictReader(io.StringIO(aliases_csv)):
aliases[row["uid"]].append((row["alias_type"], row["alias"]))
for row in csv.DictReader(io.StringIO(entries_csv)):
print(row["uid"], row["name"], row["type"])
for kind, alias in aliases[row["uid"]]:
print(" ", kind, alias)Each alias stays linked to the UID and keeps its strength label, so a later screening step can score weak aliases differently.
Common errors
- Dropping aliases because the main file looks complete.
- Ignoring partial dates, so "born 1970" is treated as a mismatch against a full date.
- Treating a missing identifier as a mismatch. A list entry with no passport number cannot be ruled out by a customer's passport.
- Reading the file with the wrong character encoding, which damages accented and non-Latin names.
- Using a stale download. Record the publication date and version of every file you load.
Exercise
A screening alert shows a customer matching a weak alias on UID 1002, and the customer's birth year differs from the entry's. What do you record and what do you do next?
Show answer
Record the regime, the UID, the alias and its strength, and the compared identifiers. A different birth year is strong evidence against a match, but check whether the entry lists several dates of birth or only an approximate one. If it does not, document the non-match and clear the alert. If it does, escalate for manual review.