View source: R/string_to_word_vector.R
string_to_word_vector | R Documentation |
Convert a string into a dictionary TF-IDF vector.
string_to_word_vector(string)
string |
A character string to be converted into a TF-IDF vector |
The function takes in a character string, removes punctuation and special characters, converts the string to lower case, splits the string into words, removes stop words, performs stemming using the Snowball Stemmer, creates a corpus of text, and calculates the TF-IDF (term frequency-inverse document frequency) values. The result is a matrix representing the TF-IDF vector for the input string.
A matrix representing the TF-IDF vector for the input string
string_to_word_vector("The quick brown fox jumps over the lazy dog.")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.