Get search terms in dictionary

get_search_terms(words, dictionary)

Arguments

words

character a string with words

dictionary

character vector containing all words in corpus

Value

character vector with words that are in the dictionary

Details

uses the breakdown function from LSAfun to get rid of special characters and convert to lowercase. The dictionary_words variable contains 100 sample words.

Examples

search <- "foreward firetruck by the president" corpus <- dictionary_words get_search_terms(search,corpus)
#> [1] "by" "the" "president"