使用RTextTools和tm创建双字节时,simple_triplet_matrix出错

时间:2015-07-16 08:40:31

标签: r tm

我正在尝试根据网络上提出的不同方法从文本创建双字母组合。最简单的例子如下:

IReadableBitmap

导致:

library(RTextTools)
texts <- c("This is the first document.", "This is the second file.", "This is the third text.")
matrix <- create_matrix(texts,ngramLength=3)

这是我的设置:

Error in simple_triplet_matrix(i = i, j = j, v = as.numeric(v), nrow = length(allTerms),  : 
'i, j, v' different lengths
In addition: Warning messages:
1: In mclapply(unname(content(x)), termFreq, control) :
all scheduled cores encountered errors in user code
2: In simple_triplet_matrix(i = i, j = j, v = as.numeric(v), nrow = length(allTerms),  :
NAs introduced by coercion

有关正在发生的事情的任何提示?

0 个答案:

没有答案