Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run worker() function 出现R session aborted 是怎么回事? #73

Open
liaoshuai1 opened this issue Jan 11, 2022 · 0 comments
Open

Comments

@liaoshuai1
Copy link

这是代码
rm(list=ls())
###分词
#install.packages('Rcpp')
#install.packages('jiebaR')
library(Rcpp)
library(jiebaRD)
library(jiebaR)

en = "R is my favorite programming language."
cn = "R语言是我最喜爱的编程语言"

wk=jiebaR::worker() #worker()函数是用来初始化分词引擎的,默认为混合模型。
segment(en,wk)

segment(cn,wk)

##worker其中type是算法类型,dict是字典来源,如果不设置就会使用jiebaR默认的字典,同样的hmm路径和user路径也一样。symbol选项是F表示不保留标点。此外,还可以设置停词字典,更多详细具体的设置可以在R语言里用?worker()查看。
cc2 = jiebaR::worker(type = "mix", dict = "dict/jieba.dict.utf8",
hmm = "dict/hmm_model.utf8",
user = "dict/test.dict.utf8",
symbol = F
)
###https://zhuanlan.zhihu.com/p/24882048

报错:2022-01-12 00:21:33 ../inst/include/lib/DictTrie.hpp:159 FATAL exp: [ifs.is_open()] false. open dict/jieba.dict.utf8 failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant