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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ Windows x86

autocorrect_py-2.9.0-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.9.0-cp37-abi3-musllinux_1_2_i686.whl (2.9 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

autocorrect_py-2.9.0-cp37-abi3-musllinux_1_2_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

autocorrect_py-2.9.0-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.9.0-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.9.0-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.9.0-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.9.0-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.9.0-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.9.0-cp37-abi3-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

autocorrect_py-2.9.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.9.0.tar.gz.

File metadata

  • Download URL: autocorrect_py-2.9.0.tar.gz
  • Upload date:
  • Size: 108.6 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.9.0.tar.gz
Algorithm Hash digest
SHA256 841cfb242a99803b34b9872553cf744905309516ea4e76f4a92732a1a3432ccf
MD5 97a8080bf135f89320a2362925484aa9
BLAKE2b-256 a1532474a7777a88693d673c17d70404fffd1ebdf703a687a62fc14e29c9f179

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 aa4aeedee61e068384f79aa921c32a99ecdc616f94eaf5e001ef06a27f0eeb96
MD5 ecbede14949de56234a7ba094a4d0a14
BLAKE2b-256 9d2c38d619aa5ef69382ad1c32a4ea9a2ec1a1fbd00fb3050beb60315cf52aae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 84e9bbcbadd5736a60a800c0de8642dd965ee809bd56481d77e14b491f024052
MD5 2470711a9a22f3670daca6922318dfe5
BLAKE2b-256 0ab09b4b4377028c438e5faf9139779336a54bc3bd26767286c57d939590a27f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 34a2c6285dadf86655ee0814b360256960ed7c868d256fe4a11f035f6fc7cf28
MD5 a730e4ce46816471ec8879326437a204
BLAKE2b-256 30d074631ac4878465762d837f9178b8d522baca71d3bbc4c4ea5549d8dba1cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 8042e5999150e6a0d3758f60f015b8f82e8a09e4947916e1a013629a1dbc35cd
MD5 e2693ae28d479c4a1c657813e72998ef
BLAKE2b-256 02a135b05497f76860bc7759baab266781d47e9cb3d1df849481470030c1037c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 438ed0852299c41470d31fb097a2616d37cb28a2c9706dd44cea9665d0b8b192
MD5 9ff3ebfafc545303238bbbecb2148526
BLAKE2b-256 2aa832f2a9f6a4a1339cf00d3660f0e2d7993fa4089f49c50666d5c011337367

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 27d4e08a2646e168432f833660e0798d5af091656aec10a91a0e0926af16c519
MD5 60c5c0a5f95cca80da4555fa9e3f61ce
BLAKE2b-256 c7cb051e2c74286733c92cf00ebb91c1c428a485f308cdc3bf50dd1377aa349f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 feae8b436377a1bb74acc53408a71ba9061edeeaed8ad5fe5b84370ec9566241
MD5 205e1f34ac8a68372635b276344942be
BLAKE2b-256 23220ece387fcdda80ad3fd2031bb993d9a774cef0fd047a220f143716bdeebf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 8c70d628ece7df1006a520e06b171fd9d6727f03d4f709059357013ea905b517
MD5 615d2770ed5542ccf5780595023db688
BLAKE2b-256 34a2354984e137592330b825a8b8d4d50d8b2fe3b8d88cb8f1aa85b298681879

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 f706a71376f5b3b81020c49e446e5663f9a682676cb0e4dabc257c00deb12349
MD5 37dead2895035139eb28e4d3dc0856ef
BLAKE2b-256 21abed76eeedf7f00d3e71d9e482b604f04de971580a933517141c618e3699e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3a58bdd6595bd796c430dbe169aae93ae33495b44f6cc205cc9caa76c2a799fc
MD5 86462693514c8744ee3b00acbf28a0f1
BLAKE2b-256 9a46aae75246ca2990e9fb74cf03041adc989600181ae8ccdc7a6a262d4d2680

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4392642138511f82c1ea81e6785846111280de6de8788119a176ab1008becbe0
MD5 92a8022d4079dee50ae0592c20512a47
BLAKE2b-256 6868f01e16c90f370e1568b304131bc5edfe042880e04ceb2084a4fc87663d2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 7a4a65708a342fd1ba721efc9486b1d6577bca89e10c7c52d101650ee9ef08c3
MD5 642e75a447ff297e0616800ddc179702
BLAKE2b-256 f7014daed81382bbe79b2bd6f05d23289686aa3905942808228ba374e6022711

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98f3527aad3bed02f9daf0c43cfe4867eb1309e91336d937fd67fc02a1e44994
MD5 df08d0c7fb2fd556ea7b413baecdd571
BLAKE2b-256 1c88718ad265d31697d69a2cad3fef35a6ded8750e04e83d73f75908aef046eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autocorrect_py-2.9.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 1eb0aac99b37fbae41fadbc6ed9df78a03644ff9196dd921def3e279ebf0f6d4
MD5 736c3dace04ba1833cb99567fb35d59c
BLAKE2b-256 f93119a3ef7d9ceabdde316825e5327e40530d28b7f51c61f085bf762b319927

See more details on using hashes here.

Supported by

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