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.4.1.tar.gz
(62.6 kB
view hashes)
Built Distributions
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22dc2222f4729927c0a2c4d9a0c965b473145f9ae449a08688668b1a682b6dad |
|
MD5 | ef3549e95f9e5c3eeb87e17cbecb0c11 |
|
BLAKE2b-256 | 69c666ddcb2223ec5d82a8d066d9be8a989caafa5f8cbf84fe6a3ad2eaae4fbb |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7c17927497190b3a3fd76bac2375e14f889ec6930641e55d9f157c4b4c1126f |
|
MD5 | 4acf05db81bea8c4ba36f09c41d16fbb |
|
BLAKE2b-256 | 475efdf4e718c8c536c89df0e0785f8d06b82c588af3664dcefb86b266fd54f3 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed635c9f199db1f79b05f0d535b9caea5a3a7de068c3b447f7acd87670d22493 |
|
MD5 | 177a2c1d13c538cf26026e38c1faf7d2 |
|
BLAKE2b-256 | c6d6a0e67504192be36d4226d62f755b4f6e284a22cdbbd1651b0cedab21cf85 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3dffdc4101e4df0e7e3e9d6db24b35f178e6ccfced9fb63865fb525444d9be9 |
|
MD5 | b0dc96c2eb8b81ad69f6d83dec5fe595 |
|
BLAKE2b-256 | 852e5784f77f1f5879df67b601acc1d6881d9f3db950588f185080b11dd0bb8d |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 157bbb2ae5b19538b6c91727ba87eadf8e7fb7a742eeb2a5bf26737be99fd0fd |
|
MD5 | c6cd6a04b8397096a5de48d4ed39be31 |
|
BLAKE2b-256 | 800fedd4fbb5e3ff86894724373d08e17af2487e3064b712df00f21e2a54fb98 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4023d69b10ab38f007b93d968f7ddea5464e7ed69321981be03f4f6adf9845f |
|
MD5 | 218e8dd441be8e8ea55b958e445dbe41 |
|
BLAKE2b-256 | e5b35518c259d49f6c8ef9ea38c2b23376a4791a36480979a47267b655354629 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb1c776c20b24d6be3433a77393a6f62b1f3047593a8bd313c721c571130b41b |
|
MD5 | 77977d90899fd306e30767656cdfa412 |
|
BLAKE2b-256 | d512195fb6323a620fb7e74f3fbf1dee3f3718317e86696c47c02b53181dc9d3 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ac5361c8a53eac9c347cdcec0ea00211276a16362f3cc2e08054610434c9139 |
|
MD5 | 3b13e6e956b488612a9532f6e46846d8 |
|
BLAKE2b-256 | dbbcc16876b9b1b73b26d3822a7fe08956600e60a3c0e7b8f79a316e5c92c725 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 597f7eceed4b1799db1e3a05499dc828a7306da83d13ba5d450ca0ec1bb73f81 |
|
MD5 | 768ad1417906593704a2e1a21a337a38 |
|
BLAKE2b-256 | e9530414a16a7bd6f3fce02a05caadfbb3c8de826f841ff3282dcb5afd237c18 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4b1b6b165dc0aa28724e5e389009d3b1352087ef16442e931799d54bcf905bf |
|
MD5 | 7f4aee8be0408f6a765ec9ea051bbca0 |
|
BLAKE2b-256 | 6a0fa14db9c084964112696f5ec29603057853fd677c68bf41d53eed0076885e |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65ae833de0b6838d7b9e5f98ecc60aa1b8da19d2b19b21611c471620121cb572 |
|
MD5 | f087abefeaf796690b4cf38f744d5dc5 |
|
BLAKE2b-256 | 58f44e1616034ed31c8629c86d0a63269b939881bf2cb916d8037a3554aeeb39 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 433d0894303116cdf79f9bc28dda69c43beb1baee51061d4bae80602c00329a2 |
|
MD5 | 4f444e68a96937510db6151efecccb83 |
|
BLAKE2b-256 | f554f97a4b3c22f9ba6c0bda81eda6bf6926f6eb248acfb479901d0bbf9a5bad |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5011428bf0ea3d0a3002c303c2e07703555accf9050738e3988e30270a19e370 |
|
MD5 | 6b835fc2ef3483048a13a91b90415511 |
|
BLAKE2b-256 | 80f16092130095ca462ace531f9383e05bf970caf1c7c3bd60404d55ff2524a8 |
Close
Hashes for autocorrect_py-2.4.1-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e716d3db5fe725ecf16a0b6759e9f4d9619e637740306ef7c7a55704665ae7cb |
|
MD5 | efb7cb77680f70590922f33bef6be6d1 |
|
BLAKE2b-256 | 0a661f688c02dedb1911af23930c8cf7f14943306f558c004a1b29e86e7c1f7f |