0

I was trying to understand the text2vec package from http://dsnotes.com/articles/text2vec but at the following step:

Now we can costruct DTM. Again, since all functions related to corpus construction have streaming API, we have to create iterator and provide it to create_vocab_corpus function:

it <- itoken(movie_review[['review']], preprocess_function = tolower,
             tokenizer = word_tokenizer, chunks_number = 10, progessbar = F)
corpus <- create_vocab_corpus(it, vocabulary = vocab)

This code throws an error:

Error: could not find function "create_vocab_corpus"

Dmitriy Selivanov
  • 4,545
  • 1
  • 22
  • 38
Saurabh Yadav
  • 365
  • 4
  • 13

1 Answers1

1

Please, see tutorial for latest version (0.3): https://cran.r-project.org/web/packages/text2vec/vignettes/text-vectorization.html . There were some API breaks in v 0.3.

Dmitriy Selivanov
  • 4,545
  • 1
  • 22
  • 38