Can you programmatically detect pluralizations of English words, and derive the singular form?

后端 未结 6 1848
灰色年华
灰色年华 2020-12-15 13:33

Given some (English) word that we shall assume is a plural, is it possible to derive the singular form? I\'d like to avoid lookup/dictionary tables if possi

6条回答
  •  余生分开走
    2020-12-15 13:55

    Going from singular to plural, English plural form is actually pretty regular compared to some other European languages I have a passing familiarity with. In German for example, working out the plural form is really complicated (eg Land -> Länder). I think there are roughly 20-30 exceptions and the rest follow a fairly simple ruleset:

    • -y -> -ies (family -> families)
    • -us -> -i (cactus -> cacti)
    • -s -> -ses (loss -> losses)
    • otherwise add -s

    That being said, plural to singular form becomes that much harder because the reverse cases have ambiguities. For example:

    • pies: is it py or pie?
    • ski: is it singular or plural for 'skus'?
    • molasses: is it singular or plural for 'molasse' or 'molass'?

    So it can be done but you're going to have a much larger list of exceptions and you're going to have to store a lot of false positives (ie things that appear plural but aren't).

提交回复
热议问题