Skip to content
advancedtext

SIGMORPHON 2023 Lezgi Interlinear Glossing with ByT5 Pre-Labels

Segment words into morphemes and write Leipzig glosses with the interlinear_gloss scheme and byt5-gloss trainer. The sentences are artificial placeholders.

Get This Design

View on GitHub(opens in a new tab)

Clone or download from the repository

Quick start:

bash
git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/text/linguistics/sigmorphon-lezgi-interlinear-glossing
potato start config.yaml

About this dataset

The SIGMORPHON 2023 Shared Task on Interlinear Glossing (Ginn et al., 2023) asks systems to generate morpheme-level grammatical descriptions of input sentences following the Leipzig glossing conventions. The task data was manually annotated by linguists. The Lezgi subset has 701 training and 88 development sentences, with morphological segmentations and English translations but no part-of-speech tags, according to the shared-task README. The Lezgi files are released under CC BY-NC 4.0.

Each shared-task record has an orthographic line, an optional segmentation line, a gloss line, and a translation line. The design maps the lines onto an interlinear_gloss scheme. Annotators see one column per word, edit the segmentation and the gloss, and write a free translation. Potato checks that the segmentation and the gloss of a word carry the same - and = boundaries, and flags labels outside the Leipzig abbreviation list. The sample sentences are artificial placeholders. The stems are written STEM1, STEM2, and so on, the suffixes sfx1 to sfx7, and each suffix carries a standard Leipzig tag, so nothing can pass as Lezgi. The sentences show the format and nothing about the language. Four items arrive glossed for review, three arrive segmented only, and three are raw text. The older design Interlinear Glossing of Endangered Languages (text/parsing/sigmorphon-interlinear-glossing) covers several languages of the same shared task with a three-scheme workflow. The design here covers the Lezgi track with the interlinear_gloss scheme, the automatic boundary checks, and the byt5-gloss training loop.

The model_training block enables the byt5-gloss trainer, which fine-tunes ByT5 to segment words into morphemes and gloss each one from the words annotators have glossed. Writeback shows the predictions as pre-labels on unglossed items. The trainer needs at least ten glossed words and far more for a useful model, so the ten sample sentences only let the loop run. No accuracy is claimed, and the shared-task systems and scores are not reproduced.

Lezgi training sentences
701 (README table, data_v1)
Lezgi development sentences
88 (README table, data_v1)
Languages in the shared task
7 (Arapaho, Gitksan, Lezgi, Nyangbo, Tsez, Uspanteko, Natugu)
Lezgi licence
CC BY-NC 4.0
Sample items in this design
10, all artificial placeholders

Configuration File

This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.

yaml
# Lezgi Interlinear Glossing (SIGMORPHON 2023 data format, placeholder items)
#
# Dataset: SIGMORPHON 2023 Shared Task on Interlinear Glossing, Lezgi subset
#   (701 training and 88 development sentences, per the shared-task README)
# Dataset URL: https://github.com/sigmorphon/2023glossingST
# Licence: Lezgi data is CC BY-NC 4.0 (data_v1/Lezgi/LICENSE). Code is Apache-2.0.
#   Because the licence is non-commercial, NO sentence from the shared-task
#   files is reproduced here. Every item in sample-data.json is an artificial placeholder.
# DOI: 10.18653/v1/2023.sigmorphon-1.20
#
# Paper (ACL Anthology BibTeX):
#   @inproceedings{ginn-etal-2023-findings,
#     title = "Findings of the {SIGMORPHON} 2023 Shared Task on Interlinear Glossing",
#     author = "Ginn, Michael and Moeller, Sarah and Palmer, Alexis and Stacey, Anna
#               and Nicolai, Garrett and Hulden, Mans and Silfverberg, Miikka",
#     booktitle = "Proceedings of the 20th {SIGMORPHON} workshop on Computational
#                  Research in Phonetics, Phonology, and Morphology",
#     month = jul, year = "2023", address = "Toronto, Canada",
#     publisher = "Association for Computational Linguistics",
#     url = "https://aclanthology.org/2023.sigmorphon-1.20/",
#     doi = "10.18653/v1/2023.sigmorphon-1.20", pages = "186--201" }
#
# Data format quoted from the shared-task README (open track, track2):
#   \t orthographic representation
#   \m morphological segmentation
#   \g gold standard gloss
#   \l English (or Spanish) translation
# and the task statement: "Participants build systems which generate
# morpheme-level grammatical descriptions of input sentences following the
# Leipzig glossing conventions". The README says the Lezgi data has
# segmentations and English translations but no POS tags, so no extra tier is
# configured. Item fields map as \t = text, \m = morphemes, \g = glosses,
# \l = translation.
#
# THE SAMPLE ITEMS ARE ARTIFICIAL PLACEHOLDERS. The words are STEM1, STEM2 and
# so on, the suffixes are sfx1 to sfx7, and the glosses name each stem lexN and
# each suffix with a standard Leipzig tag (sfx1 = ERG, sfx2 = PFV, sfx3 = PL,
# sfx4 = DAT, sfx5 = GEN, sfx6 = OBL, sfx7 = ABL). Nothing here is Lezgi text,
# and the translations say so. They exist to show the format, the Leipzig
# boundary checks and the training loop. Replace them with sentences you are
# licensed to use. The language key is left unset for that reason.
#
# This design is the Lezgi track with the byt5-gloss training loop. The older
# design text/parsing/sigmorphon-interlinear-glossing covers several languages
# of the same shared task with a three-scheme workflow.
#
# Items 1-4 arrive fully glossed (a review task), items 5-7 have a segmentation
# but no glosses (the open-track "covered" input), items 8-10 are raw text.
#
# Leipzig conventions in use: "-" joins affixes, "=" joins clitics, "." joins
# several category labels of one morpheme, and grammatical categories are in
# capitals (ERG, DAT, PL, PFV). The segmentation and the gloss of a word must
# have the same boundaries in the same order; the page flags a word that does
# not, and flags category labels outside the Leipzig list.
#
# Adaptations:
#   - Items are artificial placeholders, not taken from the shared task (licence above).
#   - One sentence per item; the shared task files hold many sentences each.
#   - Gloss correction, not just generation: some items arrive pre-glossed.
#   - The trainer is Potato's; the shared task systems and scores are not
#     reproduced and no accuracy is claimed.
#
# MODEL TRAINING: the byt5-gloss trainer (pip install 'potato-annotation[train-text]')
# fine-tunes ByT5 to segment words into morphemes and to gloss each morpheme,
# using the words annotators have glossed. Writeback shows its predictions as
# prelabels. Open /admin/training with the admin key below to pick the trainer.
# It does not serve a model. Ten glossed words is the minimum
# (min_instances), far too few for a useful model; the ten sample sentences
# only let the loop run.

