jaraco/inflect

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

Ouverte

#163 ouverte le 9 juil. 2022

 (1 commentaire) (0 réaction) (0 personne assignée)Python (125 forks)github user discovery
featurehelp wanted

Métriques du dépôt

Stars
 (1 082 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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?

Guide contributeur