Source-linked AI summary

Lost in Translation? Exploring the Shift in Grammatical Gender from Latin to Occitan

Ahan Chatterjee, Matthias Schöffel, Matthias Aßenmacher, Marinus Wiedner, Esteban Garces Arias

arXiv:2605.09156v2cs.CLcs.AI

TL;DR

The paper addresses how grammatical gender information is distributed between morphology and context during Medieval Occitan’s shift from Latin’s three-gender system to two genders. It develops an interpretable deep-learning framework using robust tokenization and lexical and contextual analyses. The findings identify suffix morphology as the strongest single signal, with agreement cues adding information when lemmas are ambiguous.

  • Problem

    The study addresses limited evidence about how Latin neuter nouns were reassigned in Medieval Occitan and how gender information is distributed between word form and sentence context.

  • Method

    The paper analyzes annotated Latin–Occitan corpora with an interpretable framework that separates lemma-internal morphological features from morpho-syntactic context in gender prediction.

  • Results

    Suffix morphology carries the strongest single gender signal, while articles, adjectives, and other agreeing dependents provide additional contextual cues that can shift predictions for ambiguous lemmas.

  • Takeaways & Limitations

    Gender in Medieval Occitan has a two-layer structure: lexical morphology provides primary encoding, while agreement and contextual patterns reflect its realization in usage.

  • Takeaways & Limitations

    The corpus is relatively small and label-imbalanced, and automatic PoS tagging is approximately 71% accurate, potentially biasing minority-class generalization and PoS-based attribution.

Abstract

from arXiv · show

