R中的Snowball和SnowballC包是不同的?

Ram*_*Ram 3 r stemming snowball tm

stemDocument用于使用tmR中的包来阻止文本文档.示例代码:

data("crude")
crude[[1]]
stemDocument(crude[[1]])
Run Code Online (Sandbox Code Playgroud)

我收到一条错误消息:

loadNamespace(name)出错:没有名为'Snowball'的包

我已经安装了SnowballC包,无法找到Snowball包.以下是我的sessionInfo():

R version 2.15.3 (2013-03-01)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] SnowballC_0.5 tm_0.5-8.3   

loaded via a namespace (and not attached):
[1] slam_0.1-31  tools_2.15.3
Run Code Online (Sandbox Code Playgroud)

它需要任何其他包裹还是雪球?

小智 8

只是尝试将SnowballC软件包安装到R

install.packages("SnowballC")

library(SnowballC)
Run Code Online (Sandbox Code Playgroud)

它应该工作.


42-*_*42- 5

你有一个旧版本pkg:tm.当前版本tm有一个描述SnowballC为"建议" 的描述文件.旧版本建议使用Snowball.

Package: tm
Title: Text Mining Package
Version: 0.5-10
Date: 2014-01-07
Authors@R: c(person("Ingo", "Feinerer", role = c("aut", "cre"),
                    email = "feinerer@logic.at"),
             person("Kurt", "Hornik", role = "aut"),
             person("Artifex Software, Inc.", role = c("ctb", "cph"),
                    comment = "pdf_info.ps taken from GPL Ghostscript"))
Depends: R (>= 2.14.0)
Imports: parallel, slam (>= 0.1-31)
Suggests: filehash, proxy, Rcampdf, Rgraphviz, Rpoppler, SnowballC, XML
Run Code Online (Sandbox Code Playgroud)

这是您目前从CRAN获得的消息:

Package ‘Snowball’ was removed from the CRAN repository.

Formerly available versions can be obtained from the archive.

Archived on 2014-03-16 at the request of the maintainer. 
Run Code Online (Sandbox Code Playgroud)

您应该更新到当前版本tm.试试这个:

update.packages("tm",  checkBuilt = TRUE)
Run Code Online (Sandbox Code Playgroud)

  • 谢谢你的建议.这真的很有帮助.更新tm包没有用.但是将R从2.15.3更新到3.1然后安装tm package和SnowballC确实有效. (2认同)