String Comparison in Real Life
summary
Compares practical Python approaches for real data: jellyfish: Levenshtein and Damerau‑Levenshtein gives edit distances (counts insert/delete/replace, Damerau treats adjacent swaps as one), while fuzzywuzzy: ratio, token_sort_ratio, token_set_ratio returns 0–100 similarity and handles token order and duplicates. Shows fraud‑detection and DNA examples, notes surprising Levenshtein distance of 14 for reordered long phrases (e.g. "i love comparing strings" vs "comparing strings i love"), recommends choosing thresholds (example 80/30) and finds both libraries simple and effective for typical typos and reordering.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 2:41Real-world applications
- 6:12Python libraries for comparison
- 7:16Levenshtein distance
- 10:48When to use Levenshtein
- 12:31Introducing fuzzywuzzy
- 13:13Fuzz ratio scoring
- 16:41Understanding thresholds
- 18:47Fuzz token sort ratio
- 19:31Fuzz token set ratio
- 21:18Advantages of fuzzywuzzy
- 22:42Summary
related talks
09mBehind the Scenes of Spell Checks!
28mFinding Currajong - Fuzzy string searches in Python
31mFrom Genes to Grids How Python Brings Sequence Alignment to Life
25mWhy len 4 and other weird things you should know about strings in Python
52mFundamentals of Stringology II: Probability and Statistics for Sequence Alignment
24mWhy `len('😶🌫️') == 4` and other weird things you should know about strings in Python
01h 01mFundamentals of Stringology I: Recap on Exact Pattern Matching and Alignment Algorithms
26mNo, Maybe and Close Enough! Probabilistic Data Structures with Python and Redis
