Jadoc: Tokenizes Japanese Documents to Enable CRUD Operations
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)
| File | Size | Uploaded | |
|---|---|---|---|
| jadoc-0.2.5.tar.gz | 16.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|