The diachronic evolution from Latin to the Romance languages involved a restructuring of the grammatical gender system from a tripartite configuration (masculine, feminine, neuter) to a bipartite one (masculine, feminine) in most Romance languages. In this work, we introduce an interpretable deep learning framework to investigate this phenomenon at both lexical and contextual levels. First, we show that conventional tokenization strategies are insufficiently robust for this low-resource historical setting, and that our proposed tokenizer improves performance over these baselines. At the lexical level, we evaluate the contribution of morphological features to gender prediction. At the contextual level, we quantify the contributions of different part-of-speech categories to grammatical gender prediction. Together, these analyses characterize the distribution of gender information between the lemma and its sentential context. We make our codebase, datasets, and results publicly available at \href{https://github.com/ahan-2000/Lost-in-Translation-}{https://github.com/ahan-2000/Lost-in-Translation-}.

1 Introduction

The paper studies grammatical gender in Medieval Occitan, a low-resource and orthographically unstable descendant of Latin. It asks how gender information from Latin neuter nouns is distributed between word-level morphology and morpho-syntactic context.

  • Medieval Occitan is a neglected low-resource language with scarce resources, extensive spelling variation, and dialectal fragmentation.
  • Occitan inherited Latin’s transition from three grammatical genders to two, but the factors governing neuter reassignment remain insufficiently understood.
  • The study examines how morphological features and morpho-syntactic context contribute to gender predictions for nouns descended from Latin neuters.
  • Lexical-Level Analysis: The lexical analysis tests whether Occitan gender can be predicted from word-level phonological and morphological characteristics.
  • Contextual Analysis: The contextual analysis investigates how gender information is distributed between noun-internal morphology and sentence-level morpho-syntactic cues.

2 Related Work

Prior research identifies phonological, morphological, semantic, and contextual cues in grammatical gender assignment. However, many existing approaches are rule-based and language-specific, motivating computational methods that combine lexical and contextual information.

  • Rule-based gender assignment methods, including French ending lists, are language-specific and have limited generalizability across languages.
  • Gender assignment commonly combines morpho-phonological cues with semantic principles such as natural gender for animate nouns.
  • In Occitan, formal phonological and morphological cues predominate for inanimate nouns, while semantic gender applies in certain contexts.
  • Orthographic-form features improve statistical gender prediction beyond baseline, confirming the predictive value of morpho-phonological cues.
  • Combining morphological analysis with contextual cues such as gendered articles and adjectives improves identification, including for previously unseen words.

3 Data Description

The study uses annotated Latin–Occitan data from three Medieval Occitan sources and raw texts for contextual analysis. Its initial analysis finds that Latin neuters shifted into both masculine and feminine genders, with morphology associated with the outcomes.

  • The annotated dataset combines Latin words, corresponding Occitan lemmata, and grammatical gender labels from three Medieval Occitan sources.The sources are Lo Codi, the Chanson de la Croisade Albigeoise, and the DOM Dictionary Project.
  • The dataset contains 40.85% unique lemmas from DOM, 46.39% from Lo Codi, and 12.76% from Croisade.
  • Raw Occitan texts are additionally used to analyze contextual gender cues.
  • Gender-shift frequencies: 3,055 Latin neuter nouns shifted to masculine gender, compared with 1,448 shifting to feminine gender.
  • Morphological patterns: The ending -um is common among both masculine and feminine outcomes, whereas -ia and -la correlate more clearly with feminine outcomes.

4 Preliminary Analysis: Model and Tokenization Selection

The preliminary study selects mBERT and a hybrid tokenizer for Medieval Occitan’s sparse and variable spelling environment. Hybrid segmentation preserves coverage and improves masked recovery, while domain-adaptive MLM fine-tuning further improves validation fit.

  • Selection criteria: The study compares embedding families and tokenization policies using gender prediction, Latin-to-Occitan variant retrieval, clustering, OOV rate, and masked-token recovery.
  • Embedding selection: mBERT performs best across frozen gender prediction, variant retrieval, and clustering, so it becomes the downstream embedding backbone.
  • Tokenization policy: Hybrid segmentation isolates orthographic and morphological variation, such as nc/mp alternations and optional adverbial -t.
  • Tokenization policy: The hybrid tokenizer preserves full coverage with zero [UNK] tokens and achieves 25.23% masked recovery.
  • Domain-adaptive fine-tuning: Hybrid-vocabulary MLM fine-tuning reaches validation perplexity 9.52, compared with 10.44 for standard MLM adaptation and 942.85 before adaptation.
  • Final setup: The selected backbone for subsequent experiments is mBERT with hybrid tokenization and MLM adaptation.

5 Methodology

The methodology predicts Occitan’s bipartite grammatical gender from lexical features and sentence context, using aligned Latin–Occitan data and controlled contextual configurations. It combines engineered morphology, pretrained embeddings, lemma-level evaluation, and attention- or masking-based context representations.

  • Task and data: The task predicts Occitan grammatical gender as masculine or feminine using lexical information and agreement-bearing sentence context.Occitan gender is typically realized through noun morphology and agreement, while articles, adjectives, and other dependents provide contextual cues.
  • Feature representation and engineering: Lexical representations combine normalized character substrings and suffix n-grams, syllabic structure, approximate stress position, length features, and alternative pretrained embeddings.The embedding sets are FastText, mBERT, and ByT5; they are compared separately rather than concatenated.
  • Experimental setup: Evaluation uses lemma-grouped 10-fold cross-validation, diverse classifiers, class-weighted training, focal loss, and Optuna tuning with validation Macro-F1.Lemma-level grouping prevents orthographic variants of the same lemma from crossing training and validation folds.
  • Contextual methodology: Contextual analysis compares word-only, noun-conditioned context-focused, and masked-context representations for predicting a target noun’s gender.The masked-context setting removes the noun and uses its position’s encoded state to assess recovery from surrounding agreement cues.
  • Task and data: The dataset aligns Occitan noun occurrences with Latin lemmas, both genders, and containing sentences using exact or thresholded fuzzy lemma matching.Unmatched items are skipped when no reliable match is found.
  • Contextual methodology: Masked-context performance is interpreted as distributed gender encoding in agreeing articles, adjectives, and other dependents rather than as an independent contextual signal.Token-level contributions are additionally aggregated by part-of-speech category.

6 Results and Discussion

Lemma-level morphology provides the strongest gender signal, while sentence context substantially improves predictions when the lemma alone is insufficient. Contextual evidence is concentrated in nouns, determiners, and adjectives.

  • Lemma-level gender prediction: Neural sequence models with attention outperform shallow baselines, with the best Macro-F1 from a 2× BiLSTM + MHSA model using imbalance-aware objectives and mBERT or ByT5.Pretrained multilingual representations provide more informative lexical cues than static embeddings.
  • Feature ablations: 1.6–1.8 Macro-F1 points: removing Latin and Occitan character n-grams, especially suffix cues, causes the largest performance decrease.Length and meta-features contribute 0.7–1.3 points, while VC templates and stress proxies have smaller effects.
  • Feature attributions: Suffix and length-related meta-features dominate SHAP decisions across embedding modalities, while heuristic stress cues require cautious interpretation.The stress proxy occasionally receives non-trivial attribution but may introduce noise.
  • Impact of Contextual Cues: 0.665 → 0.929 Macro-F1: adding sentence context substantially improves over the word-only baseline, while masking the noun reaches 0.902 and remains below the unmasked setting.The noun form carries most gender signal, with context adding disambiguation.
  • Impact of Contextual Cues: Nouns contribute the largest positive contextual delta, followed by determiners and adjectives, indicating that gender evidence is distributed across agreeing elements.The PoS-wise effects are stable but modest; CCONJ, ADP, and VERB are negative, while PUNCT and PRON are not significant.

7 Conclusion

Gender information in Medieval Occitan is distributed between lemma-internal morphology and sentence-level context. Morphology supplies the primary structural encoding, while agreement patterns reflect its contextual realization.

  • Conclusion: Suffix morphology carries the strongest single gender signal, while articles, adjectives, and other agreeing dependents provide additional contextual cues.When the lemma is ambiguous, these contextual cues can shift the model’s prediction.
  • Conclusion: Hybrid tokenization with domain-adaptive MLM is presented as a response to historical orthographic instability and brittle standard tokenization.The framework compares lexical and contextual signals through prediction and attribution analyses.

Limitations

The study is constrained by a relatively small, imbalanced corpus, heuristic preprocessing choices, and imperfect automatic PoS tagging. These limitations may affect minority-class generalization, introduce mild feature noise, and constrain PoS-based attribution.

  • The corpus is genre-diverse but relatively small and approximately 2:1 masculine-to-feminine imbalanced.This imbalance may limit minority-class generalization despite focal loss and class-weighted training.
  • Key preprocessing components were selected heuristically, including a fuzzy-matching threshold of τ = 0.85 and a stress-position proxy.
  • Ablation results suggest that the stress feature can introduce mild noise.
  • PoS-conditioned analyses rely on automatic tagging with approximately 71% tagging accuracy.This tagging accuracy constrains PoS-based attribution.

Ethics Statement

The study releases its code, datasets, preprocessing, modeling choices, and evaluation protocols for reproducible research. It also evaluates embeddings, tokenizers, and contextual analyses for low-resource Medieval Occitan gender prediction.

  • The authors release code, datasets, preprocessing, modeling choices, and evaluation protocols for reproducible research.
  • mBERT performs best across frozen gender prediction, Latin–Occitan variant retrieval, and clustering probes, motivating its use downstream.
  • BPE builds reusable subword vocabularies by repeatedly merging the most frequent adjacent symbol pairs.
  • The hybrid tokenizer retains zero OOV while improving masked token recovery over the evaluated alternatives.
  • The PoS-conditioned analyses inherit automatically predicted tagging errors; the manually evaluated tagger reaches 71.31% overall accuracy.

F.1 Statistical Significance for Lemma Experiment

The statistical analyses compare embedding models and contextual configurations under matched evaluation procedures. They report a reliable mBERT advantage over ByT5 and show that Latin features substantially amplify contextual gains.

  • mBERT achieves higher OOF Macro-F1 than ByT5, 0.7608 versus 0.7213, with a delta of +0.0395.The paired bootstrap 95% confidence interval remains strictly above zero, and no resample yields a non-positive delta.
  • With Latin lemma and gender features, context increases gold-class probability by approximately 0.28; without them, the increase falls to approximately 0.09–0.11.The ablation describes the latter increase as about three times smaller.

I Error Analysis

The error analysis examines 294 misclassifications using an interpretable SHAP-based surrogate. Context sparsity and sentence-level part-of-speech composition emerge as prominent error-related factors.

  • 294 misclassifications are analyzed with an XGBoost error predictor using 57 interpretable morphological, frequency, sentence, and syntactic features.TreeSHAP explanations are evaluated with 5-fold cross-validation and obtain ROC-AUC = 0.62.
  • The strongest error drivers include context sparsity, especially sentences with fewer agreement-bearing categories such as adjectives.Figure 9 identifies POS composition features among the top five drivers of error prediction.
Loading 2605.09156v2…