Takes in a document, spits out a tokenised and stemmed array of terms. Using Porter's Algorithm.
stm.stem(text, noStopWords). Returns an array of terms, stemmed and without punctuation.
textis the string (text document) in which the calculations are to be performed on.
true. Set to
falseif you want to include stop words–e.g words such as "I" and "the".
var stm = ;var str = "you're simply a simplistic house, made for housing";var stemmed = stm; // noStopWords -> `true`>> "simpli" "simplist" "hous" "hous"var withStopWords = stm; // turn off the removal of stop words>> 'you' 're' 'simpli' 'a' 'simplist' 'hous' 'made' 'for' 'hous';