8000 Mecab latest is broken. · Issue #7 · MikimotoH/furigana · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Mecab latest is broken. #7

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

Open
SteveClement opened this issue Sep 13, 2021 · 1 comment
Open

Mecab latest is broken. #7

SteveClement opened this issue Sep 13, 2021 · 1 comment

Comments

@SteveClement
Copy link

In case you get:

>>> from furigana.furigana import print_html

Failed initializing MeCab. Please see the README for possible solutions:

    https://github.com/SamuraiT/mecab-python3#common-issues

If you are still having trouble, please file an issue here, and include the
ERROR DETAILS below:

    https://github.com/SamuraiT/mecab-python3/issues

issueを英語で書く必要はありません。

------------------- ERROR DETAILS ------------------------
arguments: -Ochasen
error message:  [!tmp.empty()] unknown format type [chasen]
----------------------------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/misp/furigana/furigana/furigana.py", line 12, in <module>
    mecab = MeCab.Tagger("-Ochasen")
  File "/home/misp/furigana/venv/lib/python3.8/site-packages/MeCab/__init__.py", line 124, in __init__
    super(Tagger, self).__init__(args)
RuntimeError

Make sure to use a specific version of Mecab:

pip install mecab-python3==0.996.5

Check out this fork: https://github.com/Kajen5/furigana which uses pykakasi/2.0.0

@SilverBzH
Copy link

I had a similar issue:

Traceback (most recent call last):
  File "proj/.venv/lib/python3.11/site-packages/MeCab/__init__.py", line 133, in __init__
    super(Tagger, self).__init__(args)
RuntimeError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "proj/.venv/lib/python3.11/site-packages/furigana/furigana.py", line 84, in split_furigana
    mecab = MeCab.Tagger("-Ochasen")
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "proj/.venv/lib/python3.11/site-packages/MeCab/__init__.py", line 135, in __init__
    raise RuntimeError(error_info(rawargs)) from ee
RuntimeError: 
----------------------------------------------------------

Failed initializing MeCab. Please see the README for possible solutions:

    https://github.com/SamuraiT/mecab-python3#common-issues

If you are still having trouble, please file an issue here, and include the
ERROR DETAILS below:

    https://github.com/SamuraiT/mecab-python3/issues

issueを英語で書く必要はありません。

------------------- ERROR DETAILS ------------------------
arguments: -Ochasen
 [!tmp.empty()] unkown format type [chasen]
----------------------------------------------------------

Works for me by installed the forked repo alongside and installing it directly into my venv:

git clone git@github.com:Kajen5/furigana.git
cd <project>
pip install six semidbm pykakasi
pip install ../furigana

Would be nice to avoid a fork and upload the fixes.

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
@SteveClement @SilverBzH and others
0