inflect icon indicating copy to clipboard operation
inflect copied to clipboard

'defnoun' doesn't seem to work when the word is a part of a string passed

Open jaraco opened this issue 3 years ago • 1 comments

Originally reported by @aMiss-aWry in #161:

I can fix the specific words with defnoun('jeans', 'jeans'), which corrects the result for an isolated string 'jeans' -> 'jeans'.

However, if I try to run plural_noun on 'blue jeans' instead of 'jeans' it then breaks again, returning 'blue jeanss'. I understand this is because 'blue jeans' appears to be a different string from 'jeans', but perhaps it should check the rules for the part of the string it is altering?

jaraco avatar Jul 09 '22 15:07 jaraco

These compound (multi-word) phrases are a more complex challenge in this library. The library does attempt in some cases to handle such words, but probably can't do so in general. Consider for example "a multitude of factors" or "cul de sac", which when pluralized becomes "multitudes of factors" and "culs de sac". I welcome someone to try to solve this issue either generally or specifically for "(anything) jeans".

jaraco avatar Jul 09 '22 15:07 jaraco