#!/bin/sh

PATH="/bin:/usr/local/libexec/mecab:/usr/lib/mecab:/usr/local/Cellar/mecab/0.996/libexec/mecab:/sw/lib/mecab/"
LANG=ja_JP.UTF-8

export PATH LANG

rm -f corpus
cat corpus.KT2.mc > corpus
cat corpus.kanjikai.mc >> corpus
cat corpus.misc.mc >> corpus

#cat corpus.KT0.txt > corpus
#cat corpus.kanjikai.txt corpus.ryomou.txt > corpus
#cat corpus.misc.txt > corpus

rm -f sys.dic ../final_names/*.csv

mecab-dict-index -f utf-8 -t utf-8

mecab-cost-train -c 1.0 corpus model

mecab-dict-gen -o ../final_names -m model

mecab-dict-index -f utf-8 -t utf-8 -d ../final_names -o ../final_names
