Skip to main content

Japanese text preprocessor for Text-to-Speech application (OpenJTalk rewrite in rust language).

Project description

jpreprocess (python binding)

Japanese text preprocessor for Text-to-Speech application.

This is a python binding of jpreprocess, which is written in Rust. The rust library is published in crates.io.

JPreprocess (the base code written in Rust) is a rewrite of OpenJTalk.

Usage

Unlike pyopenjtalk, this package does not include support of marine and TTS.

Currently, this package is for text processing only.

Run text processing frontend

import jpreprocess

j = jpreprocess.jpreprocess()
njd_features = j.run_frontend("本日は晴天なり")

assert njd_features[0].get("string") == "本日"
assert njd_features[0].get("pos") == "名詞"

Extract full-context label

import jpreprocess

j = jpreprocess.jpreprocess()
fullcontext = j.extract_fullcontext("本日は晴天なり")

assert len(fullcontext) == 21
assert fullcontext[0] == r"xx^xx-sil+h=o/A:xx+xx+xx/B:xx-xx_xx/C:xx_xx+xx/D:xx+xx_xx/E:xx_xx!xx_xx-xx/F:xx_xx#xx_xx@xx_xx|xx_xx/G:5_1%0_xx_xx/H:xx_xx/I:xx-xx@xx+xx&xx-xx|xx+xx/J:2_11/K:1+2-11"

Grapheme-to-phoeneme (G2P)

import jpreprocess

j = jpreprocess.jpreprocess()

assert j.g2p("おはようございます") == "o h a y o o g o z a i m a s U"
assert j.g2p("おはようございます", kana=True) == "オハヨーゴザイマス"

Copyrights

Please see README.md.

License

BSD-3-Clause

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

jpreprocess-0.1.3.tar.gz (1.9 MB view hashes)

Uploaded Source

Built Distributions

jpreprocess-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

jpreprocess-0.1.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

jpreprocess-0.1.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

jpreprocess-0.1.3-cp312-none-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

jpreprocess-0.1.3-cp312-none-win32.whl (1.3 MB view hashes)

Uploaded CPython 3.12 Windows x86

jpreprocess-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.12+ i686

jpreprocess-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

jpreprocess-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

jpreprocess-0.1.3-cp311-none-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

jpreprocess-0.1.3-cp311-none-win32.whl (1.3 MB view hashes)

Uploaded CPython 3.11 Windows x86

jpreprocess-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.12+ i686

jpreprocess-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

jpreprocess-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

jpreprocess-0.1.3-cp310-none-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

jpreprocess-0.1.3-cp310-none-win32.whl (1.3 MB view hashes)

Uploaded CPython 3.10 Windows x86

jpreprocess-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686

jpreprocess-0.1.3-cp310-cp310-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

jpreprocess-0.1.3-cp310-cp310-macosx_10_12_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

jpreprocess-0.1.3-cp39-none-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

jpreprocess-0.1.3-cp39-none-win32.whl (1.3 MB view hashes)

Uploaded CPython 3.9 Windows x86

jpreprocess-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

jpreprocess-0.1.3-cp38-none-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

jpreprocess-0.1.3-cp38-none-win32.whl (1.3 MB view hashes)

Uploaded CPython 3.8 Windows x86

jpreprocess-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

jpreprocess-0.1.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ s390x

jpreprocess-0.1.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ppc64le

jpreprocess-0.1.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARMv7l

jpreprocess-0.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

jpreprocess-0.1.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

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