Skip to main content

A Python module which allows for the easy frequency analysis of Japanese text

Project description

JPFreq

Tests Docs License: MIT Code Style: Black Ruff

JPFreq is a frequency processor for Japanese text. It uses the Cython wrapper for MeCab Fugashi to process Japanese text.

Installation

  1. Install Fugashi and Unidic
    pip install fugashi[unidic]
    python3 -m unidic download
    
  2. 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)

Uploaded Source

Built Distribution

jpfreq-0.4.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

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

Hashes for jpfreq-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ae927217f06cfe621f1a36c71acb91e3e70877d5f53ac7dd2e2abbe5d5337d36
MD5 c5cec3d64b8348ab52c436a4029b375e
BLAKE2b-256 68e50fafb1636da1486298b584eabccb81db5f8413811a5c65e14eb7b7b7985e

See more details on using hashes here.

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

Hashes for jpfreq-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d070e1aae4e22816650f6ca274598c32225b2ed413d63f43434960b165045fb
MD5 44a846872b7a897199322656f42f1e5e
BLAKE2b-256 9a545298d70a1bce3f5d4d6e72c4bb2405cf4ef124cb46bf4e12ac592f584877

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page