0.2.2 • Published 1 year ago
@cityssm/text-to-search-terms v0.2.2
text-to-search-terms
Reduces large strings of text into distinct search terms.
import {
textToSearchTermsString,
OPTIONS_ALL
} from '@cityssm/text-to-search-terms'
console.log(
textToSearchTerms("Hop to the shop! There's a sale on a mop!", OPTIONS_ALL)
)
// "mop on sale shop there's to"
Options
Option | Default |
---|---|
removeCase | true |
removePunctuation | true |
removeDiacritics | false |
removeWordsWithoutLettersOrNumbers | false |
sortAlphabetically | false |
removeDuplicateWords | true |
removeDuplicatePartialWords | false |