||
R命令 (预先要安装rJava包): |
library(rJava) #make sure the jar file is in the "java" subdirectory of the “rJava”package. .jpackage(name="rJava",jars="mmseg4j-all-1.8.5-with-dic.jar") c <- .jnew("com/chenlb/mmseg4j/example/Complex"); outRef<-.jcall(c, "S", "segWords","我们大家都来学习"," | ",evalString = FALSE) .jstrVal(outRef) |
输出结果: | [1] "我们 | 大家 | 都来 | 学习" |
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-27 10:46
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社