php - How to Troubleshoot Mecab Parser DysfunctionGet the solution ↓↓↓
A couple of things you can check:
Does Mecab work on the command line?
You should be able to do something like this, assuming a linux-like system:
echo "日本語ですよ" | mecab
Output should be roughly like this (details will probably differ):
日本 名詞,固有名詞,地名,国,*,*,ニッポン,日本,日本,ニッポン,日本,ニッポン,固,*,*,*,* 語 名詞,普通名詞,一般,*,*,*,ゴ,語,語,ゴ,語,ゴ,漢,*,*,*,* です 助動詞,*,*,*,助動詞-デス,終止形-一般,デス,です,です,デス,です,デス,和,*,*,*,* よ 助詞,終助詞,*,*,*,*,ヨ,よ,よ,ヨ,よ,ヨ,和,*,*,*,*
On some platforms mecab is statically linked in MySQL so you don't need a system installation, but the docs indicate that's not always the case.
Are your encoding settings correct?
The default character set of your table is
latin1, which won't work with Japanese text. I would suggest using utf8, and you'll need to check that your mecab installation supports that.
Hope that helps.
It turns out that the entire table must be encoded, not just the columns. Well, at least, this was the one significant difference that I made when I reconstituted the table.
No matter, the parser does not appear in the myPhpAdmin table section where parsers are apparently suppose to appear. This is, perhaps, due to the way the parser appears in the table's SHOW CREATE statement. In any case, this is a small shortcoming when compared with the parser's overall functionality.
Share solution ↓
Link To Answer People are also looking for solutions of the problem: please make sure the php redis extension is installed and enabled.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.