File size: 2,787 Bytes
97b64b9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | """Deterministic synthetic signer name/role generation.
No external dependency (e.g. Faker) is required: a compact, self-contained
name pool keeps the pipeline dependency-light and fully reproducible from a
seed alone (Faker's own generators are not guaranteed stable across
versions, which would break the "same seed -> same output" contract).
"""
from __future__ import annotations
import random
FIRST_NAMES: tuple[str, ...] = (
"James", "Mary", "Robert", "Patricia", "John", "Jennifer", "Michael", "Linda",
"David", "Elizabeth", "William", "Barbara", "Richard", "Susan", "Joseph", "Jessica",
"Thomas", "Sarah", "Charles", "Karen", "Christopher", "Nancy", "Daniel", "Lisa",
"Matthew", "Betty", "Anthony", "Margaret", "Mark", "Sandra", "Donald", "Ashley",
"Steven", "Kimberly", "Paul", "Emily", "Andrew", "Donna", "Joshua", "Michelle",
"Kenneth", "Carol", "Kevin", "Amanda", "Brian", "Melissa", "George", "Deborah",
"Edward", "Stephanie", "Ronald", "Rebecca", "Timothy", "Laura", "Jason", "Sharon",
"Jeffrey", "Cynthia", "Ryan", "Kathleen", "Jacob", "Amy", "Gary", "Angela",
"Nicholas", "Shirley", "Eric", "Anna", "Jonathan", "Brenda", "Stephen", "Pamela",
"Larry", "Emma", "Justin", "Nicole", "Scott", "Helen", "Brandon", "Samantha",
"Wei", "Mei", "Hiroshi", "Yuki", "Raj", "Priya", "Ahmed", "Fatima",
"Carlos", "Sofia", "Hans", "Ingrid", "Liam", "Olivia", "Noah", "Ava",
)
LAST_NAMES: tuple[str, ...] = (
"Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia", "Miller", "Davis",
"Rodriguez", "Martinez", "Hernandez", "Lopez", "Gonzalez", "Wilson", "Anderson", "Thomas",
"Taylor", "Moore", "Jackson", "Martin", "Lee", "Perez", "Thompson", "White",
"Harris", "Sanchez", "Clark", "Ramirez", "Lewis", "Robinson", "Walker", "Young",
"Allen", "King", "Wright", "Scott", "Torres", "Nguyen", "Hill", "Flores",
"Green", "Adams", "Nelson", "Baker", "Hall", "Rivera", "Campbell", "Mitchell",
"Carter", "Roberts", "Chen", "Tan", "Kumar", "Patel", "Khan", "Ali",
"Muller", "Schmidt", "Rossi", "Dubois", "Kowalski", "Ivanov", "Suzuki", "Tanaka",
)
ROLE_POOL: tuple[str, ...] = (
"Account Holder",
"Authorized Signatory",
"Branch Manager",
"Bank Representative",
"Bank Officer",
"Loan Officer",
"Notary Public",
"Guarantor",
"Co-Signer",
"Compliance Officer",
"First Authorised Signatory",
"Second Authorised Signatory",
)
def generate_name(rng: random.Random) -> str:
"""Generate a deterministic synthetic full name from a seeded RNG."""
return f"{rng.choice(FIRST_NAMES)} {rng.choice(LAST_NAMES)}"
def generate_role(rng: random.Random) -> str:
"""Generate a deterministic synthetic role from a seeded RNG."""
return rng.choice(ROLE_POOL)
|