A Python module which allows for the easy frequency analysis of Japanese text
Project description
JPFreq
JPFreq is a frequency processor for Japanese text. It uses the Cython wrapper for MeCab Fugashi to process Japanese text.
Installation
- Install Fugashi and Unidic
pip install fugashi[unidic] python3 -m unidic download
- Install JPFreq
pip install jpfreq
Usage
For detailed usage, see the documentation.
Getting the most frequent words
from jpfreq.jp_frequency_list import JapaneseFrequencyList
freq_list = JapaneseFrequencyList()
freq_list.process_line("私は猫です。")
print(freq_list.get_most_frequent())
Reading from a file
from jpfreq.jp_frequency_list import JapaneseFrequencyList
freq_list = JapaneseFrequencyList()
freq_list.process_file("path/to/file.txt")
print(freq_list.get_most_frequent())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jpfreq-0.2.2.tar.gz
(32.3 kB
view hashes)
Built Distribution
jpfreq-0.2.2-py3-none-any.whl
(14.1 kB
view hashes)