Giter Club home page Giter Club logo

mecab-text-cleaner's Introduction

MeCab Text Cleaner

CI Status Documentation Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License

This is a simple Python package for getting japanese readings (yomigana) and accents using MeCab. Please also consider using pyopenjtalk (no accents) or pyopenjtalk_g2p_prosody (ESPnet) (with accents), as this package does not account for accent changes in compound words.

Installation

Install this via pip or pipx (or your favourite package manager):

pipx install mecab-text-cleaner[unidecode,unidic]
pip install mecab-text-cleaner[unidecode,unidic]

Usage

> mtc いい天気ですね。
イ]ー テ]ンキ デス ネ。
> mtc いい天気ですね。 --ascii
i] te]nki desu ne.
> mtc いい天気ですね --no-add-atype --no-add-blank-between-words
イーテンキデスネ
> mtc いい天気ですね --no-add-atype --no-add-blank-between-words -r kana
イイテンキデスネ
from mecab_text_cleaner import to_reading, to_ascii_clean

assert to_reading("     空、雲。\n雨!(") == "ソ]ラ、 ク]モ。\nア]メ!("
assert to_ascii_clean("      한空、雲。\n雨!(") == "han so]ra, ku]mo. \na]me!("

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

mecab-text-cleaner's People

Contributors

34j avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

mecab-text-cleaner's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Use matchDepNames instead of matchPackageNames

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency fugashi to v1.3.2
  • chore(deps): update pre-commit hook pycqa/bandit to v1.7.9
  • chore(deps): update pre-commit hook python-poetry/poetry to v1.8.3
  • chore(deps): update dependency pre-commit to v3.7.1
  • chore(deps): update dependency sphinx to v7.3.7
  • chore(deps): update pre-commit hook asottile/pyupgrade to v3.16.0
  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v3.27.0
  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.10.1
  • chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v4.6.0
  • chore(deps): update pre-commit hook srstevenson/nb-clean to v3.3.0
  • 🔐 Create all rate-limited PRs at once 🔐

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • actions/setup-python v4
  • pre-commit/action v3.0.1
  • actions/checkout v3
  • wagoid/commitlint-github-action v5.5.1
  • actions/checkout v3
  • actions/setup-python v4
  • snok/install-poetry v1.3.4
  • codecov/codecov-action v3
  • actions/checkout v3
  • relekang/python-semantic-release v8.7.2
  • relekang/python-semantic-release v8.7.2
.github/workflows/hacktoberfest.yml
  • browniebroke/hacktoberfest-labeler-action v2.3.0
.github/workflows/issue-manager.yml
  • tiangolo/issue-manager 0.5.0
.github/workflows/labels.yml
  • actions/checkout v3
  • actions/setup-python v4
.github/workflows/poetry-upgrade.yml
  • browniebroke/github-actions v1
pep621
pyproject.toml
  • poetry-core >=1.0.0
poetry
pyproject.toml
  • python ^3.8
  • fugashi ^1.3.0
  • attrs ^23.1.0
  • click ^8.1.7
  • pre-commit >=3
  • pytest ^7.0
  • pytest-cov ^3.0
  • myst-parser >=0.16
  • sphinx >=4.0
  • sphinx-rtd-theme >=1.0
  • unidecode ^1.3.6
  • fugashi ^1.3.0
pre-commit
.pre-commit-config.yaml
  • commitizen-tools/commitizen v3.20.0
  • pre-commit/pre-commit-hooks v4.5.0
  • python-poetry/poetry 1.8.2
  • pre-commit/mirrors-prettier v3.1.0
  • asottile/pyupgrade v3.15.2
  • PyCQA/autoflake v2.3.1
  • PyCQA/isort 5.13.2
  • psf/black 23.12.1
  • PyCQA/flake8 6.1.0
  • pre-commit/mirrors-mypy v1.9.0
  • PyCQA/bandit 1.7.8
  • srstevenson/nb-clean 3.2.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.