Skip to main content

UA-GEC: Grammatical Error Correction and Fluency Corpus for the Ukrainian language

Project description

UA-GEC: Grammatical Error Correction and Fluency Corpus for the Ukrainian Language

This package contains the UA-GEC data and code to work with it.

Python library

There is a Python package that consists of the data and the code to work with it.

Getting started

A simple way to install the package is by pip:

    $ pip install ua_gec==1.1

Alternatively, you can install it from source:

    $ cd python
    $ python setup.py develop

Iterating through corpus

Once installed, you may get annotated documents from Python code:

    >>> from ua_gec import Corpus
    >>> corpus = Corpus(partition="train")
    >>> for doc in corpus:
    ...     print(doc.source)
    ...     print(doc.target)
    ...     print(doc.annotated)
    ...     print(doc.meta.region)

Working with annotations

[The docs are under construction]

Train-test split

We expect users of the corpus train and tune their models on the train split only (of course, you are free to further split it into train-dev or use cross-validation). Use the test split for reporting scores of your final models. Never optimize on the test set. Do not tune hyperparameters on it. And please, do not use it for model selection in any way.

The Statistics for the per-split statistics.

Annotation format

Annotated files are text file that use the following in-text annotation format: {error=>edit:::error_type=Tag}, where error and edit stand for the text item before and after correction, respectively, and Tag denotes an error category (Grammar, Spelling, Punctuation, or Fluency).

Example of an annotated text:

    I {like=>likes:::error_type=Grammar} turtles.

An accompanying Python package, ua_gec, provides many tools for working with annotated texts. See its documentation for details.

Statistics

UA-GEC contains:

Split Documents Sentences Tokens Authors
train 851 18,225 285,247 416
test 160 2,490 43,432 76
TOTAL 1,011 20,715 328,779 492

The corpus statistics can be generated by running a script from the Python package (note that the ua-gec package must be installed first):

$ python ./python/ua_gec/stats.py

Contributing

  • The data collection is an ongoing activity. You can always contribute your Ukrainian writings or complete one of the writing tasks at https://ua-gec-dataset.grammarly.ai/

  • Code and documentation improvements are welcomed. Please, open a pull request.

Contacts

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

ua_gec-1.1.1.any.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

ua_gec-1.1.1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file ua_gec-1.1.1.any.tar.gz.

File metadata

  • Download URL: ua_gec-1.1.1.any.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for ua_gec-1.1.1.any.tar.gz
Algorithm Hash digest
SHA256 ab4244e1e7fe4898a94e2420db1b2c1eebfe13848169bdcd97be4fb95aa2839f
MD5 fea8db46560c1f5beb525d94834fbc13
BLAKE2b-256 734e9d71562481fbd968d9319e57cb152f46088998867bb60df26c6d95ecabb6

See more details on using hashes here.

File details

Details for the file ua_gec-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: ua_gec-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for ua_gec-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8e1e124480f8cb3b86dbecd8d1d313e954b99fcb7492b2375af02867794262e
MD5 609c0d50d2a2fdcc6c6dec8bbcfdf547
BLAKE2b-256 5e406862f8d714482c4ce3df3591e607e44d899a526b1ed7969a54b2780455af

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