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.4.0.tar.gz
(38.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
jpfreq-0.4.0-py3-none-any.whl
(14.5 kB
view details)
File details
Details for the file jpfreq-0.4.0.tar.gz.
File metadata
- Download URL: jpfreq-0.4.0.tar.gz
- Upload date:
- Size: 38.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae927217f06cfe621f1a36c71acb91e3e70877d5f53ac7dd2e2abbe5d5337d36
|
|
| MD5 |
c5cec3d64b8348ab52c436a4029b375e
|
|
| BLAKE2b-256 |
68e50fafb1636da1486298b584eabccb81db5f8413811a5c65e14eb7b7b7985e
|
File details
Details for the file jpfreq-0.4.0-py3-none-any.whl.
File metadata
- Download URL: jpfreq-0.4.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d070e1aae4e22816650f6ca274598c32225b2ed413d63f43434960b165045fb
|
|
| MD5 |
44a846872b7a897199322656f42f1e5e
|
|
| BLAKE2b-256 |
9a545298d70a1bce3f5d4d6e72c4bb2405cf4ef124cb46bf4e12ac592f584877
|