in src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java [225:247]
public RulesApplication invoke() {
this.found = false;
int patternLength = 1;
final List<Rule> rules = this.finalRules.get(input.subSequence(i, i+patternLength));
if (rules != null) {
for (final Rule rule : rules) {
final String pattern = rule.getPattern();
patternLength = pattern.length();
if (rule.patternAndContextMatches(this.input, this.i)) {
this.phonemeBuilder.apply(rule.getPhoneme(), maxPhonemes);
this.found = true;
break;
}
}
}
if (!this.found) {
patternLength = 1;
}
this.i += patternLength;
return this;
}