--- license: cc-by-nc-4.0 tags: - legal-nlp - multilingual - constitutions - machine-translation - comparative-law - mcwc dataset-name: MCWC --- # Multilingual Corpus of World’s Constitutions (MCWC) The **MCWC** is a curated multilingual corpus of constitutional texts from **191 countries**, including both current and historical versions. The dataset provides aligned constitutional content in **English, Arabic, and Spanish**, enabling comparative legal analysis and multilingual NLP research. This CSV version is a cleaned, structured, and sentence-aligned representation of the corpus, suitable for machine translation, information retrieval, and a wide range of legal NLP tasks. 📄 **Paper (OSACT @ LREC-COLING 2024):** https://aclanthology.org/2024.osact-1.7/ --- ## Contents of the dataset `MCWC.csv` contains: - **Constitutional text in three languages:** English, Arabic, Spanish - **Pairwise sentence alignments** using a stable `AlignID` - **Country and continent metadata** - **Cleaned and normalised text** for direct use in NLP pipelines - **Translations** for constitutions originally missing in Arabic or Spanish, generated using a fine-tuned NMT model - **One row per sentence**, enabling easy filtering and cross-lingual matching Typical columns include: - `country` - `continent` - `align_id` - `text_en` - `text_ar` - `text_es` - `constitution_year` - `language_source` (original vs. machine-translated) --- ## Motivation Constitutions form the legal and philosophical foundation of nation-states. However, constitutional research is often limited by: - fragmented access to multilingual versions - inconsistent formatting and metadata - lack of high-quality sentence alignment - scarcity of constitutional text in Arabic and Spanish The MCWC addresses these gaps by offering a unified and multilingual corpus built for computational analysis, comparative constitutional research, and machine translation development. The acronym **MCWC** is pronounced *“Makkuk”*, an Arabic word for *space shuttle*, chosen to symbolise the corpus’s role in enabling cross-lingual travel between legal systems. --- ## Data sources and preparation The corpus integrates material from: - the Comparative Constitutions Project - the Constitute Project - Wikipedia and various governmental archives Raw texts—primarily in XML—were normalised, cleaned, and sentence-segmented. For constitutions lacking Arabic or Spanish versions, we generated translations using a fine-tuned state-of-the-art MT model. A custom parser aligned sentences across languages using structural cues (article numbers, section labels, etc.), with each sentence assigned a persistent `AlignID` for alignment across all three languages. To support comparative analysis, we applied: - continent classification via gazetteer matching - tokenisation and normalisation - vocabulary overlap statistics - TF-IDF cosine-similarity analysis (English) The paper provides further detail, including heatmaps of by-continent overlap and cross-lingual similarity. --- ## Dataset statistics - **223 constitutions** - **191 countries** - **95 constitutions available in all three languages** - **52,177 aligned English–Arabic sentences** - **48,892 aligned English–Spanish sentences** - **27,352 aligned Arabic–Spanish sentences** - **236,156 parallel machine-generated sentences** (SeamlessM4T-v2) Across continents: - Africa: 65 constitutions - Asia: 54 - Europe: 49 - North America: 26 - South America: 15 - Oceania: 14 Average lengths and TTR values are reported in the paper. --- ## Intended uses The MCWC is designed to support: - multilingual machine translation - legal text analysis and retrieval - constitutional comparison and modelling - multilingual topic modelling - cross-lingual semantic similarity - legal corpus linguistics - training/testing MT systems for legal text Users may also employ the dataset to study variation in legal language across jurisdictions and historical periods. --- ## Translation and evaluation For missing Arabic/Spanish texts, English constitutions were translated using **Facebook’s Seamless-m4t-v2-large**. Evaluation included: - **BLEU = 0.68** on 500 manually inspected En–Ar and En–Es pairs - **Human annotation** by two Arabic NLP experts - Cohen’s Îș = 0.30 (due to label imbalance) - Krippendorff’s α ≈ 0.90 (robust reliability) Fine-tuned Marian NMT models trained on the MCWC consistently improved translation quality across all six language pairs. These models are available on HuggingFace. --- ### Train / Validation / Test Splits The original MCWC paper does not define an official train–validation–test split. To support reproducibility and facilitate machine-learning experiments, we provide a recommended **80/10/10** split using a fixed random seed. This ensures consistent partitioning whilst keeping the dataset fully shuffled. The split is applied over the complete CSV file (`MCWC.csv`) and does not use stratification, as constitutional texts vary considerably across countries and languages. ```python import pandas as pd from sklearn.model_selection import train_test_split # Load the full corpus df = pd.read_csv("MCWC.csv") # First split: train vs temporary (validation + test) train_df, temp_df = train_test_split( df, test_size=0.2, # 20% goes to val+test random_state=42, shuffle=True ) # Second split: create separate validation and test sets val_df, test_df = train_test_split( temp_df, test_size=0.5, # half of 20% → 10% each random_state=42, shuffle=True ) # Save the splits train_df.to_csv("MCWC_train.csv", index=False) val_df.to_csv("MCWC_val.csv", index=False) test_df.to_csv("MCWC_test.csv", index=False) print("Train:", len(train_df)) print("Validation:", len(val_df)) print("Test:", len(test_df)) ``` --- ## Ethical considerations and limitations - Source texts originate from open datasets (CCP, Constitute Project) and governmental archives. - This CSV is a *processed* and *aligned* derivative, not a redistribution of the original XML files. - Translation quality varies depending on source material and MT system limitations. - Some constitutions contain archaic, historical, or culturally-specific legal phrasing that may not translate literally. - Differences in translation providers (HeinOnline, IDEA, OUP, etc.) may introduce stylistic or interpretative variance. Users requiring original XML files should retrieve them directly from the Constitute Project. --- ## Citation If you use this dataset, please cite: **El-Haj, M. & Ezzini, S. (2024).** *The Multilingual Corpus of World’s Constitutions (MCWC).* OSACT Workshop @ LREC-COLING 2024. https://aclanthology.org/2024.osact-1.7/ --- ## Contact For questions or collaboration: **Mo El-Haj** UCREL NLP Group Lancaster University & VinUniversity Email: m.el-haj@lancaster.ac.uk / elhaj.m@vinuni.edu.vn