mecab 사용하기
######################
apt-get install --upgrade
apt install sudo
sudo apt-get update
sudo apt-get install g++
apt -y install gcc
sudo apt-get install make
pip install jamo
pip install koeda
#############
wget https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz
tar xvfz mecab-0.996-ko-0.9.2.tar.gz
cd mecab-0.996-ko-0.9.2
apt-get install openjdk-8-jdk python-dev python3-dev
./configure
make
make check
sudo make install
wget https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.1.1-20180720.tar.gz
tar xvfz mecab-ko-dic-2.1.1-20180720.tar.gz
cd .mecab-0.996-ko-0.9.2/mecab-ko-dic-2.1.1-20180720/
./configure
make
sudo apt-get install g++ openjdk-8-jdk python3-dev python3-pip curl
6 # asia
69 # seoul
bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)
sudo make install
sudo pip3 install konlpy
pip install mecab-python
bash autogen.sh
make
sudo make install
bash tools/add-userdic.sh
# tmp 경로에 저장된 사용자 사전 명사에 새로운 단어 추가
pwd
/data/ephemeral/home/EDA/mecab-0.996-ko-0.9.2/mecab-ko-dic-2.1.1-20180720/user-dic/nnp.csv
with open('/data/ephemeral/home/EDA/mecab-0.996-ko-0.9.2/mecab-ko-dic-2.1.1-20180720/user-dic/nnp.csv', "r", encoding='utf-8') as f:
user_dict = f.readlines()