Data-construction pipeline for MultiIdiom: A Multilingual Idiom Detection Dataset with In-Context Idiomaticity Labels and Span Annotations.
The corpus, splits, and sociolinguistic metadata are released on the
HuggingFace Hub under CC-BY-SA 4.0: Justarandomperson/MultIdiom_Dataset.
This repo is the code that built it — scraping, LLM-based
labeling/standardization, and lookup/inference over the resulting idiom
inventory.
git clone https://github.com/JustLetMeBeHello/MultiIdiom.git
cd MultiIdiom
pip install -r requirements.txtMultiIdiom/
├── notebooks/
│ └── Idioms_scraper.ipynb ← idiom-list scraping (Wiktionary) and
│ idiomatic-example scraping (OPUS subtitles)
├── src/
│ ├── Seed_idiom_verifier.py ← validates scraped idiom lists before labeling
│ ├── Wikipedia_Sentence_extractor.py
│ ├── inference.py ← IdiomMatcher: idiom lookup over a language's
│ │ seed idiom file (used by Main.py)
│ ├── LLM_Prompting/ ← GPT-based labeling: idiom meanings
│ │ ├── Meaning_Prompting/ (Meaning_Prompting/), example/idiomaticity
│ │ ├── Example_prompting/ labeling (Example_prompting/), span
│ │ ├── Tagging/ tagging + retry passes (Tagging/)
│ │ └── Normalization/
│ ├── Standardizer/ ← post-labeling cleanup: id assignment,
│ │ gap-filling, duplicate/discrepancy checks
│ └── Database/ ← Supabase upload scripts for the labeled corpus
└── Main.py ← minimal usage example (IdiomMatcher lookup)
- Scrape idiom lists + idiomatic example sentences:
notebooks/Idioms_scraper.ipynb. - Verify seed idiom lists:
src/Seed_idiom_verifier.py. - Label with an LLM (meanings, idiomaticity, spans): scripts under
src/LLM_Prompting/, run per-language/per-batch (Meaning_Prompting/→Example_prompting/→Tagging/). - Standardize:
src/Standardizer/Standardizer_file.py(id assignment, gap-filling, duplicate/discrepancy detection). - Upload:
src/Database/upload_meanings.py,upload_span_examples.py.
The released HuggingFace dataset is the output of this pipeline; the raw scrape/label intermediates are not re-released (LLM API keys required to re-run labeling from scratch).
Code: MIT. The MultiIdiom dataset has its own license (CC-BY-SA 4.0), released separately on HuggingFace Hub.