@@ -50,7 +50,7 @@ private fun String.pluralizer(): String {
50
50
var found = Pattern .compile(rule.component1(), Pattern .CASE_INSENSITIVE ).matcher(this ).replaceAll(rule.component2())
51
51
val endsWith = exceptions().firstOrNull { this .endsWith(it.component1()) }
52
52
if (endsWith != null ) found = this .replace(endsWith.component1(), endsWith.component2())
53
- val exception = exceptions().firstOrNull() { this .equals(it.component1()) }
53
+ val exception = exceptions().firstOrNull() { this .equals(it.component1(), true ) }
54
54
if (exception != null ) found = exception.component2()
55
55
return found
56
56
}
@@ -59,7 +59,7 @@ private fun String.singularizer(): String {
59
59
if (unCountable().contains(this .toLowerCase())) {
60
60
return this
61
61
}
62
- val exceptions = exceptions().firstOrNull() { this .equals(it.component2()) }
62
+ val exceptions = exceptions().firstOrNull() { this .equals(it.component2(), true ) }
63
63
64
64
if (exceptions != null ) {
65
65
return exceptions.component1()
@@ -147,7 +147,8 @@ fun exceptions(): List<Pair<String, String>> {
147
147
" noumenon" to " noumena" ,
148
148
" organon" to " organa" ,
149
149
" asyndeton" to " asyndeta" ,
150
- " hyperbaton" to " hyperbata" )
150
+ " hyperbaton" to " hyperbata" ,
151
+ " foot" to " feet" )
151
152
}
152
153
153
154
fun pluralizeRules (): List <Pair <String , String >> {
@@ -176,7 +177,9 @@ fun pluralizeRules(): List<Pair<String, String>> {
176
177
" f$" to " ves" ,
177
178
" fe$" to " ves" ,
178
179
" um$" to " a" ,
179
- " on$" to " a" )
180
+ " on$" to " a" ,
181
+ " tion" to " tions" ,
182
+ " sion" to " sions" )
180
183
}
181
184
182
185
fun singularizeRules (): List <Pair <String , String >> {
0 commit comments