0

I am creating a web based word frequency counter using JavaScript. Is there any way so as to treat plural and singular as same.

Example: love and loves are treated as one when showing frequency

Any method using something other than JavaScript is also welcome!

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
Swapnil Pandey
  • 577
  • 3
  • 8
  • 25

1 Answers1

0

Define a map with all the synonyms for each word, and search on that map before counting a word.

This might help you: Porters Stemming Algorithm Javascript, How to

Community
  • 1
  • 1
Andres
  • 10,561
  • 4
  • 45
  • 63