The SPELLING routine performs general-purpose text comparisons, assuming input fields are left-justified and blank-filled. If the two (2) fields do not match exactly, the routine calculates two (2) field lengths by excluding trailing blanks.
This routine also compares a hyphenated versus a non-hyphenated string of data, when the two (2) data strings are of the same length.
Score |
Description |
---|---|
100 |
For an exact match (excluding blank versus blank). |
96 |
Returned when comparing hyphenated versus non-hyphenated string:
If the hyphen is not the first or last character in the string, and the second string matches either the substring preceding the hyphen, or the substring following the hyphen exactly. |
1 |
Blank field versus non-blank field. |
0 |
Blank field versus blank field. |
Deduct from 100 |
|
- 1 |
For each non-matched doubled character. |
- 1 |
For each character error and for each extra character if there are extra characters. |
- 1 |
For each extra character if the last character was a mismatch. |
- 2 |
For other character errors (transposition, insertion, mismatch, extra characters at the end of either field after taking insertions and doubled characters into consideration). |
-10 |
If the number of character errors is more than or equal to 25% of the length of the shorter field. |
-25 |
If the number of character errors is more than 50% of the length of the shorter field. |
Finally, add |
|
+ 1 |
If the length of either field is at least 9 characters. |
Routine with Modifier(s):
SPELLING With Modifier (ALPHANUM)
SPELLING With Modifier (DECOMP)
SPELLING With Modifier (NOCASE)
SPELLING With Modifier (SQUISH)