Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mecab-python causes RuntimeError on Windows64bit/Python3 environment #21

Open
icoxfog417 opened this issue Oct 2, 2015 · 3 comments
Open

Comments

@icoxfog417
Copy link

I tried to use mecab-python on Windows, but it causes RuntmeError (Python version is 3.4).

>>> import MeCab
>>> t = MeCab.Tagger()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Develop\Source\mecab\mecab\python\MeCab.py", line 433, in __init__
    this = _MeCab.new_Tagger(*args)
RuntimeError
  • I used the code on GitHub master base (mecab/mecab/python).
  • I attached the fix for windows (refer this site etc).
  • I tried to regenerate binding code by swig (used swig 3.0.7)

Below is the patched branch that I used.

icoxfog417/mecab#windows

But any fix does not work (in addition, It works fine on 32bit).

@icoxfog417 icoxfog417 changed the title mecab-python cause RuntimeError on Windows8.1 64bit environment mecab-python causes RuntimeError on Windows8.1 64bit environment Oct 2, 2015
@icoxfog417 icoxfog417 changed the title mecab-python causes RuntimeError on Windows8.1 64bit environment mecab-python causes RuntimeError on Windows64bit/Python3 environment Oct 2, 2015
@BoeingX
Copy link

BoeingX commented Apr 2, 2017

Maybe you have not yet installed the dictionary mecab-ipadic-2.7.0-XXXX.tar.gz?

@icoxfog417
Copy link
Author

The dictionary is already installed (as I described above, same setup works fine on 32bit environment).

But because of bash on Windows feature is released recently, I'm not in trouble by this issue.

@shekharkoirala
Copy link

Download , mecab-ipdaic-neologd dictionary

git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git
cd mecab-ipadic-neologd
./bin/install-mecab-ipadic-neologd -n
echo mecab-config --dicdir"/mecab-ipadic-neologd"

/usr/local/lib/mecab/dic/mecab-ipadic-neologd

Other than this is confirmation of not proper path of dictionary.
mecab -D
Here is my error , the dict is in another path.
Error: param.cpp(69) [ifs] no such file or directory: /usr/local/lib/mecab/dic/ipadic/dicrc

But this is working :
echo "8月3日に放送された「中居正広の金曜日のスマイルたちへ」(TBS系)で、1日たった5分でぽっこりおなかを解消するというダイエット方法を紹介。キンタロー。のダイエットにも密着。" | mecab -d /usr/local/lib/mecab/dic/mecab-ipadic-neologd

Reason is , the path is working.
So Final step :
locate mecabrc
dicdir = /usr/local/lib/mecab/dic/mecab-ipadic-neologd

To every file found, replace the value of dicdir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants