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.0.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.0-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ua_gec-1.1.0.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.24.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.0.any.tar.gz
Algorithm Hash digest
SHA256 16736eb870abd728216b6efd2b8913e9a7c3aa8486bc11ffc34f4c82c72362c8
MD5 2f3391e5318e23d0eb2500a987e36cc7
BLAKE2b-256 13bcc041e5ad24504425dcd0f277c57764dac1c1b90a284c4dd9bd150db759fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ua_gec-1.1.0-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.24.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fb8764794b6d8dcbe0672727b103b547b72480660d6bf14e98f97e719bc4031
MD5 5955e65ab05459b4525f2229f7eb06cd
BLAKE2b-256 c835a90e8b05888ebb9cc36c1f8cf46b513441d3a6b4e1864270beaabfe14440

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