// MRA - Match Rating Approach for intelligent name comparison
Calculates numeric similarity between names.
Optimized codes using first 3 and last 3 characters.
Adjusts threshold based on name length.
Match Rating Approach (MRA) is a phonetic algorithm developed by Western Airlines in 1977. It encodes names by removing vowels (except the first letter), eliminating duplicate consonants, and reducing to 6 characters (first 3 + last 3 if longer). The comparison phase calculates similarity by comparing characters from both the beginning and end, with the threshold adjusted based on the combined length of the codes.
Encoding steps:
1. Remove vowels (except first)
2. Remove duplicate consonants
3. Keep first 3 + last 3 if > 6
Examples:
CATHERINE � CTHRN
C[a]TH[e]R[i]N[e] � CTHRN
KATHERINE � KTHRN
K[a]TH[e]R[i]N[e] � KTHRN
SMITH � SMTH
SM[i]TH � SMTH
Matching thresholds:
Sum d 4: need 5 matches
Sum 5-7: need 4 matches
Sum 8-11: need 3 matches
Sum e 12: need 2 matches
CTHRN vs KTHRN:
Sum = 10, need 3 matches
Actual: 4 matches � MATCH!
Match Rating Approach (MRA) is a phonetic algorithm developed by Western Airlines in 1977 for passenger name matching. It combines encoding and comparison phases, providing both a phonetic code and a similarity score between names.
Unlike Soundex or Metaphone which only provide codes, MRA includes a sophisticated comparison algorithm that calculates similarity scores. It adjusts its matching threshold based on name length, making it more flexible and accurate for different types of names.
The similarity score counts the number of matching characters when comparing two MRA codes from both the beginning and end. The required minimum score varies based on the combined length of the codes - shorter names need higher similarity to match.
MRA is ideal for applications requiring nuanced name matching: customer databases, genealogy research, fraud detection, and record linkage. It's particularly effective when you need to identify potential duplicates with varying spellings.