Search code examples
analyticsdata-miningjavascriptstemming

Stop word removal in Javascript


HI I am looking for a library that'll remove stop words from text in Javascript, my end goal is to calculate tf-idf and then convert the given document into vector space, and all of this is Javascript. Can anyone point me to a library that'll help me do that.Just a library to remove the stop words would also be great.


Solution

  • I think there are no libraries for such thing, you need to download those words from https://www.ranks.nl/stopwords.

    And then do replace the words as follows:

    text = text.replace(stopword, "")