Description Usage Arguments Details Value Examples
Create a dictionary from a list of documents.
1 | doc2bow(dictionary, docs)
|
dictionary |
A dictionary as returned by |
docs |
A list of documents as returned by |
Counts the number of occurrences of each distinct word, converts the word to its integer word id and returns the result as a sparse vector.
A sparse matrix in the form, tuple.
1 2 3 | docs <- prepare_documents(corpus)
dict <- corpora_dictionary(docs)
(corpora <- doc2bow(dict, docs))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.