Japanese morphological analysis using Janome

I checked how to use Janome, so I made a note.

What is Janome?

Janome

Janome is a dictionary comprehension morphological analyzer written in Pure Python. We aim to be a morphological analysis library with a simple API that can be easily installed without dependent libraries and easily incorporated into applications.

I feel like I'm going to try it out, so I decided to use Janome, which seems to be the easiest to use in Python. Compared to Mecab, it's easier to use with just pip install. For other Japanese morphological analysis tools, see the summary of here.

How to use Janome

Excerpt from the official website.

from janome.tokenizer import Tokenizer
t = Tokenizer()
for token in t.tokenize(u'Of the thighs and thighs'):
    print(token)

About the output of Tokenizer

When the result of Tokenizer.tokenize is output by print, it looks like this.

Is verb, non-independent, \ *, \ *, one-step, uninflected, is, il, il

According to here, from the left, "original word", "part of speech", "part of speech subclassification 1", "classification 2", "classification" 3 ”,“ inflected form ”,“ inflected form ”,“ original form ”,“ reading ”,“ pronunciation ”.

The result of tokenize has the following string properties.

--surface: original word --part_of_speech: [Part of speech], [Part of speech subclassification 1], [Category 2], [Category 3] --infl_type: Inflected form --infl_form: Utilization type --base_form: Prototype --reading: reading --phonetic: Pronunciation.

Recommended Posts

Japanese morphological analysis using Janome
Japanese analysis processing using Janome part1
Python: Japanese text: Morphological analysis
Japanese morphological analysis with Python
■ [Google Colaboratory] Use morphological analysis (janome)
Try using the Chinese morphological analysis engine jieba
Morphological analysis tool installation (MeCab, Human ++, Janome, GiNZA)
Data analysis using xarray
Data analysis using Python 0
Orthologous analysis using OrthoFinder
100 language processing knock-30 (using pandas): reading morphological analysis results
[Python] Morphological analysis with MeCab
Natural language processing 1 Morphological analysis
Japanese NLP @ janome / spaCy / Python
■ [Google Colaboratory] Preprocessing of Natural Language Processing & Morphological Analysis (janome)
Data analysis using python pandas
Morphological analysis using Igo + mecab-ipadic-neologd in Python (with Ruby bonus)
[PowerShell] Morphological analysis with SudachiPy
Japanese Natural Language Processing Using Python3 (4) Sentiment Analysis by Logistic Regression
Feature extraction by TF method using the result of morphological analysis
From the introduction of JUMAN ++ to morphological analysis of Japanese with Python
Precautions when using TextBlob trait analysis
100 language processing knocks 2020: Chapter 4 (morphological analysis)
100 Language Processing Knock 2020 Chapter 4: Morphological Analysis
Text mining with Python ① Morphological analysis
Face recognition using principal component analysis
100 Language Processing Knock Chapter 4: Morphological Analysis
■ [Google Colaboratory] Use morphological analysis (MeCab)
Using Japanese with Rodeo's IPython @ Windows
Search / list synonyms using Japanese WordNet
I played with Mecab (morphological analysis)!
Recommendation of data analysis using MessagePack
Image binarization using linear discriminant analysis
[PyTorch] Japanese sentence generation using Transformer
[Language processing 100 knocks 2020] Chapter 4: Morphological analysis
100 Language Processing Knock 2015 Chapter 4 Morphological Analysis (30-39)
Recommendation tutorial using association analysis (concept)
From preparation for morphological analysis with python using polyglot to part-of-speech tagging