k2516
k2516

Reputation: 83

How to get Plural form from Singular form?

I want to get plural of the given noun. I have tried JAVA INFLECTOR. But it has very poor accuracy for nouns not following the regular rules.

Examples from JAVA INFLECTOR:

  1. paparazzo -> paparazzos
  2. criterion -> criterions
  3. tooth -> tooths
  4. thief -> thiefs
  5. loaf -> loafs

Stanford coreNLP lemmatizer is very good at plural to singular conversion. It takes care of many exceptional cases. As stated below:

Plural to singular from STANFORD LEMMATIZER:

  1. vertices -> vertex
  2. spectra -> spectrum
  3. alumni -> alumnus
  4. criteria -> criterion
  5. thieves -> thief
  6. geese -> goose
  7. fungi -> fungus
  8. loaves -> loaf.

But the problem is I don't know how to get plural from given singular using Stanford CoreNLP. The lemmatizer gives singular from plural.

So, basically I want to get plural from singular nouns using STANFORD NLP.

How can this be achieved?

Upvotes: 4

Views: 1983

Answers (1)

Ronnie Smith
Ronnie Smith

Reputation: 18585

If you can harness javascript, I created a lightweight javascript for this. Very easy to use:

pluralizer.run('goose') --> 'geese'
pluralizer.run('deer') --> 'deer'
pluralizer.run('can') --> 'cans'

https://github.com/rhroyston/pluralizer-js

Upvotes: -3

Related Questions