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.3.tar.gz
(64.3 kB
view hashes)
Built Distributions
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d79ecff895b6c9ee793811c7be64cd4abd63d398bae6038dbf28eef2980ace96 |
|
MD5 | 8abce208889a9fbfa4413c5128ac4142 |
|
BLAKE2b-256 | 90dd34a86b3d503a068b5c50915eace0e6ab8248cc473fb2b3cf48f8f376aeca |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bc32811bd845b060be852a23e9785c4b70d9437cdfd24755be61ac2efa363de |
|
MD5 | 360c986807cd08d9f412d0863afc602b |
|
BLAKE2b-256 | bf98ac8703f84a55e08ad2d6596ccc69538cd06a6dea38101d8178d2e285c22d |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 598ffe8bb1e71ef6eab9bd8f22ee23b4323a254cd0c8000c57a1a0ba31dbbab5 |
|
MD5 | e0c74add96213e2466018521c3e75849 |
|
BLAKE2b-256 | 6e7052045e19d99bc49c9c57e7274e136fc485df7686b9d9fb7e041234c3210e |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00989e1568e33a50a740c8df0eab4fac343e41372935a5a35839bbec95a8508e |
|
MD5 | f6c230acdd983b59b466677a0e59f04d |
|
BLAKE2b-256 | 5ec03cd0c9d341fd3c5fb5670c1501195fab224a93f282c7056503e396b136fb |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 441b99b9c3f0fa4d9124c8972e462df68238173bc10ccf5680a7746cc13b76e7 |
|
MD5 | 5151cbf292462b0cb3ea9e7869cde4f5 |
|
BLAKE2b-256 | 7ffbb3a1330c0e4bc78f5eedf536b92ec794b626ec5b34a0df22e39ad994df5b |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15b1510eb507b662808349b9c08778bb4a8c92e66a76522d110d6129c8d6f94 |
|
MD5 | 4568bd21a7542fc3f2bd28d94ac554d6 |
|
BLAKE2b-256 | fbae93408f26ec0ca0fc408ff32508de15a2377a3bbb55000085bfd9f2125057 |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a03be1bed637a3640df56ab95da7b747b77afa74ebfef4da9d6b66b6a6eda17 |
|
MD5 | 4e8e70be42869bc8f1cedc812c027c62 |
|
BLAKE2b-256 | b151daf7b66e7b3825d02fb3d7702e8171a84471fe8fece5b3e10c4632f37469 |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a801838c5669f891a99d10a8988a82b9f16e6a593febe0be0b77674a78dceeb1 |
|
MD5 | b0c3d94f75a599d52548087efc55c59a |
|
BLAKE2b-256 | 7a26135eecce79f0249ff61f9d06d2a51b67575bde2df1820d43d1e48196d9ea |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64964f1b4df3990a4098634aa2a99f80ce068710372be77c41859818e3a9354d |
|
MD5 | 3a4fb8efd640bad793bd7c1b73d72909 |
|
BLAKE2b-256 | 2cd1429652a8c9b78b5cbe62abf94c84b6370d2c19f74ed4273a4b2e2e9673f9 |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bed204ed3e7daee4ca6926942bb1adf83ad94bfd5cd97e92ba4aa570b34e7e2d |
|
MD5 | 70d68d11fb63c952c3f4deb9b2579f9e |
|
BLAKE2b-256 | d8237d5e7e4b5c1048d2394bb50ca50a48770f2b2cb7eb21c854ca3b09502a10 |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b172cebe8941f0217824290ea15f44d0b8fa65e741c7541de83fa37009ac6c3 |
|
MD5 | 23f0e9f5df0c3743600ea851333d1960 |
|
BLAKE2b-256 | d62675e0f1a6ca79a08c948bf0f12d193b3d0b850bef3f829d18481e9a42d7bf |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b57971d5270deb868820138d1e0cf5c952eda17fb5c4027bcd86198db0848b44 |
|
MD5 | fe8ae710bf22339c33832b21099d1cae |
|
BLAKE2b-256 | c9d9bf975604fc1d824da6ee5e3408d7f0961292e2d0e75cebcf76422539cccb |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed3ab155eff5cd924b6099fe02f609881e2ee6af87a9e997d76ac23b0c0abeb6 |
|
MD5 | 7ad309010bed6249c2480bf06bea846d |
|
BLAKE2b-256 | 57e9f5745ce1bd88ed71ccec7bdaf0dd757e48db92206192cb2accaa0699fa81 |
Close
Hashes for autocorrect_py-2.5.3-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5130b4ecfd1e41dc7e8bc311e5ae2f4d17ee9ba1b6671a3a14133da2e1523630 |
|
MD5 | 4f7f52bbbe4a597778e1d3bcd473cae4 |
|
BLAKE2b-256 | 6b0c406bc2a2f3220ffa55d758ba00a2e66a8639ce8b20dd6bc7a340bac210e8 |