Skip to main content

Grammarticle spaCy pipeline

Project description

Grammarticle

GrammArticle Logo

GrammArticle is a RoBERTa-based grammar checker for English article usage. It detects three types of article errors:

  1. Missing – when an article is absent but required
  2. Wrong – when an incorrect article is used (e.g., "a apple" instead of "an apple", or "the" instead of "a/an")
  3. Redundant – when an article is unnecessary (e.g., "the furniture")

Installation

GrammArticle is trained on publicly available GEC datasets with synthetic augmentation and is available as a SpaCy pipeline.

pip install grammarticle

or

pip install spacy-transformers
python -m spacy download en_core_web_trf
pip install https://huggingface.co/iproskurina/en_grammarticle/resolve/main/en_grammarticle-1-py3-none-any.whl

Usage

import grammarticle
nlp = grammarticle.load()
text = "This is sentence"
doc = nlp(text)
for span in doc.spans.get("sc", []): 
    print(f"[{span.label_}] {span.text}")

Outputs:

[Missing] sentence

Example Output


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

grammarticle-1.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

grammarticle-1.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file grammarticle-1.1.0.tar.gz.

File metadata

  • Download URL: grammarticle-1.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for grammarticle-1.1.0.tar.gz
Algorithm Hash digest
SHA256 25b67228f461ac9c66740352c557c1c8952a09baf215dd1ba37f0b18f500f8a7
MD5 d80934c4eb6b88d32fc9dc40917c2d05
BLAKE2b-256 587ec9f488c9aa7115dc5a7010fd68fbbb8751de676bc6a1a9143862ef12ba6d

See more details on using hashes here.

File details

Details for the file grammarticle-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: grammarticle-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for grammarticle-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d19cadd6a8ba2fcc53ab614f9f8881464fde1e4a5acc0825cfc296f9ad34766
MD5 58c3fd76cb0b52e75eb2bf67cd1c2ceb
BLAKE2b-256 7a2eed034892b70c9bb360cf33382918ddb7b41993a38ef91706f0bad21de981

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