-
Notifications
You must be signed in to change notification settings - Fork 50
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
Failed when trying to initialize MeCab on macOS #45
Comments
Thanks for the report! I had the same issue on Linux with |
I've just realized that Travis just builds and deploys (without any test). |
Travis does run the tests at least on Linux and OSX, see here. It happens as part of the build script, rather than the deploy script, and it's handled a bit indirectly by setting env vars, but it does seem to be running. It doesn't seem to be run on Windows, so that's an issue. The biggest problem is probably that the tests are very limited though, which is why they didn't catch this. I'll add one for Chasen mode. |
Oh, my bad. Yes, Travis runs the unit tests both on Linux and on Mac. |
Ah, I believe I found the issue. The Chasen format is not hard-coded the way wakati is (see 注意事項), and it's not included in the Unidic I'll see if I can get the original error message that makes this clear. I tried to get it before and the error string was always empty, but that may have been a different kind of error. |
Well, unfortunately it looks like there's no obvious reason the error string isn't shown. Here's the SWIG code for the Tagger constructor:
When it fails, I may be able to work around this, I'll take another look at it tomorrow. Regarding the |
I have looked at the MeCab source and tried modifying things in SWIG but unfortunately I cannot get the error out of MeCab. It's possible I'm misunderstanding something, but this might be a bug in MeCab. I think is where the error is set for the Tagger. This looks like where it is set in the Model: The code is a bit different. I tried instantiating a Model using |
See SamuraiT#45 for details. For some reason the Tagger constructor doesn't produce error strings, but the Model constructor does. Since the arg format is the same you can get an error by passing it to the Model. May want to automate that if it turns out this is an upstream bug that can't be fixed.
Just a information, I tried
Hope this helps. |
As this is not a bug I'm going to close it, though I may try getting a better error message later. |
I installed mecab-python3==1.0.0a1 and tested the following lines of code:
As suggested, I installed unidic-lite (of 1.0.4) and tested again, but the same result.
When I tried the some codes with mecab-python3==0.996.5:
OS: macOS (10.15.4)
Python: 3.7.7
mecab: 0.996
mecab-python3: 1.0.0a1
The text was updated successfully, but these errors were encountered: