Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

autocorrect-py

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autocorrect-py

A linter and formatter for help you improve copywriting, to correct spaces, words, punctuations between CJK (Chinese, Japanese, Korean).

  • 2.9.0
  • PyPI
  • Socket score

Maintainers
1

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');

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc