Skip to content

Adds a Ukrainian argument structure gallery example#12

Open
pkuchmiichuk wants to merge 16 commits into
FACTSlab:ukrainianfrom
pkuchmiichuk:ukr-gallery
Open

Adds a Ukrainian argument structure gallery example#12
pkuchmiichuk wants to merge 16 commits into
FACTSlab:ukrainianfrom
pkuchmiichuk:ukr-gallery

Conversation

@pkuchmiichuk

Copy link
Copy Markdown
Collaborator

Description

Adds a Ukrainian argument structure example to the gallery: an end-to-end 2AFC acceptability pipeline for Ukrainian verb argument structure, following the structure of gallery/eng/ and gallery/kor/. It ships a Makefile, a local config.yaml, and numbered pipeline stages covering lexicon generation, template generation, template filling, 2AFC pair construction, list partitioning, and jsPsych/JATOS deployment.

Ukrainian specifics worth noting:

  • Lexicons are built from VESUM Unimorph adaptation rather than standard UniMorph that uses Wiktionary, via a UniMorphAdapter subclass in utils/vesum_adapter.py. This is enabled by a small, overridable _load_dataset hook added to UniMorphAdapter (bead/resources/adapters/unimorph.py), so a subclass can read a non-standard file layout without touching the rest of the adapter. The hook and its test are the only bead/ change in this PR.
  • Pairs contrast morphological case rather than word order, since Ukrainian argument structure is case-marked. Case forms are filtered to unambiguous ones.
  • Verb selection is frequency-based, driven by a committed wordfreq-derived table (resources/verb_frequencies.csv). build_frequencies.py regenerates it, but is meant to be run rarely so the pipeline does not depend on wordfreq at run time.
  • Scoring uses a masked-LM scorer for pair construction and a causal LM for final scoring.

Depends on

This example relies on the core changes in the companion PR #11 against main (constraint-type defaults and the model dtype passthrough): generate_lists.py constructs constraints without restating constraint_type, and create_2afc_pairs.py passes a dtype.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Tests (adding or updating tests)

Checklist

  • I have read the CONTRIBUTING guidelines
  • My code follows the project's style guidelines
  • I have run uv run ruff check . and uv run ruff format .
  • I have run uv run pyright with no errors
  • I have added tests that prove my fix/feature works
  • All tests pass (uv run pytest tests/)
  • I have updated documentation as needed

Testing

tests/resources/adapters/test_unimorph.py covers the one bead/ change: a subclass overriding _load_dataset is used in place of the module-level loader.

The Ukrainian pipeline itself is excluded from CI, matching how gallery/eng/ and gallery/kor/ are treated. Generated data is not committed. A gallery README.md documents the pipeline and how to run it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant