Skip to main content

A Cython wrapper for MeCab

Project description

fugashi

Fugashi is a Cython wrapper for MeCab. It doesn't attempt to cover all of the potential use cases of MeCab, instead dealing with only the most common ones.

  • Only UniDic is supported, you can't use IPADic. UniDic Neologd is fine.
  • Only UTF-8 is supported.
  • Only Python3 is supported.

Usage

from fugashi import Tagger

tagger = Tagger('-Owakati')
tagger.parse("麩菓子(ふがし)は、麩を主材料とした日本の菓子。")
# => '麩 菓子 ( ふ が し ) は 、 麩 を 主材 料 と し た 日本 の 菓子 。 \n'
for word in tagger.parseToNodeList("麩菓子(ふがし)は、麩を主材料とした日本の菓子。"):
    print(word, word.feature.lemma, word.pos, sep='\t')
    # "feature" is the Unidic feature data as a named tuple

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fugashi-0.1.1.tar.gz (45.4 kB view details)

Uploaded Source

File details

Details for the file fugashi-0.1.1.tar.gz.

File metadata

  • Download URL: fugashi-0.1.1.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for fugashi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 423f5be9e3d2183659aff303e252b4e7803a7c04fa02917523b9ecd1aa75f5e2
MD5 2a696db684239e467bf99896ec0f3068
BLAKE2b-256 eeaeb362012956a8a74068f5a73bad6c26809d5bf0be967c24b1bdf0007fb566

See more details on using hashes here.

Supported by

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