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
  • 181,601
  • 45
  • 354
  • 430
Swapnil Pandey
  • 502
  • 3
  • 8
  • 22

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,181
  • 4
  • 40
  • 61