Skip to main content

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.

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


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.8.3.tar.gz (105.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

autocorrect_py-2.8.3-cp37-abi3-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.7+Windows x86-64

autocorrect_py-2.8.3-cp37-abi3-win32.whl (1.3 MB view details)

Uploaded CPython 3.7+Windows x86

autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ x86-64

autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_i686.whl (2.8 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ i686

autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_armv7l.whl (2.8 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARMv7l

autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARM64

autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.1 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ s390x

autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ppc64le

autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.6 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARMv7l

autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

autocorrect_py-2.8.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (2.7 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.5+ i686

autocorrect_py-2.8.3-cp37-abi3-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

autocorrect_py-2.8.3-cp37-abi3-macosx_10_7_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7+macOS 10.7+ x86-64

File details

Details for the file autocorrect_py-2.8.3.tar.gz.

File metadata

  • Download URL: autocorrect_py-2.8.3.tar.gz
  • Upload date:
  • Size: 105.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for autocorrect_py-2.8.3.tar.gz
Algorithm Hash digest
SHA256 5e6a5bad3692efad60fe98bc80406c1d8b519fc6f9a624ee41d8dc9a449b2e91
MD5 93e2beafaaf4ea8ec3882275f6d8f5cc
BLAKE2b-256 94abe026284225052289d964a9cf970ea68b639486493b3af349134576f04e1e

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a2314e00cc6bd4f9f0402e2ba1d65e4edc53f23318b1cb9686f0591bf7742918
MD5 c4070163a25588447124929eca51ef97
BLAKE2b-256 716789db31716700ad25152a378d55b12b4356509d557a030d78e8e80b10be15

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-win32.whl.

File metadata

  • Download URL: autocorrect_py-2.8.3-cp37-abi3-win32.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 8b2bdd83a277bed9447029a76c3c52a60f5cf1008a963860a0b6df472ac1db59
MD5 c0b6958bef0c5f807149e053d4299fa3
BLAKE2b-256 55d83fe5f85b51245c9529bca2eb2a0074e62d9c92135a78d14b48d41fe0568b

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a545e9f66bef4225b425af9128f0c8ff97d7a6c3d92f9bf009f80dcab471e0f0
MD5 0e2215a8a31c5c7a6031665cb54873b8
BLAKE2b-256 dc60c2e2c87d0d8e49db32c9574f9c0a93a0a9a79f6a0ac72b652bdb2fd36584

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 0c08030ccd57ebe2b34bc49237dbf2e3d9d9a0d20d3f578f1eb08b6d54999ecd
MD5 cf181fae68b986cacabcbef7f1320cb3
BLAKE2b-256 7fa61e10a7bea75131af1465a300531a1f79a8422788a1eb131a13d05a41288c

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 9605e139c983e34eebff39496823e8e920dde2a701721d09e780d03fc034be5e
MD5 59862e8058c654be713f55f6d4fc96a9
BLAKE2b-256 705eff71315d693d8814e4c6b3e76cdcd5430a5ffaeeb5740b48d81c820ee05e

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 20fff58cb1421725d1354368aabf2fa1a07a8e1520b16395dbca42f290b464d3
MD5 89995797e9e322432fc881b401275adc
BLAKE2b-256 13023541a993f5b010e88f330e009117a5425672deed50b4d287b750ddbb95d8

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7ff229d2f924738423756a50a2504b90a663035a247e964b40309a6520e96f4a
MD5 efefbe99b15eff0576483a0f2c26b871
BLAKE2b-256 ed7422671ec11ed637aa36e8baaef77e99d5cf2e726d0923dc63f742a0b466b0

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a204e501475623a917edefe1392373fd0a0d67a36b760e8c8c4d34359a582402
MD5 04ec9a027e7ce418fe084acf09391883
BLAKE2b-256 321792a5c9a0d2f513040c124bcf8e29ad4108a11a45404467e458d3d4d50738

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 e0f84e2d079ecabf1dee93b805d4fe1cddb3a228d94dc3dcfc7a780d12f01aa1
MD5 6788187f5f5db1ed7580df565146fade
BLAKE2b-256 acfb8428ac8eaba821ed2147dae1fedf26805ef4fd3395f90535b0c33795eb3c

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 a694d31acc4f98243a23aad6f5596be0c6aa061b84ee2fbe94db1b8ece39f4f4
MD5 0cc9512ee7122bfe4c38fcb3ca5ec648
BLAKE2b-256 065382d518220a59e574976f19bbcc35728a7eeb479b99cdef8e6eeb7c454974

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 906178151408df97d12618b2003fcc593910bf5e11b62147430c577df3a21352
MD5 48be8b3a3293fe869b315fbbae1da0dd
BLAKE2b-256 194159288d854a445f77c4b8643fe4126f8b6eed88fe23b4a6205b7d35598012

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 586802e7ad7da1cb246a48aaf8f9fc5342c232f1b115cd01855cca3c61aac1c9
MD5 5a783bcc52cf373e7a309526c240a185
BLAKE2b-256 8e45aa9676bfb75a2cd8fa9db0b12d8160522068674d1ca0d174a367be757f15

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7412b68cfd6ea57229fd5b5e0af13fdf6008c790cd996c59696da5f0b3244024
MD5 92f15dec3e42891a3697206e2200c114
BLAKE2b-256 852f961ae6c3889b45b809f7ccaf96be101fab9283e529eb0e83e76b7eab8b9c

See more details on using hashes here.

File details

Details for the file autocorrect_py-2.8.3-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for autocorrect_py-2.8.3-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a81213b87f9c57fd5ef679fa98757e0342ab0f8fa0a6fbc480ce3e12a675feb7
MD5 124e19f1df1ee5ff203c1fe1ecb080ee
BLAKE2b-256 9e86ba8656ab502734924a8e635c94495dfcce30854e5fe3008eec26b47845f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page