A linter and formatter for help you improve copywriting, to correct spaces, words, punctuations between CJK (Chinese, Japanese, Korean).
Project description
AutoCorrect for Python
The Python version of AutoCorrect.
- Rust - autocorrect
- Ruby - autocorrect-rb
- Go - autocorrect-go
- Python - autocorrect-py
- Node.js - autocorrect-node
- JavaScript (Browser) - autocorrect-wasm
- Java - autocorrect-java
Installation
$ pip install autocorrect-py
Usage
import autocorrect_py as autocorrect
autocorrect.format("Hello你好.")
# => "Hello 你好。"
autocorrect.format_for("let title = 'Hello你好。'", "js")
# => "let title = 'Hello 你好。'"
result = autocorrect.lint_for("<h1>这是 Heading标题</h1>", "html")
print result
# => LintResult(filepath='html', lines=[LineResult { line: 1, col: 5, new: "这是 Heading 标题", old: "这是 Heading标题", severity: Error }], enable=true)
# Load config
autocorrect.load_config('{ textRules: { "你好hello": 0 } }')
autocorrect.format("Hello你好.")
# => "Hello 你好。"
autocorrect.format("你好hello.")
# => "你好hello."
# Ignorer, if /path/to/workdir contains .autocorrectignore or .gitignore
ignorer = autocorrect.Ignorer('/path/to/workdir');
ignorer.is_ignored('README.md');
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
autocorrect_py-2.5.8.tar.gz
(93.1 kB
view hashes)
Built Distributions
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97c45aeec745efc13c7116de84abc59f5cd0d261b360bb9b14b47cecc4e86faf |
|
MD5 | 10c9fb993c2064b5efec8424b357374c |
|
BLAKE2b-256 | b55c9113af718162ffcf28d7f493e8405b84d3aafc46513860ff228e3d93a8db |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0b44cb7d24cb02fc3f29bc9df79d86a26aafc5c17f1835efa2287fe41829ba |
|
MD5 | fc258e0d527bb3027a97ed1de6bda9b9 |
|
BLAKE2b-256 | a90cf86cbdc5f6d77eda8837ac9438c0b2e35019099f182acbc279746d8f8acf |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b1bf808c5af9343ca8a7d35ce6ea2ded47e24e620c7ade6901810c87c9025e |
|
MD5 | 660b99c3f82955e8f82822269f222b28 |
|
BLAKE2b-256 | eb99ce50306f04e43be81f217e5b66ab8370d699cb91dd67b04783f84ff5e667 |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62e9a608a7f95d63c48d7c2c8c8efb95724fbcc5d518977f93e90a2e8f489505 |
|
MD5 | f753aefc4904f275b6d9d1216eac3684 |
|
BLAKE2b-256 | c6209418e0599ffe4f3f56c4e6795ddddeb3ffb8c885bf171549dbe52e796e75 |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79ff2774c5e88c30a09719a304309e93057c4af1e894971c6e8f12b63e6b04e4 |
|
MD5 | de065a98aa5d22f96c25904f68aae5af |
|
BLAKE2b-256 | 94724cdfc85d6bfce3c1ec17cbb2d3fac623b974a1075417d91f0c23fcadc50f |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58464c6bc595a2fcaf14a901bd9c70cfa0b4db41158797b10acc340fae187bae |
|
MD5 | eb4bff8eb94800d17123420eadc98d78 |
|
BLAKE2b-256 | 85745585cdbb25bc3e1aa939b45c125f3113cbdf731510ff26e155fd3e2f4ea2 |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 837adbc77f39c09bc5509ee4fcfe0ac18d52754306600903bf0d434675679a57 |
|
MD5 | 350a3590e7a43b7fe604240d2c693e13 |
|
BLAKE2b-256 | 3a5802bd4d10bed7738b0de2652d2de3a16b5fec5a06294bb6b26c3af7365c94 |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0270beee1d6a9ff2638dc805e9e6b0a4ce3f204ac91f9856b55da0b7a35356da |
|
MD5 | d775cca02d9c20476a1916cec675c72c |
|
BLAKE2b-256 | c5a7e34ddf19fe54ed20c8d299bf48bb4b0a4016a09d6778a5f5be0c3dcf0264 |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7328fc2b376544a542850888127f05e00d3e6844f13014c8844a105c65f7f3d |
|
MD5 | 8f6d8e38ab1ff275d66e9d00af0fec99 |
|
BLAKE2b-256 | 9b08436498a6ecb5ca94a9c5fa0f95ec9edcc18dd743eb482c774489ae5ea469 |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b8425e60a3f8cde2e6f0140ef80cf4a6e625af62f9c95406ce02dc3aba280b0 |
|
MD5 | dccd4271f10eba0f0a40fcfeb6442744 |
|
BLAKE2b-256 | 889108d15c1a8a9e1b0aae8936d07420ff26031ba5ec5d9621168ce808352622 |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8af5447e31cd2a9953f70464a9acc167b5c790785d4291c0c6f596e108294d43 |
|
MD5 | f402fa9c3d9fe2d2f51ffb06c2ff5671 |
|
BLAKE2b-256 | 47b9076d9e1ecaab2372927f29ed63b87bba84a0b8845a3a447bf24ca01b4dfc |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fe0334142551e105e7b77e7be5fb669b5c62eb5a3067ff8169ca8b62d3baf58 |
|
MD5 | 1f2fe59f3eec1fa60a7878b555014127 |
|
BLAKE2b-256 | 67162c9cc405039573cf948e87b262f6096ba8fb81477b2fae312fb14ee5edbf |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7724a5fdf13da1242627591df4b27a8ea677808ded384f4247af4f4781545cfd |
|
MD5 | 84d850cf121ed4bd07d8950ae212ae14 |
|
BLAKE2b-256 | 1647af1d9a8c0e3471bde104902bb8bafb152f2535763dc2edb0da32bf24b9be |
Close
Hashes for autocorrect_py-2.5.8-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 931d24612c133d2c2eb4d264ecb7c78c42e60aa240f7be14885066ecd71c6cd6 |
|
MD5 | 7132bc94e1926e65e032f444b92fffb2 |
|
BLAKE2b-256 | 4038499a838c15a32aee11662f572aaf55075745aa0238f626288397a718c860 |