Update the double metaphone approximate matching rule implementation to fix a
bug in which "TH" was incorrectly mapped to a capital letter "O" (oh) instead
of the number "0" (zero).
This fix was provided by Terry Sigle (username tsigle).
OpenDS Issue Number: 690
| | |
| | | |
| | | |
| | | // TH or TTH will be mapped to either T (for Germanic cases) or |
| | | // O for the rest. |
| | | // 0 (zero) for the rest. |
| | | if (((posPlusOne = valueString.charAt(pos+1)) == 'H') || |
| | | ((posPlusOne == 'T') && (valueString.charAt(pos+2) == 'H'))) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | metaphone.append("O"); |
| | | metaphone.append("0"); |
| | | } |
| | | |
| | | pos += 2; |
| | |
| | | {"DoubleMetaphoneApproximateMatchingRule", "bouteille", "butaille", true}, |
| | | {"DoubleMetaphoneApproximateMatchingRule", "xeon", "zeon", true}, |
| | | {"DoubleMetaphoneApproximateMatchingRule", "achtung", "aktung", true}, |
| | | {"DoubleMetaphoneApproximateMatchingRule", "throttle", "throddle", true}, |
| | | {"DoubleMetaphoneApproximateMatchingRule", "thimble", "thimblle", true}, |
| | | {"DoubleMetaphoneApproximateMatchingRule", "", "", true}, |
| | | }; |
| | | } |