Created
May 8, 2020 12:55
-
-
Save y-krn/66b6686421cbaf5560c7c78fabc2696e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.8 | |
# MeCab | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
RUN apt-get install -y libmecab2 libmecab-dev mecab mecab-utils nkf | |
# ipadic | |
RUN wget -O mecab-ipadic-2.7.0-20070801.tar.gz "https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM" | |
RUN tar xvzf mecab-ipadic-2.7.0-20070801.tar.gz | |
RUN nkf --overwrite -Ew mecab-ipadic-2.7.0-20070801/* | |
# Neologd | |
RUN git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git | |
RUN xz -dkv mecab-ipadic-neologd/seed/*seed* | |
RUN mv mecab-ipadic-neologd/seed/*.csv mecab-ipadic-2.7.0-20070801/ | |
WORKDIR /mecab-ipadic-2.7.0-20070801 | |
RUN /usr/lib/mecab/mecab-dict-index -f utf-8 -t utf-8 | |
RUN ./configure && make install | |
RUN echo 'dicdir=/usr/lib/x86_64-linux-gnu/mecab/dic/ipadic' > /etc/mecabrc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PythonコンテナでMeCab + NEologdを実行するためのDockerfile