Build mecab (NEologd dictionary) environment with Docker (ubuntu)

Recently, I am doing various analyzes such as acquiring data by scraping and performing morphological analysis with mecab.

Recent articles Clustering books from Aozora Bunko with Doc2Vec Scraping & Negative / Positive Analysis of Bunshun Online Articles

At that time, the environment in which the analysis is performed is all done in the Docker environment. This time I will publish the Dockerfile I am using.

Base: ʻubuntu Included: ʻanaconda, mecab, NEologd, gensim, janome, Beautiful Soup, etc. Ingenuity: Setting NEologd as the default dictionary. This way you don't have to specify the NEologd dictionary every time you start mecab.

reference Kame-san's udemy Docker course ・ ・ ・ It is my basic knowledge of Docker. Highly recommended course. NEologd's GitHub page ・ ・ ・ It is stronger against proper nouns than the default dictionary. Change the default dictionary of MeCab [Mac] ・ ・ ・ I used it as a reference when specifying the default dictionary of mecab.

FROM ubuntu:latest

RUN apt-get update && apt-get install -y \
  sudo \
  wget \
  vim \
  mecab \
  libmecab-dev \
  mecab-ipadic-utf8 \
  git \
  make \
  curl \
  xz-utils \


RUN wget && \
  sh -b -p /opt/anaconda3 && \
  rm -f
ENV PATH /opt/anaconda3/bin:$PATH

RUN git clone --depth 1 ; exit 0
RUN cd mecab-ipadic-neologd && \
  ./bin/install-mecab-ipadic-neologd -n -y && \
  echo "dicdir=/usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd">/etc/mecabrc
RUN conda update -n base -c defaults conda

RUN pip install --upgrade pip && \
  pip install mecab-python3 \
  Janome \
  jaconv \
  tinysegmenter==0.3 \
  gensim \
  unidic-lite \

RUN conda install -c conda-forge \
  newspaper3k && \
  conda install beautifulsoup4 \
  lxml \
  html5lib \


CMD ["jupyter", "lab", "--ip=", "--allow-root"]

Recommended Posts

Build mecab (NEologd dictionary) environment with Docker (ubuntu)
Build docker environment with WSL
Build Couchbase local environment with Docker
Build a Node.js environment with Docker
Build PlantUML environment with VSCode + Docker
Build environment with vue.js + rails + docker
Build Rails environment with Docker Compose
Build docker + laravel environment with laradock
Build a Wordpress development environment with Docker
Build Cakephp environment from docker installation Ubuntu
[Docker] Build Jupyter Lab execution environment with Docker
Build an environment with Docker on AWS
Build TensorFlow operation check environment with Docker
How to build Rails 6 environment with Docker
Build a WordPress development environment quickly with Docker
[Rails] How to build an environment with Docker
Template: Build a Ruby / Rails development environment with a Docker container (Ubuntu version)
[First team development ②] Build an environment with Docker
How to build docker environment with Gradle for intelliJ
Build an environment of Ruby2.7.x + Rails6.0.x + MySQL8.0.x with Docker
Easily build a Vue.js environment with Docker + Vue CLI
Build Rails (API) x MySQL x Nuxt.js environment with Docker
Build WordPress environment with Docker (Local) and AWS (Production)
Pytorch execution environment with Docker
[Docker] Rails 5.2 environment construction with docker
Build Ubuntu 18.04.5 with dual boot
React environment construction with Docker
Build DynamoDB local with Docker
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
How to build [TypeScript + Vue + Express + MySQL] environment with Docker ~ Express ~
How to build Rails, Postgres, ElasticSearch development environment with Docker
Build mate desktop environment on ec2 with terraform (Ubuntu 20.04LTS)
Build a Node-RED environment with Docker to move and understand
Rails + MySQL environment construction with Docker
Create a Vue3 environment with Docker!
Node.js environment construction with Docker Compose
Install java with Ubuntu 16.04 based Docker
Build a Tomcat 8.5 environment with Pleiades 4.8
Let's create Ubuntu environment with vmware
Environment construction with Docker for beginners
Create SolrCloud verification environment with Docker
Build jooby development environment with Eclipse
[Environment construction with Docker] Rails 6 & MySQL 8
Build Unity development environment on docker
Build WebRTC Janus with Docker container
Spring Boot gradle build with Docker
Build Go development environment with WSL2 + Docker Desktop + VSCode (Remote --Containers)
Build apache7.4 + mysql8 environment with Docker (with initial data) (your own memo)
I tried to build the environment of PlantUML Server with Docker
How to build [TypeScript + Vue + Express + MySQL] environment with Docker ~ MySQL edition ~
How to build Rails + Vue + MySQL environment with Docker [2020/09 latest version]
Build a development environment for Django + MySQL + nginx with Docker Compose
How to build [TypeScript + Vue + Express + MySQL] environment with Docker ~ Sequelize ~
Build debug environment on container --Build local development environment for Rails tutorial with Docker-
Alert slack with alert manager in Docker environment
GPU environment construction with Docker [October 2020 version]
Rails environment construction with Docker (personal apocalypse)
Building Rails 6 and PostgreSQL environment with Docker
Build an environment of "API development + API verification using Swagger UI" with Docker
Build and manage RStudio environment with Docker-compose
Create Rails 6 + MySQL environment with Docker compose