The CHARACTER routine compares two Asian character fields. The matched characters ratio is calculated based on the number of the same characters in both fields out of the total number of characters in those fields.
The method of calculation is: numerator/denominator
The numerator is calculated by taking the count of matched characters from the field with the least amount of characters (after eliminating blanks), and multiplies that by 2. The denominator is determined by adding the counts of characters in each field, and it does not count spaces.
Example
Field 1: AABBCCDEFGHHIJ K (12 matches out of 15 characters)
Field 2: AABB DEFGHHIJJL (13 matches out of 14 characters)
Filed 2 has the least amount of characters, therefore 13 is used for the numerator. Score calculation is: (13*2)/29 = 26/29 = 89.66, which returns a score of 85.
Score |
Description |
---|---|
100 |
Exact match |
98 |
Blank versus blank |
97 |
Blank versus non-blank |
85 |
Numerator/denominator is 85 -99% |
60 |
Numerator/denominator is 60 -84% |
45 |
Numerator/denominator is 45 -59% |
30 |
Numerator/denominator is 30 -44% |
0 |
Numerator/denominator is 0 -29% |