Match Rating Approach codex
Smith becomes SMTH: the Match Rating Approach drops vowels after the first letter, merges doubled consonants and keeps at most six letters, so names that sound alike land on the same short code. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- Smith
- Codex
- SMTH
- Length
- 4
- Encoding
- match_rating
The Match Rating Approach codex is a classic phonetic name key invented by Western Airlines in 1977 so passenger records that sound alike still collide in a short alphabetic code. Unlike Soundex or Double Metaphone, MRA builds one compact codex by deleting vowels after the first letter, folding consecutive duplicate consonants, and—when the result is longer than six letters—keeping only the first three and last three characters. This capability accepts a non-empty personal name, cleans punctuation and diacritics, runs that pure deterministic algorithm, and returns the codex plus its length under a self-describing encoding field.
What the Match Rating Approach codex is and how it is built
The algorithm then deletes every vowel A, E, I, O, and U unless that vowel is the first character of the cleaned string—so Byrne keeps B and yields BYRN, while Airlines keeps the leading A and yields ARLNS. Next it compresses consecutive identical consonants (double letters after vowel removal become a single letter), which turns runs such as SS or TT into one character and stabilizes spellings that only differ by gemination.
If the compressed string is still longer than six characters, the codex is the annex of the first three and last three letters; shorter results are returned unchanged. Y is treated as a consonant, not a vowel, matching the classic Western Airlines rules and common library implementations.
Where Match Rating codex earns its keep and how pricing fits
Airline, hotel, and CRM systems historically used Match Rating Approach codes so clerks could find passengers and guests despite spelling variants; modern customer-data platforms still store MRA codex columns for the same recall boost without forcing users to learn regular expressions. Genealogy sites and historical person indexes use the free in-browser tool to show why Byrne and similar spellings share structure while Catherine and Katherine remain distinct under pure MRA (they are not forced to a shared Soundex-style bucket).
Prefer this landing when search intent is match rating approach codex, MRA name code, or match rating phonetic encoder; NATO spelling alphabets and Base64 encoders answer different intents and should stay on their own pages. Source text follows the same retention rules as other KIT parse items, and results are safe to pin in tests because the algorithm is fully deterministic.
What you can do with it
CRM and passenger-style name deduplication
Index Match Rating codex on surnames so Smith, Smyth-adjacent, and hyphenated variants share a short phonetic bucket before merge review.
Genealogy and historical person search
Link alternate spellings in family trees by matching MRA codex values instead of requiring exact string equality only.
Data quality jobs and fuzzy indexes
Nightly pipelines encode new names, store codex and length, and flag near-duplicates when Match Rating codes collide with existing rows.
FAQ
What is the Match Rating Approach codex?
It is a phonetic name key from Western Airlines (1977): clean letters, drop non-leading vowels, compress double consonants, and keep first 3 + last 3 when longer than six.
How does MRA differ from Soundex or Double Metaphone?
Soundex emits a letter-plus-digits code; Double Metaphone returns primary and alternate keys. Match Rating builds one alphabetic codex with vowel stripping and optional first3+last3 truncation, optimized for short name matching.
What happens on empty or invalid input?
Successful calls need at least one A–Z letter after normalization.
What codex does Smith or Byrne produce?
Hyphenated names are cleaned into one letter stream before encoding.
Why is a long name cut down to six letters?
Because the codex is meant to be short. If the name is still longer than six letters after the vowels and doubled consonants are removed, only the first three and the last three are kept; shorter results stay as they are.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/match-rating \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Smith"}'const res = await fetch("https://api.kit.forhosting.com/enc/match-rating", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "Smith"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/match-rating",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "Smith"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/match-rating", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"Smith"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"Smith"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/match-rating", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "Smith"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.match_rating",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Empty strings, whitespace-only payloads, and inputs with no Latin letters fail with invalid_input so clients never store hollow phonetic rows. The free browser path and the prepaid API share the same pure module, so demos and production fuzzy-match pipelines never disagree on Smith, Byrne, or O’Brien.
What the Match Rating Approach codex is and how it is built
Match Rating Approach encoding starts from a cleaned uppercase name: accents are stripped to plain Latin letters, and hyphens, apostrophes, commas, digits, and spaces are removed so O’Brien and Smith-Jones become single letter runs. The response always echoes the trimmed input text, the final codex, the integer length of that codex, and encoding set to match_rating so openapi clients and widgets can show provenance without a second request. Because the steps are pure string transforms with no random seeds and no network, identical names always produce identical JSON across isolates and across the free browser tool and the API path.
Input contract, validation, response shape, and errors
There is no separate mode field: this capability only builds the MRA codex; it does not compare two names for similarity (the full MRA comparison score is a separate pipeline step that consumes two codex strings). Multi-part or hyphenated input is cleaned into one letter stream before encoding, so Smith-Jones becomes a single codex rather than two tokens. Use the codex as an index column or join key when you need a short, reviewable phonetic bucket; combine it with edit distance or token overlap when you need higher precision before merging customer records. Failed validation names the problem in plain English and never invents a placeholder codex. POST a JSON body with the required string field text set to a non-empty personal name or word; aliases input, value, s, word, and name are accepted when forms or SDKs reuse older labels. Maximum length is two thousand characters so ordinary surnames, given names, and short company labels fit a Worker isolate item call without inviting multi-megabyte dumps. On success the body carries text (echoed input after trim), codex (the six-or-fewer letter key), length (character count of codex), and encoding equal to match_rating for self-describing pipelines.
Where Match Rating codex earns its keep and how pricing fits
Nightly data-quality jobs call the prepaid KIT API at $0.002 per successful item to encode new surnames, write the codex next to the source row, and flag clusters that share a code before a human or secondary score decides on merge. Search backends that already keep Soundex or Double Metaphone can add Match Rating as an additional column without replacing legacy keys, because this endpoint never mutates source text—it only returns the codex. Keep payloads to ordinary name sizes, store the length field when you need length-aware thresholds for a later comparison stage, and remember that empty or invalid input is rejected rather than encoded as a blank string.
Technical questions
What does the Match Rating codex tool cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful item; invalid input is not billed.