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 spacy
import en_grammarticle
nlp = en_grammarticle.load()
text = "Some text"
doc = nlp(text)
for span in doc.spans.get("sc", []): 
    print(f"[{span.label_}] {span.text}")

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.0.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.0.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grammarticle-1.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 93cfa5ab95da5c27f5676b6d8782aaaa8a39253541b27a143cb50245932f9152
MD5 4f6f9d4806615acb3a7f4f940abc939b
BLAKE2b-256 f608d5696b75a31f1845c5d7df29e394e7c4b045d8e0cb56b39a8c2c4144c23b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grammarticle-1.0.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8bb0871fa9b7ef1618874129e2a9a11728967f3efcfa7124ee6fd9e6539b928
MD5 e8f408f955128203ed4b03dfb24913e3
BLAKE2b-256 951ca1f5f769f15998f8e18ac12f69870245b8400b24d5aac0592f556d0c5db3

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