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.14.0.tar.gz (110.0 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.14.0-cp37-abi3-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.7+Windows x86-64

autocorrect_py-2.14.0-cp37-abi3-win32.whl (1.4 MB view details)

Uploaded CPython 3.7+Windows x86

autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_x86_64.whl (2.0 MB view details)

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

autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ i686

autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_armv7l.whl (2.0 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARMv7l

autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARM64

autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

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

autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.1 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ s390x

autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.9 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ppc64le

autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.7 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARMv7l

autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

autocorrect_py-2.14.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.8 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.5+ i686

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

Uploaded CPython 3.7+macOS 11.0+ ARM64

autocorrect_py-2.14.0-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.14.0.tar.gz.

File metadata

  • Download URL: autocorrect_py-2.14.0.tar.gz
  • Upload date:
  • Size: 110.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for autocorrect_py-2.14.0.tar.gz
Algorithm Hash digest
SHA256 05f2ceaf9daca7cdbcc1648c20561e98123b540ba80688bb33e67fbe0ed942e4
MD5 293164f91462d0029ae8ac164d6c5775
BLAKE2b-256 39d9ee3442377fdc687fb4a5212c242240bbeb34311ccc41de45badc813b5b01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bbcad5a7343ae15a5a307ccf810213dee019cdcebb10150a2f6c22cdaa61c751
MD5 b68a10fb65ff72ca2df1c4d0a2a43f50
BLAKE2b-256 4bdedef0e8cfac068891c988c9bc7fed1e768a15c15abb28a44636de3d3278f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: autocorrect_py-2.14.0-cp37-abi3-win32.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 9b42e2e436c252ef7095ba51c23687dcf0fd7522bb528d996d789950a51647ea
MD5 bd08eb5b7bf397caf83bff1136c35c3e
BLAKE2b-256 42addae4d8b1d405efe2f9b84796ad6c1005ffe181f6a01c323299d50a9c8888

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e30f36fb0d8c60f06ae5615d87ee3da79174dc42955a9e8c6a6f60cf92b43d2d
MD5 f249229edf1afb260fc2c18ebee1b5ee
BLAKE2b-256 3af53245f461713a33e09b5be339ab34e515e73a87f860289b72a4d70a80d481

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 86c43b2ce86afe522fa883b3d3c3a981cfefb4833705deed0453d4ec5869bbbb
MD5 2b01528b3e8db972909b7691f8297eac
BLAKE2b-256 6d8a4f3a69f4da816f8f8f874beabf062c5097f19d52e794cf1b957181cc931c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 9d2113e29ced9615b9e1ab5931e7314c91199e606d161cb075e014e495f6329e
MD5 c1b02a7dc0fd1cb1658f14f02f8ae4eb
BLAKE2b-256 36778a40e6353a17fa397f7664d6fc1a46ab63475d4cbf0722e519d3a1060143

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 560e939ca1aec81832fe970f1d80723d4d13f3e1385320170c187edb88e4857c
MD5 9a450eef4e79a971720b6b81f4ad8dad
BLAKE2b-256 6514e76ba3f2709a81f8ab50cae8a3142ea3b2beaee8b737a0f443e11ef565a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44756d59f7c5fb6c3d14897de15e6c775bb68093804b7fab37f5973dc07bedd4
MD5 9d503e816f7e81aeed7101b1dd4ce88a
BLAKE2b-256 686a0d1e4cf1e14b70fec5a2df0e409462df693d71c0e3a1f776e1d9c2cd145d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 c1abe772a2340d34d3f47b82f22a056f44ac99d368e3382864d747955a4ccf90
MD5 1d0b97d5eb0f91fea4f26eabf25ee00d
BLAKE2b-256 4c73e08761cdde740ef0e347a65c621e8270687bf6dbd0a8824f91879d895964

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 ea1dc22d1d25780324b730b71360e9537c596a84a1bf7ce0cec7166956fe3822
MD5 0bf90a60afd480106d529cb480da96e6
BLAKE2b-256 11adf9916fb4626eb7f182fcc5d788e78e3d83f7c6875dd4feb0e14b3305557b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8b83b24363ab6be049e7ed509a85a2ad47d83dcd7df6a3f4b01a77f4eb3c46ba
MD5 28f82c8a37348c5f0cb3a184cf65399e
BLAKE2b-256 aa0b231db13940b8c714256f7971382a71bd878bc172325a73d005708551fc50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b574653590d9acf6bf8c77b1fcbd459d08e7849bfb9fae21a7bef32648ca42b1
MD5 de87268ddb37af0487165b995ebedc29
BLAKE2b-256 89132fa26c4910f0b559a6a4d8616d81f18fd03646207b70822fabc55be85b53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 4dc87f684784d02180e1eb2abcbb2ca8967c46aac406f6e9b37b77d0196c1c23
MD5 8383ec219bd0261deaed2d38d567d3e8
BLAKE2b-256 aaf3f54e8fedb38398029ec2be3885cd4b95505764971fbd78fe6a52b0035263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da433ed2b6b7fede2f72c6fa5bb9021ddd6dbc207b7f77a33ee2df816b82eab9
MD5 fc5c18ecf72450aa01ea405ea1ea6087
BLAKE2b-256 3ba6a7d7c4eb2eaa2a47e222abf617aaa4e1c9f6e3b7b36405ab9d92439bc042

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.14.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 fc7aa8b20e6c14bf0832e007efc9cba5e3c8b0d29adf77358caef67dbdc68570
MD5 f7f877b3b74617175cbb9053f246389f
BLAKE2b-256 de4b0a6f6f483a199d8ece027418474d65b2620722d30ae9fec443a1442176f9

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