I made a Docker container to use JUMAN ++, KNP, python (for pyKNP).

Purpose

I wanted to use JUMAN ++ and KNP for dependency analysis, but since I only have a windows PC at hand, I built an environment using Docker for Windows. It was hard work by hand, so I wanted to be able to use pyKNP as well.

Click here for Docker container

yusanish/jumanpp_knp

A brief explanation.

--It inherits python's 3-stretch. --Japaneseized --pyKNP is not included in the initial state. ――It's big. I have 3GB ...

How to use

Basically, connect the standard output of the container and use JUMAN ++ and KNP in the container. / Bin / bash is specified for CMD.

docker run -it --name jumanpp_knp yusanish/jumanpp_knp:latest

root@CONTAINER_ID:~#
root@CONTAINER_ID:~# echo "Today's rice is curry." | jumanpp | knp
Today's<Words><NE:DATE:today>
The rice is<Words>
It's curry.<Words><Words:Size><Case analysis result:Moth/rice;Moth2/->
EOS
root@CONTAINER_ID:~#

When you want to use pyKNP

[Click here for how to install pyKNP. ](Http://qiita.com/riverwell/items/7a85ebf95647eaf18a6c#pyknp%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3% 83% BC% E3% 83% AB)

Very simple sample

>>> import pyknp
>>> knp = pyknp.KNP()
>>> knp = pyknp.KNP(jumanpp=True)
>>> result = knp.parse("Today's dinner was curry.")
>>> result.draw_bnst_tree()

The functions and variables that can be used are summarized here in detail. Notes about pyKNP

References / Code

--JUMAN ++ container yamitzky / jumanpp -Use JUMAN ++ from Python -Prepared the Japanese environment for the Debian container set up with Docker

Recommended Posts

I made a Docker container to use JUMAN ++, KNP, python (for pyKNP).
A memo when setting up a Docker container for using JUMAN ++, KNP, python
I made a python dictionary file for Neocomplete
[Python] I made a decorator that doesn't seem to have any use.
I made a cleaning tool for Google Container Registry
I made a VM that runs OpenCV for Python
I made a Python module to translate comment outs
[Python] I made a classifier for irises [Machine learning]
I made a python library to do rolling rank
I made a python text
[Python] I want to use only index when looping a list with a for statement
I made a package to filter time series with python
[VSCode] I made a user snippet for Python print f-string
How to implement Python EXE for Windows in Docker container
I didn't know how to use the [python] for statement
Use a scripting language for a comfortable C ++ life-OpenCV-Port Python to C ++-
I made a Line-bot using Python!
I made a script in Python to convert a text file for JSON (for vscode user snippet)
I made a fortune with Python.
I created an environment for Masonite, a Python web framework similar to Laravel, with Docker!
I made a function to crop the image of python openCV, so please use it.
How to delete a Docker container
I made a daemon with Python
I made a library to easily read config files with Python
I want to use a wildcard that I want to shell with Python remove
Python> I made a test code for my own external file
I made a lot of files for RDP connection with Python
[Introduction to Python] How to use the in operator in a for statement?
I made a development environment for Django 3.0 with Docker, Docker-compose, Poetry
I made a scaffolding tool for the Python web framework Bottle
I made a library that adds docstring to a Python stub file.
I made a Python wrapper library for docomo image recognition API.
I made a dash docset for Holoviews
I made Othello to teach Python3 to children (4)
I made a payroll program in Python!
I made a character counter with Python
I made Othello to teach Python3 to children (2)
I want to use jar from python
I want to build a Python environment
[Python] Organizing how to use for statements
I made Othello to teach Python3 to children (5)
I made a script to display emoji
I made a Hex map with Python
How to use "deque" for Python data
After studying Python3, I made a Slackbot
I made a roguelike game with Python
I made Othello to teach Python3 to children (3)
I made Othello to teach Python3 to children (1)
I made a simple blackjack with Python
I made a configuration file with Python
I made a library for actuarial science
A textbook for beginners made by Python beginners
I made a neuron simulator with Python
Until a Docker beginner deploys a delusional microservice made in Python to Fargate
I made a password generator to teach Python3 to children (bonus) * Completely remade
I made a tool to automatically browse multiple sites with Selenium (Python)
I made a web application in Python that converts Markdown to HTML
I tried to discriminate a 6-digit number with a number discrimination application made with python
Environment maintenance made with Docker (I want to post-process GrADS in Python
I made a script in python to convert .md files to Scrapbox format
Tips for Python beginners to use Scikit-image examples for themselves 3 Write to a file