中文錯誤類型文字增量
安裝
pip install zh-mistake-text-aug
使用 (Pipeline)
from zh_mistake_text_aug import Pipeline
import random
random.seed(7)
pipeline = Pipeline()
augs = pipeline("中文語料生成")
for aug in augs:
print(aug)
type='MissingWordMaker' correct='中文語料生成' incorrect='中文料生成' incorrect_start_at=2 incorrect_end_at=2 span='語'
type='MissingVocabMaker' correct='中文語料生成' incorrect='語料生成' incorrect_start_at=0 incorrect_end_at=2 span='中文'
type='PronounceSimilarWordMaker' correct='中文語料生成' incorrect='中文語尥生成' incorrect_start_at=3 incorrect_end_at=3 span='尥'
type='PronounceSameWordMaker' correct='中文語料生成' incorrect='諥文語料生成' incorrect_start_at=0 incorrect_end_at=0 span='諥'
type='PronounceSimilarVocabMaker' correct='中文語料生成' incorrect='鍾文語料生成' incorrect_start_at=0 incorrect_end_at=2 span='鍾文'
type='PronounceSameVocabMaker' correct='中文語料生成' incorrect='中文预料生成' incorrect_start_at=2 incorrect_end_at=4 span='预料'
type='RedundantWordMaker' correct='中文語料生成' incorrect='成中文語料生成' incorrect_start_at=0 incorrect_end_at=0 span='成'
type='MistakWordMaker' correct='中文語料生成' incorrect='谁文語料生成' incorrect_start_at=0 incorrect_end_at=0 span='谁'
可用方法
from zh_mistake_text_aug.data_maker import ...
| Data Maker | Description |
|---|---|
| MissingWordMaker | 隨機缺字 |
| MissingVocabMaker | 隨機缺詞 |
| PronounceSimilarWordMaker | 隨機相似字替換 |
| PronounceSimilarWordPlusMaker | 編輯距離找發音相似並且用高頻字替換 |
| PronounceSimilarVocabMaker | 發音相似詞替換 |
| PronounceSameWordMaker | 發音相同字替換 |
| PronounceSameVocabMaker | 發音相同詞替換 |
| RedundantWordMaker | 隨機複製旁邊一個字作為沆於字 |
| MistakWordMaker | 隨機替換字 |
| MistakeWordHighFreqMaker | 隨機替換高頻字 |
| MissingWordHighFreqMaker | 隨機刪除高頻字 |
Metadata
Release files for zh-mistake-text-aug 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zh-mistake-text-aug-0.2.1.tar.gz | 18.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zh_mistake_text_aug-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.4 kB
Release files / zh-mistake-text-aug-0.2.1.tar.gz
| Download URL | zh-mistake-text-aug-0.2.1.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c837d77770796483883adeef38342b447838c583f5853e28c77830a3b4da64e1
|
|
BLAKE2b-256 checksum How to use checksums |
904fb79afd8c8be9a599d7d193f6a0dc9caf44eb17ba6e107ddf4ef9695cce83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Linux/5.4.0-125-generic
|
Release files / zh_mistake_text_aug-0.2.1-py3-none-any.whl
| Download URL | zh_mistake_text_aug-0.2.1-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db085a11f73cb0c540c0aa99a30106bee9e175c9f9e8bf8c15b6655999b4a75f
|
|
BLAKE2b-256 checksum How to use checksums |
75dfd65678a0121c96b4bfad13e6b5271ccda2e1ae0d23eccf9a4a30fba0f283
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Linux/5.4.0-125-generic
|
Security for zh-mistake-text-aug 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.