Skip to main content

Jadoc: Tokenizes Japanese Documents to Enable CRUD Operations

PyPI Version Python Versions License Code style: black Imports: isort

Installation

Install MeCab

MeCab is required for Jadoc to work. If it is not already installed, install MeCab first.

Install Jadoc

$ pip install jadoc

Examples

from jadoc.doc import Doc


doc = Doc("本を書きました。")

# print surface forms of the tokens.
surfaces = [word.surface for word in doc.words]
print("/".join(surfaces))  # 本/を/書き/まし/た/。

# print plain text
print(doc.get_text())  # 本を書きました。

# delete a word
doc.delete(3)  # Word conjugation will be done as needed.
print(doc.get_text())  # 本を書いた。

# update a word
word = doc.conjugation.tokenize("読む")
# In addition to conjugation, transform the peripheral words as needed.
doc.update(2, word)
print(doc.get_text())  # 本を読んだ。

Metadata

Release files for jadoc 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jadoc 0.2.5
File Size Uploaded
jadoc-0.2.5.tar.gz 16.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jadoc 0.2.5
File Interpreter ABI Platform
jadoc-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 35.6 kB

Release files / jadoc-0.2.5.tar.gz

Download URL jadoc-0.2.5.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3e627fcf9ad00c5b179bb885fd845168f96b0c9945a006d5d466694d14ce1417
BLAKE2b-256 checksum
How to use checksums
d45c93a0656a94df309bdfc05e30d45923db2225921a45869b38a7b3b0d91ba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/4.18.0-240.1.1.el8_3.x86_64

Release files / jadoc-0.2.5-py3-none-any.whl

Download URL jadoc-0.2.5-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85c7ffd8652eeb96089e204bbafd4b383fc068e49270c4880331e2c32a54d7ef
BLAKE2b-256 checksum
How to use checksums
52dd7c32cb55247b1c3e6747943910ed68cc177b7ab59de8015ca364b324b58b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/4.18.0-240.1.1.el8_3.x86_64

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page