修改 R 的 TM 包中的非索引字



我在修改R的TM包中的english.dat停止词文件时遇到了问题。我添加的任何东西都不会被识别。我试着在文件的开头,中间,结尾添加,仍然没有效果。只识别文件的原始文本。我尝试将文件保存为ascii, UTF, UTF-8,但无济于事。

任何想法?

谢谢

试着以这种方式将它们添加到"english"列表中:

myStopwords <- c(stopwords('english'), "available", "via") to add words
myCorpus <- tm_map(myCorpus, removeWords, myStopwords)

最新更新