junhewk / RcppMeCab

RcppMeCab: Rcpp Interface of CJK Morpheme Analyzer MeCab
25 stars 9 forks source link

Error with RcppMeCab, Exception: list() #12

Closed sdkpark closed 3 years ago

sdkpark commented 3 years ago

Hello,

I have used RcppMeCab very well, but the error has occurred since I formatted my PC and reinstalled all of the latest versions of R and Rstudio.

When pos() is used with the following code,

test <- "이것은 비타500입니다." pos(iconv(test, to = "UTF-8"))

I found the error message like

Exception: list()

Here is the information from R and R studio that I am using.

R version: 4.0.3 R Studio version: Version 1.4.1103

junhewk commented 3 years ago

@sdkpark Hi, this Exception occurs when mecab and mecab-dict is not installed in desired location (e.g. C:\mecab).

Can you confirm that two binaries are located in that directory?

sdkpark commented 3 years ago

Thanks for the prompt reply. I checked that user-custom.csv file is located under "C:\mecab\mecab-ko-dic".

image

junhewk commented 3 years ago

@sdkpark If you want to use user dictionary, please compile it to .dic using mecab-dict-index.exe.

Exception error means that RcppMecab cannot initialize mecab binaries, especially mecabrc and other files which belong to mecab-dict. Please check that mecab-ko-dic-msvc files (not your user dictionary) are in correct locations.

sdkpark commented 3 years ago

Thank you very much for your advice. It is found that the issue is related with the security issue of the C drive.
It looks like that security permissions must have been set for users after formatting the computer as shown by following figure.

image

Mecab-ko-dic-msvc files were in correct locations, but it could not be accessed. It was solved.