I'm getting the following memory allocation error when trying to run DocumentTermMatrix
from the tm
package. Not sure why this is happening as my machine has 128 gigs of memory and the corpus is just 3 gigs.
Error in mcfork() :
unable to fork, possible reason: Cannot allocate memory
Calls: DocumentTermMatrix ... content.VCorpus -> materialize -> mclapply -> lapply -> FUN -> mcfork
This is all that is being called:
library(tm)
text <- read.csv('/path/to/text.csv', ...)
vct <- VCorpus(VectorSournce(text[,2]))
vct <- tm_map(vct, removeWords, stopwords("english"), mc.cores=1)
dtm <- DocumentTermMatrix(vct)