如何在3.1.0以上版本安装Rwordseg包


一种方法:

在线安装,install.packages("Rwordseg", repos = "http://R-Forge.R-project.org"),这种方法可能会出现警告,但可以使用,前提是已经安装好了依赖包rJava,过程如下:

> install.packages("Rwordseg", repos="http://R-Forge.R-project.org")
Installing package into ‘C:/Users/dxx/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
installing the source package ‘Rwordseg’

trying URL 'http://R-Forge.R-project.org/src/contrib/Rwordseg_0.2-1.tar.gz'
Content type 'application/x-gzip' length 5445754 bytes (5.2 MB)
downloaded 5.2 MB

* installing *source* package 'Rwordseg' ...
** R
** demo
** inst
** preparing package for lazy loading
Warning: package 'rJava' was built under R version 3.2.2
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning: package 'rJava' was built under R version 3.2.2
十月 16, 2015 11:01:33 上午 org.ansj.util.MyStaticValue <clinit>
警告: not find library.properties in classpath use it by default !
十月 16, 2015 11:01:34 上午 org.ansj.library.UserDefineLibrary loadLibrary
警告: init userLibrary waring :library/default.dic because : not find that file or can not to read !
十月 16, 2015 11:01:34 上午 org.ansj.library.UserDefineLibrary initAmbiguityLibrary
警告: init ambiguity waring :library/ambiguity.dic because : not find that file or can not to read !
十月 16, 2015 11:01:34 上午 org.ansj.library.UserDefineLibrary loadFile
信息: init user userLibrary ok path is : C:\Users\dxx\Documents\R\win-library\3.2\Rwordseg\config\userdic
十月 16, 2015 11:01:36 上午 org.ansj.library.InitDictionary init
信息: init core library ok use time :1773
十月 16, 2015 11:01:37 上午 org.ansj.library.NgramLibrary <clinit>
信息: init ngram ok use time :1817
* DONE (Rwordseg)

The downloaded source packages are in
‘C:\Users\dxx\AppData\Local\Temp\RtmpI1roYu\downloaded_packages’
> library(Rwordseg)
# Version: 0.2-1

 

 

第二种方法:

本地安装,可以手动输入网址http://R-Forge.R-project.org/bin/windows/contrib/3.0/Rwordseg_0.2-1.zip

或者https://r-forge.r-project.org/R/?group_id=1054

两个网址都可以下载到,放在本地文件夹,本地安装,这在3.2.1版本我的会报错,其他同学可以试一下

> install.packages("C:/Users/dxx/Documents/R/win-library/Rwordseg")
Installing package into ‘C:/Users/dxx/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘C:/Users/dxx/Documents/R/win-library/Rwordseg’ is not available (for R version 3.2.0)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM