Skip to main content

錯誤類型中文語料生成

安裝

pip install zh-mistake-text-gen

使用 (Pipeline)

from zh_mistake_text_gen import Pipeline
pipeline = Pipeline()
incorrect_sent = pipeline("中文語料生成")
print(incorrect_sent)
# type='PronounceSimilarVocabMaker' correct='中文語料生成' incorrect='鍾文語料生成' incorrect_start_at=0 incorrect_end_at=2 span='鍾文'

文檔

Pipeline

  • __init__

    • makers = None : maker實例,可選
    • maker_weight = None : maker被抽中的機率,可選
  • __call__

    • x : 輸入句(str),必需
    • error_per_sent: 每句要多少錯誤。預設:1
    • no_change_on_gen_fail: 生成方法失敗的時候允許不變動。啟用時不拋出錯誤,反之。預設:False
    • verbose=True : debug 訊息,可選

可用方法

from zh_mistake_text_gen.data_maker import *
Data Maker Description
NoChangeMaker 沒有任何變換
MissingWordMaker 隨機缺字
MissingVocabMaker 隨機缺詞
PronounceSimilarWordMaker 隨機相似字替換
PronounceSimilarWordPlusMaker 編輯距離找發音相似並且用高頻字替換
PronounceSimilarVocabMaker 發音相似詞替換
PronounceSimilarVocabPlusMaker 編輯距離找發音相似發音相似詞替換
PronounceSameWordMaker 發音相同字替換
PronounceSameVocabMaker 發音相同詞替換
RedundantWordMaker 隨機複製旁邊一個字作為沆於字
RandomInsertVacabMaker 隨機插入詞彙
MistakWordMaker 隨機替換字
MistakeWordHighFreqMaker 隨機替換高頻字
MissingWordHighFreqMaker 隨機刪除高頻字

Metadata

Release files for zh-mistake-text-gen 0.3.8

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

Source distribution (sdist)

Source distribution for zh-mistake-text-gen 0.3.8
File Size Uploaded Provenance
zh_mistake_text_gen-0.3.8.tar.gz 20.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zh-mistake-text-gen 0.3.8
File Interpreter ABI Platform
zh_mistake_text_gen-0.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 40.4 kB

Release files / zh_mistake_text_gen-0.3.8.tar.gz

Download URL zh_mistake_text_gen-0.3.8.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eeb5bca66736a43041fd56d6f831b3ce788214d1f2ba1591ad3baae3ab9f2c4f
BLAKE2b-256 checksum
How to use checksums
6d1ebbb90c73654246252a0b280b202427a6dd8d6e553f700858fd29bab8f031
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.4 Linux/5.4.0-1094-azure

Release files / zh_mistake_text_gen-0.3.8-py3-none-any.whl

Download URL zh_mistake_text_gen-0.3.8-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8bf106d3034c23bc235a585c6a315c1bb25e665d73bb745b2ce70485f196780
BLAKE2b-256 checksum
How to use checksums
52abc56e6b1d0a1123b99dc3ccc6dbb36c1383d36a2993c04cc87b0a6c76f67c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.4 Linux/5.4.0-1094-azure

Security for zh-mistake-text-gen 0.3.8

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.

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