jaraco / inflect

Correctly generate plurals, ordinals, indefinite articles; convert numbers to words
https://pypi.org/project/inflect
MIT License
957 stars 107 forks source link

The plural of "pair of x" and singular of "pairs of x" #184

Closed paul2048 closed 1 year ago

paul2048 commented 1 year ago
In [3]: p.plural_noun("pair of scissors")
Out[3]: 'pair of scissors'

In [4]: p.plural_noun("pair of slippers")
Out[4]: 'pairs of slippers'

In [5]: p.plural_noun("pair of pants")
Out[5]: 'pairs of pants'

It works for "pair of slippers", "pair of pants", etc, but not for "pair of scissors" 🤔

EDIT: "pair of scissors" is also problematic with getting the singular

In [13]: p.singular_noun("pairs of pants")
Out[13]: 'pair of pants'

In [14]: p.singular_noun("pairs of scissors")
Out[14]: 'pairs of scissors'
paul2048 commented 1 year ago

Merged here