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

Uploaded Python 3

File details

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

File metadata

  • Download URL: grammarticle-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 af1852886de6b97a446dca0f10b016aadee02dc70fc646e4d63a5872cd085112
MD5 4388536a9873912773a5eca1348381cd
BLAKE2b-256 d593100a262353894715e94fe5922a991f9289a7e1b78729b15807902a9f0943

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grammarticle-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d20d65d99c1e671ac64365ae3ec4f6d845a6c18350db4cc41fe465c51ae24df9
MD5 b5915de429deea5568ed265d86a455ae
BLAKE2b-256 69d8e3bd47687c1c814c9f9354d322116b151ee9ea48a352238cbcad00670394

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