liveBook · Manning

Edit distance

As explained in Build Financial Software with Generative AI (From Scratch)

Levenshtein distance is a string metric counting the minimum single-character insertions, deletions, and substitutions needed to transform one string into another.

Levenshtein distance measures the minimum single-character insertions, deletions, and substitutions required to transform one string into another. In financial transaction screening, it supports fuzzy matching when names are misspelled or slightly altered. section 11.7.2

Name-screening similarity

A query compares cleaned ACH names with cleaned sanctions-list names, calculates a similarity score, and keeps results at 80 percent or higher, alongside phonetic matches.

How Build Financial Software with Generative AI (From Scratch) covers it

How deep it goes
Defines edit-based similarity and demonstrates normalized PostgreSQL scoring, while stopping short of explaining the algorithm’s internal dynamic programming.
Examples
Uses normalized PPD and IAT names, sanctions-list aliases, SQL similarity scores, and an 80-percent filtering threshold.
What it assumes
Assumes SQL and ACH name data, while demonstrating extension setup, name normalization, comparison, and filtering.
What you can do after
Apply it via PostgreSQL fuzzystrmatch to rank potentially misspelled or altered transaction names for screening review.
How it connects
Connects fuzzy matching with phonetic matching, Soundex, Metaphone, Daitch–Mokotoff matching, SQL, and sanctions screening.

Also explained in

Compare how 6 books explain edit distance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Financial Software with Generative AI (From Scratch). The section links point to the parts of the book it draws on.