annotation_task_name: "Lezgi Interlinear Glossing (placeholder items)"

task_dir: "."
data_files:
  - sample-data.json

item_properties:
  id_key: id
  text_key: text

output_annotation_dir: "annotation_output/"
export_annotation_format: "jsonl"

require_password: false
admin_api_key: "demo-admin-key"

user_config:
  allow_all_users: true
  users: []

annotation_instructions: |
  Each item is a sentence in the SIGMORPHON 2023 Lezgi format. Split each word
  into morphemes in the segmentation row and give one gloss per morpheme in the
  gloss row, following the Leipzig Glossing Rules. Use - between affixes and =
  before a clitic, in both rows. Write grammatical categories in capitals (ERG,
  DAT, PL, PFV), write lexical meanings in lowercase, and join several meanings
  of one morpheme with a dot. The sentences here are artificial placeholders and are
  not taken from the shared-task data.

annotation_schemes:
  - annotation_type: interlinear_gloss
    name: igt
    description: "Segment each word into morphemes and gloss every morpheme"
    instructions: >-
      Put - between affixes and = before a clitic, in both rows. Write
      grammatical categories in capitals and lexical meanings in lowercase.
      Stems in these sample sentences are artificial placeholders.
    source_field: text
    morphemes_field: morphemes
    gloss_field: glosses
    translation_field: translation
    abbreviations: leipzig
    metalanguage: en
    label_requirement:
      required: true

model_training:
  enabled: true
  writeback:
    schemas: ["igt"]
    include_unlabeled: true
    min_confidence: 0.6

Sample Data

json
[
  {
    "id": "lezgi_001",
    "text": "STEM1sfx1 STEM2 STEM3sfx2.",
    "morphemes": [
      "STEM1-sfx1",
      "STEM2",
      "STEM3-sfx2"
    ],
    "glosses": [
      "lex1-ERG",
      "lex2",
      "lex3-PFV"
    ],
    "translation": "Placeholder translation 1, not a Lezgi sentence."
  },
  {
    "id": "lezgi_002",
    "text": "STEM1sfx1 STEM4sfx6sfx4 STEM2 STEM5sfx2.",
    "morphemes": [
      "STEM1-sfx1",
      "STEM4-sfx6-sfx4",
      "STEM2",
      "STEM5-sfx2"
    ],
    "glosses": [
      "lex1-ERG",
      "lex4-OBL-DAT",
      "lex2",
      "lex5-PFV"
    ],
    "translation": "Placeholder translation 2, not a Lezgi sentence."
  }
]

// ... and 8 more items

Dataset & paper

Ginn et al., SIGMORPHON 2023

Paper DOI
10.18653/v1/2023.sigmorphon-1.20

Citation (BibTeX)

bibtex
@inproceedings{ginn-etal-2023-findings,
    title = "Findings of the {SIGMORPHON} 2023 Shared Task on Interlinear Glossing",
    author = "Ginn, Michael  and
      Moeller, Sarah  and
      Palmer, Alexis  and
      Stacey, Anna  and
      Nicolai, Garrett  and
      Hulden, Mans  and
      Silfverberg, Miikka",
    editor = {Nicolai, Garrett  and
      Chodroff, Eleanor  and
      Mailhot, Frederic  and
      {\c{C}}{\"o}ltekin, {\c{C}}a{\u{g}}r{\i}},
    booktitle = "Proceedings of the 20th {SIGMORPHON} workshop on Computational Research in Phonetics, Phonology, and Morphology",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.sigmorphon-1.20/",
    doi = "10.18653/v1/2023.sigmorphon-1.20",
    pages = "186--201"
}

Details

Annotation Types

interlinear_gloss

Domain

LinguisticsComputational MorphologyLanguage DocumentationLow-Resource Languages

Use Cases

Interlinear GlossingMorphological SegmentationLanguage Documentation

Tags

sigmorphon 2023lezgiinterlinear glossingleipzig glossing rulesmorphologyendangered languagesbyt5

Found an issue or want to improve this design?

Open an Issue(opens in a new tab)