vi user_dic.csv
How to use,-1,-1,1,noun,General,*,*,*,*,*,*,*,mydic
instruction manual,-1,-1,1,noun,General,*,*,*,*,*,*,*,mydic
...
$ /usr/local/Cellar/mecab/0.996/libexec/mecab/mecab-dict-index \
-d /usr/local/lib/mecab/dic/ipadic \
-u user.dic \
-f utf-8 \
-t utf-8 user.csv
--Meaning of option --- d DIR: Directory with system dictionary --- u FILE: Create a user file called FILE --- f charset: CSV character code --- t charset: Character code of binary dictionary
Because it is said that
/usr/local/Cellar/mecab/0.996/libexec/mecab/mecab-dict-index \
-d /usr/local/lib/mecab/dic/ipadic \
-u user_dic.dic \
-f utf-8 \
-t utf-8 \
user_dic.csv
You now have user_dic.dic.
vi /usr/local/etc/mecabrc
userdic = /Users/.../user_dic.dic
I was able to add it.
$ mecab
instruction manual
Instruction manual noun,General,*,*,*,*,*,*,*,mydic
EOS
It looks like it's done.
Adding a verb seems to be a hassle. http://www.mwsoft.jp/programming/nlp/mecab_dictionary_customize.html
-Adding words to MeCab user dictionary -Add mecab user dictionary -Add user dictionary to MeCab -Blog of an engineer who likes Tachikoma
Recommended Posts