我想使用wordnet
词形还原器来词形化单词a
> a<-c("He saw a see-saw on a sea shore", "she is feeling cold")
> a
[1] "He saw a see-saw on a sea shore" "she is feeling cold"
我转换a
成语料库并进行预处理步骤(如停用词删除、词形还原等)
> a <- Corpus(VectorSource(a))
我想通过以下方式进行词形还原,
> filter <- getTermFilter("ExactMatchFilter", a, TRUE)
> terms <- getIndexTerms("NOUN", 1, filter)
> sapply(terms, getLemma)
但我得到这个错误
> filter <- getTermFilter("ExactMatchFilter", a, TRUE)
Error in .jnew(paste("com.nexagis.jawbone.filter", type, sep = "."), word, :
java.lang.NoSuchMethodError: <init>
我的想法是对整个语料库进行词形还原,而不是一个词,如何实现?