convert method
Converts input
and returns the result of the conversion.
Implementation
@override
String convert(String word) {
if (!word.isEmpty) {
if (uncountableNouns.contains(word.toLowerCase())) {
return word;
} else {
for (var r in _inflectionRules) {
var pattern = r.first;
if (pattern.hasMatch(word)) {
return word.replaceAllMapped(pattern, r.last as MatchToString);
}
}
}
}
return word;
}