Interface: SplitName
Defined in: src/lib/names/filipino.ts:22
Split a Filipino full name into first / middle / last parts.
Philippine naming convention (Spanish-influenced): <given name(s)> <middle (mother's maiden surname)> <last (father's surname)>. The common heuristic, per local practice:
- the LAST word is the last name;
- the word BEFORE it is the middle name;
- everything before that is the first (given) name.
With two important exceptions the simple rule gets wrong:
- Compound surnames carry a particle that belongs WITH the surname: "de la Cruz", "dela Cruz", "delos Santos", "del Rosario", "de Guzman". The particle(s) are pulled into the last name.
- "Maria" / "Ma." is almost always part of a compound GIVEN name ("Maria Theresa", "Ma. Cristina"), so the word right after it stays in the first name rather than becoming the middle name.
Generational suffixes (Jr., Sr., III) attach to the last name.
The heuristic can't be perfect (a compound surname sitting in the middle slot, mononyms, very long
names), so each result carries a confidence. Callers should surface low splits for human review
rather than trust them silently — names are PII and feed Wise payouts and payslips.
Properties
confidence
confidence:
"high"|"low"
Defined in: src/lib/names/filipino.ts:27
high = matched a clean pattern; low = ambiguous, flag for human review.
firstName
firstName:
string
Defined in: src/lib/names/filipino.ts:23
lastName
lastName:
string
Defined in: src/lib/names/filipino.ts:25
middleName
middleName:
string
Defined in: src/lib/names/filipino.ts:24