mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 17:31:41 +00:00
Fix instructions and search path for mecab-ko-dic
I'm starting a new Python environment on a new Ubuntu installation. You never know when a huge yak will show up and demand to be shaved. I tried following the directions in the README, and found that a couple of steps were missing. I've added those. When you follow those steps, it appears to install the MeCab Korean dictionary in `/usr/lib/x86_64-linux-gnu/mecab/dic`, which was none of the paths we were checking, so I've added that as a search path.
This commit is contained in:
parent
5e05c942ac
commit
676686fda1
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ pip-log.txt
|
||||
wordfreq-data.tar.gz
|
||||
.idea
|
||||
build.dot
|
||||
.pytest_cache
|
||||
|
@ -395,7 +395,7 @@ things need to be installed:
|
||||
To install these three things on Ubuntu, you can run:
|
||||
|
||||
```sh
|
||||
sudo apt-get install libmecab-dev mecab-ipadic-utf8
|
||||
sudo apt-get install python3-dev libmecab-dev mecab-ipadic-utf8
|
||||
pip3 install mecab-python3
|
||||
```
|
||||
|
||||
@ -419,6 +419,7 @@ wget https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.0.1-201
|
||||
tar xvf mecab-ko-dic-2.0.1-20150920.tar.gz
|
||||
cd mecab-ko-dic-2.0.1-20150920
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
@ -20,6 +20,7 @@ def find_mecab_dictionary(names):
|
||||
'/var/local/lib/mecab/dic',
|
||||
'/usr/lib/mecab/dic',
|
||||
'/usr/local/lib/mecab/dic',
|
||||
'/usr/lib/x86_64-linux-gnu/mecab/dic',
|
||||
]
|
||||
full_paths = [os.path.join(path, name) for path in paths for name in names]
|
||||
checked_paths = [path for path in full_paths if len(path) <= MAX_PATH_LENGTH]
|
||||
|
Loading…
Reference in New Issue
Block a user