jaraco/inflect

singular_noun on word ending in "s" removes s.

オープン

#159 opened on 2022/05/18

 (5 件のコメント) (2 件のリアクション) (0 人の担当者)Python (125 件のフォーク)github user discovery
help wanted

Repository metrics

Stars
 (1,082 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明


import inflect as Inflect
inflect = Inflect.engine()
inflect.singular_noun("car")           # get False, as expected
inflect.singular_noun("mass")          # get "mas", expected False

Is this behavior a bug? singular_noun() is supposed to return False when the word is already singular, and I can find no reference to suggest "mass" is the plural of "mas", which is itself the plural of "ma".

コントリビューターガイド