How to turn plural words singular?

前端 未结 13 1801
旧时难觅i
旧时难觅i 2020-12-24 14:06

I\'m preparing some table names for an ORM, and I want to turn plural table names into single entity names. My only problem is finding an algorithm that does it reliably. He

13条回答
  •  自闭症患者
    2020-12-24 14:24

    Andrew Peters has a class called Inflector.NET which provides plural-to-singular and singular-to-plural methods. As Tal has pointed out no algorithm is infallible but this covers a decent number of irregular English nouns.

提交回复
热议问题