ys7yoo / kor_embedding

한국어 임베딩 (Sentence Embeddings Using Korean Corpora)
https://ratsgo.github.io/embedding
MIT License
0 stars 0 forks source link

Need to install me cab #2

Open ys7yoo opened 3 years ago

ys7yoo commented 3 years ago
python preprocess/supervised_nlputils.py --tokenizer='mecab' --input_path='input.txt' --output_path='output.txt'
Traceback (most recent call last):
  File "/opt/anaconda3/envs/nltk/lib/python3.6/site-packages/konlpy/tag/_mecab.py", line 108, in __init__
    self.tagger = Tagger('-d %s' % dicpath)
NameError: name 'Tagger' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "preprocess/supervised_nlputils.py", line 62, in <module>
    tokenize(args.tokenizer, args.input_path, args.output_path)
  File "preprocess/supervised_nlputils.py", line 25, in tokenize
    tokenizer = get_tokenizer(tokenizer_name)
  File "preprocess/supervised_nlputils.py", line 12, in get_tokenizer
    tokenizer = Mecab()
  File "/opt/anaconda3/envs/nltk/lib/python3.6/site-packages/konlpy/tag/_mecab.py", line 113, in __init__
    raise Exception('Install MeCab in order to use it: http://konlpy.org/en/latest/install/')
Exception: Install MeCab in order to use it: http://konlpy.org/en/latest/install/
ys7yoo commented 3 years ago

http://konlpy.org/en/latest/install/

bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)
This script require Homebrew!
Try https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"