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.5.tar.gz
(64.6 kB
view hashes)
Built Distributions
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98b4d3f990dedf4503cbc46ce7905d6fb6dfa3174e9c299e39269edfe793e19c |
|
MD5 | a5e91aa5e617c4b47c11aff4b611b654 |
|
BLAKE2b-256 | 23b89ccf5ae8fa8b7b567bf1b7f103c51d3052b9dc014ed405776f0731c548a0 |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86589520c91066a6ea9d85356d9b477764a7b06241be5bc424ec128f714ae0dd |
|
MD5 | 130119eb22089921cef75d01c9109922 |
|
BLAKE2b-256 | e0ac396a06218116b14f2fb8aa1056386a273328de5b6843055219842e936c90 |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab87e6625c587237659f3733428bc8eb930bceabd88ab1719a2066d914b97e76 |
|
MD5 | 5227b9ee07c338e217ea3e1fb9004f11 |
|
BLAKE2b-256 | 581f767ea8896a7e06f9a057bca5adb32c13865e9331d486f1d0bcd664b9a2a1 |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c3b9240ad67501526cb045a7fb75c60d065e68fd667958ed9344e883a59a74e |
|
MD5 | 70010224cac2c98d12941177610d5fcb |
|
BLAKE2b-256 | 24615c788a162fa87379d10bf5bec58fc17d5cb2ee9337a6105501f4a5082acd |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7d6f0aac7db48a8f0686a6afaf1a2c51912b025af65ce7161127bdc3555efd0 |
|
MD5 | 00964dd2a637ba4ef7f580b60819792c |
|
BLAKE2b-256 | 79a66760b051a8455c4aaa0f79896d2aaf4223f052da0cb4f62648f4e9d17ca9 |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a01af1093b7f070cc0cb5dd8c136689c2d769ce0b2e9b7d64fb936fab31ad68e |
|
MD5 | 74ea6e0b1ad500cd36c6e83a89bb24c5 |
|
BLAKE2b-256 | cf78a69b470ea3e93e7a99ef987e95e03abab9064c66970a0214f629350045ce |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e441adbe047a1ffb4bbcfff8e57e3b1b29c849fcb658d4a3002bb0114600c3c2 |
|
MD5 | a9e30e92c550b0dccce073bbd653260a |
|
BLAKE2b-256 | 2b2aa1738411971c987b224315168fe22e8a82f11514e70b78b4b88754dc21d4 |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e86461557fae0f8e88221e48b2edc67b89f2a92a51e879e4cdbd27ec2580856 |
|
MD5 | 13fab0753a4b8e44e0428f666d5f0322 |
|
BLAKE2b-256 | 65776e0d092e5d18c724964ee45e1cdf55eadd6474a80f128fd758e8d34c94bd |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d0e5e7e4773a2cd4286d41d7be28dee14ec297e72f12f35137346e35817188 |
|
MD5 | b19c6231b5130a1715e5fc4c61a4af02 |
|
BLAKE2b-256 | 2f6ddb249e46aac62f142c1943e318abc38b43a2452f6467db3ed4bc79af3dec |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a2522f301dfb2a6f93d3187423ac901db6696ff8a9ec56428a6a5a31986510a |
|
MD5 | 5b6db11ac6adde6dcf8475953f55290a |
|
BLAKE2b-256 | 179e509094b49eebd80662392b68ca53e32c300b3450f35468ad0526bbe02394 |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95abe75bfffdcc99d007ab232af0d00d5b4af4abe901b12870dac4b82f7f09eb |
|
MD5 | 6d297b018e9c2d7601667393d9b72b18 |
|
BLAKE2b-256 | 7b5f427605195ec85a43b3640ad4c0f27b3e4fb42c82e0bb9b47f07417ad8dcb |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35cf36d6a821eae93c790ffc3c1fa6293e77f8a8900ff8308244ec8cadd19411 |
|
MD5 | e05b06003677d8975a75b89f1a517d63 |
|
BLAKE2b-256 | aa26b63e3eb72181d3695edaf8f68b06cd1b810e88dda42bb9b88cf76bef1cdb |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67049f9fa55437be282052bac9597f6a82e208bec14cb1dfc2aa4673d0be6065 |
|
MD5 | 3902ebda6a1d8468e76785ba33f1e81e |
|
BLAKE2b-256 | 9f1ecd87b60a8667107c7cc527ff7f5897c5f14beed490ff8bb65dc99e498f1a |
Close
Hashes for autocorrect_py-2.5.5-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d33d2cb51d9ec2cec6618d189086e9538e6e1c8f0cd3b2d36e5ba2d8df8a465f |
|
MD5 | 2bef648c1125f5daea9750cc585a59a3 |
|
BLAKE2b-256 | 5a1b7aacbfbaf4d1b197d62662a460487d6fe9bcf82dd9984c965494950c1a54 |