Abstract
Critical to natural language generation is the production of correctly inflected text. In this paper, we isolate the task of predicting a fully inflected sentence from its partially lemmatized version. Unlike traditional morphological inflection or surface realization, our task input does not provide "gold" tags that specify what morphological features to realize on each lemmatized word; rather, such features must be inferred from sentential context. We develop a neural hybrid graphical model that explicitly reconstructs morphological features before predicting the inflected forms, and compare this to a system that directly predicts the inflected forms without relying on any morphological annotation. We experiment on several typologically diverse languages from the Universal Dependencies treebanks, showing the utility of incorporating linguistically-motivated latent variables into NLP models.
Introduction
Producing grammatically correct text is a fundamental requirement for natural language generation (NLG) systems, such as machine translation or dialogue agents. A central component of this is morphological inflection—the process of adapting a base word (lemma) to its correct surface form based on its grammatical role. For instance, the sequence "two cat be sitting" must be correctly realized as "two cats were sitting."
Historically, research in computational morphology has relied on "gold" tags provided at test time. However, in practical NLG, these tags are not available and must be inferred from the context. This paper addresses the task of "contextual inflection," where the model must determine necessary morphosyntactic rules, such as subject-verb agreement, directly from sentential context.
Methodology
We propose a structured neural model represented as a hybrid (directed–undirected) graphical model. Rather than mapping a lemmatized context directly to an inflected word, the model treats morphological tags as intermediate latent variables in a two-step process:
- Neural Conditional Random Field (CRF): The model processes the lemmatized sequence using a bidirectional LSTM. A CRF then predicts the most likely sequence of morphological tags (e.g., Part-of-Speech, Number, Tense) for the entire sentence.
- Morphological Inflector: A neural encoder-decoder model with hard attention takes the lemma and the predicted tag to generate the inflected word character-by-character.
This architecture allows the model to explicitly reconstruct the grammatical structure of a sentence, leveraging linguistic constraints to improve generation accuracy.
Experimental Setup
The model was evaluated using the Universal Dependencies (UD) v1.2 treebanks across ten typologically diverse languages, including English, Bulgarian, Finnish, and Basque. Word vectors were initialized using FastText embeddings to provide a robust starting point for the neural components.
Results and Discussion
The proposed joint model (JOINT) consistently outperformed the DIRECT baseline, which attempts to predict surface forms without explicit morphological tags. This confirms that explicitly modeling linguistic structure is more effective than an end-to-end black-box approach.
Key findings include:
- Linguistic Structure: Intermediate tag prediction is highly effective, especially for contextual categories like adjective-noun agreement.
- Morphological Complexity: Performance remains lower for languages with rich case systems or agglutinative properties (e.g., Finnish and Basque), where the agreement space is significantly larger.
- Inherent vs. Contextual Categories: The model struggles with "inherent" categories like noun number or verb tense when the context is ambiguous. For example, "the cat be sitting" could validly be singular or plural; without semantic intent, the model must guess.
Conclusion
Our results demonstrate the value of incorporating linguistically-motivated latent variables into neural NLP models. By explicitly reconstructing morphological features, the JOINT model achieves superior performance across a range of languages. Future research will focus on improving the handling of long-distance dependencies and integrating semantic information to resolve inherent morphological ambiguities.
Summary updated