我正在尝试使用此代码对字典中没有的单词进行二元组标记化。
if(match != j)
{
matches <- (match != j)
matches <- lapply(matches, function(w) {
BigramTokenizer <- function(x) NGramTokenizer(x,Weka_control(min=2,max=2))
k <- BigramTokenizer(w)
return(k)
})
但我收到如下警告:
Warning message:
In if (match != j) { :the condition has length > 1 and only the first element will be used
有人可以告诉我如何立即修改此代码吗?