[PYTHON] Load NEologd from MeCab if you do not have installation privileges (Windows)

Introduction

I wanted to add the NEologd dictionary to MeCab, but I couldn't install it because I didn't have permission. Make a note of how to read in the user dictionary

environment

Windows 10 64bit MeCab 0.996 32bit

NEologd installation procedure

Install NEologd

Download NEologd from the following URL https://github.com/neologd/mecab-ipadic-neologd

Compiling csv files

csv file preparation

In the seed folder in the downloaded mecab-ipadic-neologd-master There is a solidified csv file, so unzip it Each one is a MeCab dictionary file, so unzip only the csv file you want to read

Compiling csv files

After preparing the csv file Compile the csv file by typing the following command at the command prompt

"C:\Program Files (x86)\MeCab\bin\mecab-dict-index" -d "C:\Program Files(x86)\MeCab\dic\ipadic" -u <Where you want to put your user dictionary\User dictionary name.dic> -f utf-8 -t utf-8 <location of csv file\csv filename.csv>

Read user dictionary from MeCab

When reading a user dictionary from MeCab with a Python file When using Tagger, specify the user dictionary with the -u option as shown below. Multiple user dictionaries can be specified with, (comma)


import MeCab
m = MeCab.Tagger("-u hoge.dic,fuga.dic")

reference

-How to insert NEologd dictionary on Windows-User dictionary -How to add words

Recommended Posts

Load NEologd from MeCab if you do not have installation privileges (Windows)
[Linux] You do not have root privileges. But I want to yum install.
What to do if you are addicted to Windows character code
If you get stuck in Cannot load mkl_intel_thread.dll in Python on Windows
What to do if you have installed PyCharm but shortcut keys such as `control + e` do not work