简体   繁体   中英

Treat singular and plural of a word as one

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!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM