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.5.tar.gz (105.8 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.5-cp37-abi3-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.7+Windows x86-64

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

Uploaded CPython 3.7+Windows x86

autocorrect_py-2.8.5-cp37-abi3-musllinux_1_2_x86_64.whl (2.9 MB view details)

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

autocorrect_py-2.8.5-cp37-abi3-musllinux_1_2_i686.whl (2.9 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ i686

autocorrect_py-2.8.5-cp37-abi3-musllinux_1_2_armv7l.whl (2.9 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARMv7l

autocorrect_py-2.8.5-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.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

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

autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.2 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ s390x

autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.0 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ppc64le

autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.7 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARMv7l

autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

autocorrect_py-2.8.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (2.8 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.5+ i686

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

Uploaded CPython 3.7+macOS 11.0+ ARM64

autocorrect_py-2.8.5-cp37-abi3-macosx_10_7_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.7+macOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for autocorrect_py-2.8.5.tar.gz
Algorithm Hash digest
SHA256 c67c0a632a624bd32d621c157aaa754eb34b481c1ddf2b8b2a5563d141db4ae0
MD5 8893ec7651a528212a280c26614ce944
BLAKE2b-256 5a090da20b2392514db2b623c1f8e582c4fcddbadff54ceda5f77a6290a5289d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d2046d151d19d05718680266fb86461ea11c54e2c5704ef57f008cc747d7acbd
MD5 886581f5cd9337c85e138c3494baaaaa
BLAKE2b-256 bbc4af401fd85d8d9e991fa52a917880bc996b19a1f34dbfc090351264592ecc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: autocorrect_py-2.8.5-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.13

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 975c442c947229ffc4ce1bcd030f49207a5396f9628e012383f79a4f732d9902
MD5 927f1a2fc49d3c8841b9ba79258173da
BLAKE2b-256 3217614eb7c03a983509079d4771768bb71fd61256c5ace5b0dd0be6a266309e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bbd7cdf6b9b7a0345ece2656cb88f9eadbfcd499f55d9e0693027793d327912f
MD5 bbe079b8e3dedd6e84190ed86c33fca5
BLAKE2b-256 5ac85deda26caf45e8a364ee49ce9aea39e0f77615a99ff734a46c71c9c364dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 052c9b8065b6137ca26584aaffd30d3c5c229d154b956958f68ad06fcb4bee86
MD5 250736e87fa448341b24471a9f1ac292
BLAKE2b-256 8ac774600fdec43ee39f62eb2a46210c1a8385439490862af3529f731c8bb7c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 eb5b1d15f826bbf003dbfbe9d69b7c6da37c2ae8b4e7c2ea25bcf2eddb1199c6
MD5 8fdff21966e67accef228d1251698f6d
BLAKE2b-256 7b05623b731cdd160c29e46905e8dfc0da8dd754df157342bcc83769f78463f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0b59b1c48ca62f16b199b9a14db2950a991a6d2af55e71d815017b81f9e9149f
MD5 8d9954d9950f8d5d75e975c04c51e2ed
BLAKE2b-256 ed86e873ec5060ba0bdef6d341bbaa29517214a18037999c44ee2e9aa7dfb42c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 63d12a497805de39a0ed9649f76604231d16ffcd7820a6206ffc0a562a8a0751
MD5 38c1253222ceaa3d9b7396a4ac13f51f
BLAKE2b-256 2ff100380b9b29fba84751c3d9560d449e426a8b3afef6bc43f5e92ba566498b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4e5010c08db343e6fdd02df7ffaf8e111e0fdfe9a6781d866177d2bd2b9bfa7c
MD5 fd5e750a023faafea26b8dee97b35550
BLAKE2b-256 6c73ad10b9208c241d63e5cf129f94d1fd8ee4dfa9e1a03c8547eb4274ca4477

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 f07ee139f61c2e65d56dae9e395ca8745881a4df520269069305e26dc51e51fb
MD5 16df0a62b55c97f8ae0ca52ff6704990
BLAKE2b-256 35454b2e7d7b6a7df8c46191a3748b3251c4e44479057845a75919719943cd28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 af9bc9c4a8c6ed85f2693515d736de87b9409a6d81b48df404bc023c53c72096
MD5 29a7fb887e857380a6a3ba738bc8ce82
BLAKE2b-256 7dc706b5acb70b4a567b6095b87f040d708aea45f5f91c8e3d745753b9a9a483

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1cfa924c45c1fc3ffd134130ec62b21c4f4d378c740090e85b634dde5da7224d
MD5 5964cd39045643888ffd44c1ad833b0c
BLAKE2b-256 436b39fc42048688455945745a522476394099a1df31e168e17c0803657f0cf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 4671e81fb30f510d255534a0c4ea7ee936bf83c8d6eb60ad762fa264e6a3b0e7
MD5 a61fcb8645aaf46e89c78f2185d1f127
BLAKE2b-256 e5c548ab8bad26cfee6c0a0cac2de37f5cfd2691f68491575cb9b2c20c67a1fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0060d5aaf0c554e91218359153c7bb311ec7e6f3c71b3afb369583f78f775354
MD5 5dbd41fc4bd650cdf60bc19218ce901a
BLAKE2b-256 94b2012f2351d4d130e905f78bab4fdded040c804368bd43c87779c71196e02b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.8.5-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 9539645f337f8facafb0ba83c28a59ba73cb0ef4a51309de23bdfa7bcc21357b
MD5 a8615ceac8ada41886d8fc69da8c5aa1
BLAKE2b-256 925552f458d7aa9d23c07dcb55706a954902cb07f5ced34a969c4039e5961fb6

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