SlowGuess/ACL_2020_OCR huggingface dataset:
Adina Williams<sup>3</sup> Tiago Pimentel<sup>6</sup> Arya D. McCarthy<sup>5</sup>  
Hagen Blix<sup>H</sup> Eleanor Chodroff<sup>R</sup> Ryan Cotterell<sup>8,9</sup>
<sup>3</sup>Facebook AI Research <sup>4</sup>University of Cambridge <sup>5</sup>Johns Hopkins University <sup>6</sup>New York University <sup>7</sup>University of York <sup>8</sup>ETH Zürich
adinawilliams@fb.com, tp472@cam.ac.uk,
arya@jhu.edu, hagen.blix@nyu.edu,
eleanor.chodroff@york.ac.uk, ryan.cotterell@inf.ethz.ch
The noun lexica of many natural languages are divided into several declension classes with characteristic morphological properties. Class membership is far from deterministic, but the phonological form of a noun and its meaning can often provide imperfect clues. Here, we investigate the strength of those clues. More specifically, we operationalize "strength" as measuring how much information, in bits, we can glean about declension class from knowing the form and meaning of nouns. We know that form and meaning are often also indicative of grammatical gender—which, as we quantitatively verify, can itself share information with declension class—so we also control for gender. We find for two Indo-European languages (Czech and German) that form and meaning share a significant amount of information with class (and contribute additional information beyond gender). The three-way interaction between class, form, and meaning (given gender) is also significant. Our study is important for two reasons: First, we introduce a new method that provides additional quantitative support for a classic linguistic finding that form and meaning are relevant for the classification of nouns into declensions. Second, we show not only that individual declension classes vary in the strength of their clues within a language, but also that the variations between classes vary across languages. The code is publicly available at https://github.com/rycolab/declension-mi.
To an English speaker learning German, it may come as a surprise that one cannot necessarily predict the plural form of a noun from its singular. This is because pluralizing nouns in English is relatively simple: Usually we merely add an  $-s$  to the end (e.g.,  $cat\mapsto cats$ ). Of course, not all English nouns follow such a simple rule (e.g., child  $\mapsto$  children, sheep  $\mapsto$  sheep, etc.), but those that do
Figure 1: The conditional entropies (H) and mutual information quantities (MI) of form  $(W)$ , meaning  $(V)$ , and declension class  $(C)$ , given gender  $(G)$  in German and Czech.
not are few in number. Compared to English, German has comparatively many common morphological rules for inflecting nouns. For example, some plurals are formed by adding a suffix to the singular: Insekt 'insect'  $\mapsto$  Insekt-en, Hund dog  $\mapsto$  Hund-e, Radio radio  $\mapsto$  Radio-s. For others, the plural is formed by changing a stem vowel: Mutter 'mother'  $\mapsto$  Mutter, or Nagel 'nail'  $\mapsto$  Nagel. Some others form plurals with both suffixation and vowel change: Haus house  $\mapsto$  Haus-er and Koch chef  $\mapsto$  Köch-e. Still others, like Esel donkey, have the same form in plural and singular. The problem only worsens when we consider other inflectional morphology, such as case.
Disparate plural formation and case rules of the kind described above split nouns into declension classes. To know a noun's declension class is to know which morphological form it takes in which context (e.g., Benveniste 1935; Wurzel 1989; Nübling 2008; Ackerman et al. 2009; Ackerman and Malouf 2013; Beniamine and Bonami 2016; Bonami and Beniamine 2016). But, this begs the question: What clues can we use to predict the class for a noun? In some languages, predicting declension class is argued to be easier if we know the noun's phonological form (Aronoff, 1992;
This vowel change, umlaut, corresponds to fronting.
6682
Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6682-6695
Dressler and Thornton, 1996) or lexical semantics (Carstairs-McCarthy, 1994; Corbett and Fraser, 2000). However, semantic and phonological clues are, at best, only very imperfect hints as to class (Wurzel, 1989; Harris, 1991, 1992; Aronoff, 1992; Halle and Marantz, 1994; Corbett and Fraser, 2000; Aronoff, 2007). Given this, we quantify how much information a noun's form and meaning share with its class, and determine whether that amount of information is uniform across classes.
To do this, we measure the mutual information (Cover and Thomas, 2012) both between declension class and meaning (i.e., distributional semantic vector) and between declension class and form (i.e., orthographic form), as in Figure 1. We select two Indo-European languages (Czech and German) that have declension classes. We find that form and meaning both share significant amounts of information, in bits, with declension class in both languages. We further find that form clues are stronger than meaning clues; for form, we uncover a relatively large effect of 0.5–0.8 bits, while, for lexical semantics, a moderate one of 0.3–0.5 bits. We also measure the three-way interaction between form, meaning, and class, finding that phonology and semantics contribute overlapping information about class. Finally, we analyze individual inflection classes and uncover that the amount of information they share with form and meaning is not uniform across classes or languages.
2 Declension Classes in Language
The morphological behavior of declension classes is quite complex. Although various factors are undoubtedly relevant, we focus on phonological and lexical semantic ones here. We have ample reason to suspect that phonological factors might affect class predictability. In the most basic sense, the form of inflectional suffixes are often altered based on the identity of the final segment of the stem. For example, the English plural suffix is spelled as -s after most consonants, like in cats, but as -es if it appears after an s, sh, z, ch etc., like in 'mosses', 'rushes', 'quizzes', 'beaches' etc. Often differences such as these in the spelling of plural affixes or declension class affixes are due to phonological rules that are noisily realized in orthography; there could also be regularities between form and class that do not correspond to phonological rules but still have an effect. For example, statistical regularities over phonological segments
in continuous speech guide first-language acquisition (Maye et al., 2002), even over non-adjacent segments (Newport and Aslin, 2004). Statistical relationships have also been uncovered between the sounds in a word and the word's syntactic category (Farmer et al., 2006; Monaghan et al., 2007; Sharpe and Marantz, 2017) and between the orthographic form of a word and its argument structure valence (Williams, 2018). Thus, we expect the form of a noun to provide clues to declension class.
Semantic factors too are often relevant for determining certain types of morphologically relevant classes, such as grammatical gender, which is known to be related to declension class. It has been claimed that there are only two types of gender systems: semantic systems (where only semantic information is required) and formal systems (where semantic information as well as morphological and phonological factors are relevant) (Corbett and Fraser, 2000, 294). Moreover, a large typological survey, Qian et al. (2016), finds that meaningful-sensitive grammatical properties, such as gender and animacy, can be decoded well from distributional word representations for some languages, but less well for others. These examples suggest that it is worth investigating whether noun semantics provides clues about declension class.
Lastly, form and meaning might interact with one another, as in the case of phonaesthems where the sounds of words provide non-arbitrary clues about their meanings (Sapir, 1929; Wertheimer, 1958; Holland and Wertheimer, 1964; Maurer et al., 2006; Monaghan et al., 2014; D'Onofrio, 2014; Dingemanse et al., 2015; Dingemanse, 2018; Pimentel et al., 2019). Therefore, we check whether form and meaning together share information with declension class.
2.1 Orthography as a proxy for phonology?
We motivate an investigation into the relationship between the form of a word and its declension class by appealing, at least partly, to phonological motivations. However, we make the simplifying assumption that phonological information is adequately captured by orthographic word forms—i.e., strings of written symbols, which are also known as graphemes. In general, one should question this assumption (Vachek, 1945; Luelsdorff, 1987; Sproat, 2000, 2012; Neef et al., 2012). For the particular languages we investigate here—Czech and German—it is less problematic, as they are have
6683
fairly "transparent" mappings between spelling and pronunciation (Matejcek, 1998; Miles, 2000; Caravolas and Volin, 2001), which enables them to achieve higher performance on grapheme-to-phoneme conversion than do English and other "opaque" orthographic systems (Schlippe et al., 2012). These studies suggest that we are justified in taking orthography as a proxy for phonological form. Nonetheless, to mitigate against any phonological information being inaccurately represented in the orthographic form (e.g., vowel lengthening in German), several of our authors, who are fluent reader-annotators of our languages, checked our classes for any unexpected phonological variations. We exhibit examples in §3.
2.2 Distributional Lexical Semantics
We adopt a distributional approach to lexical semantics (Harris 1954; Mitchell and Lapata 2010; Turney and Pantel 2010; Bernardi et al. 2015; Clark 2015; inter alia) that relies on pretrained word embeddings for this paper. We do this for multiple reasons: First, distributional semantic approaches to create word vectors, such as WORD2VEC (Mikolov et al., 2013), have been shown to do well at extracting lexical features such as animacy and taxonomic information (Rubinstein et al., 2015) and can also recognize semantic anomaly (Vecchi et al., 2011). Second, the distributional approach to lexical meaning yields a straightforward procedure for extracting "meaning" from text corpora at scale.
2.3 Controlling for grammatical gender?
Grammatical gender has been found to interact with lexical semantics (Schwichtenberg and Schiller, 2004; Williams et al., 2019, 2020), and often can be determined from form (Brooks et al., 1993; Dobrin, 1998; Frigo and McDonald, 1998; Starreveld and La Heij, 2004). This means that it cannot be ignored in the present study. While the precise nature of the relationship between declension class and gender is far from clear, it is well established that the two should be distinguished (Aronoff 1992; Wiese 2000; Kurschner and Nübling 2011; inter alia). We first measure the amount of information shared between gender and class, according to the methods described in §4, to verify that the predicted relationship exists. We then verify that gender and class overlap in information in German and Czech to a high degree, but that we cannot reduce one to the other (see Table 3 and §6). We proceed to control for gender, and subsequently
measure how much additional information form and meaning provide about declension class.
For our study, we need orthographic forms of nouns, their associated word vectors, and their declension classes. Orthographic forms can be found in any large text corpus or dictionary. We isolate noun lexemes (i.e., or syntactic category-specific representations of words) by language. We select Czech nouns from UniMorph (Kirov et al., 2018) and German nouns from CELEX2 (Baayen et al., 1995). For lexical semantics, we trained 300-dimensional WORD2VEC vectors on language-specific Wikipedia.
We select the nominative singular form as the donor for both orthographic and lexical semantic representations because it is the lemma in Czech and German. It is also usually the stem for the rest of the morphological paradigm. We restrict our investigation to monomorphemic lexemes because: (i) one stem can take several affixes which would multiply its contribution to the results, and (ii) certain affixes come with their own class.<sup>3</sup>
Compared to form and meaning, declension class is a bit harder to come by, because it requires linguistic annotation. We associated lexemes with their classes on a by-language basis by relying on annotations from fluent speaker-linguists, either for class determination (for Czech) or for verifying existing dictionary information (for German). For Czech, declension classes were derived by an edit distance heuristic over affix forms, which grouped lemmata into subclasses if they received the same inflectional affixes (i.e., they constituted a morphological paradigm). If orthographic differences between two sets of suffixes in the lemma form could be accounted for by positing a phonological rule, then the two sets were collapsed into a single set; for example, in the "feminine -a" declension class, we collapsed forms for which the dative singular suffix surfaces as -e following a coronal continuant consonant (figurka:figurce 'figurine.DAT.SG'), -i following a palatal nasal (piraña:pirañi 'piranha.DAT.SG'), and as -e following all other consonants (kráva:kráve 'cow.DAT.SG'). As for meaning, descriptively, gender is roughly a superset of declension classes in Czech; among the masculine classes, animacy is
2We use the GENSIM toolkit (Rehurek and Sojka, 2010).
3Since these require special treatment, they are set aside.
6684
Original	Final	Training	Validation	Test	Average Length	# Classes
Czech	3011	2672	2138	267	267	6.26	13
German	4216	3684	2948	368	368	5.87	16
Table 1: Number of words in dataset. Counts per language-category pair are listed both before and after preprocessing, train-validation-test split, average stem length, and # of classes. Since we use 10-fold cross-validation, all instances are included in the test set at some point, and are used to estimate the cross-entropies in §5.
a critical semantic feature, whereas form seems to matter more for feminine and neuter classes.
For German, nouns came morphologically parsed and lemmatized, as well as coded for class in CELEX2. We also use CELEX2 to isolate monomorphemic noun lexemes and bin them into classes; however, CELEX2 declension classes are more fine-grained than traditional descriptions of declension class—mappings between CELEX2 classes and traditional linguistic descriptions of declension class (Alexiadou and Müller, 2008) are provided in Table 4 in the Appendix. The CELEX2 declension class identifier scheme has multiple subparts. Each declension class identifier includes: (i) the number prefix (being 'S' is for singular, or 'P' for plural), (ii) the morphological form identifier—zero refers to paradigmatically missing forms (e.g., plural is zero for singularia tantum nouns), and other numbers refer to a form identifier of particular morphological processes (e.g., genitive applies an additional suffix for singular masculine nouns, but never for feminines)—and (iii) an optional 'u' identifier, which refers to vowel umlaut, if present. More details of the German preprocessing steps are in the Appendix.
After associating nouns with forms, meanings, and classes, we perform exclusions: Because frequency affects class entropy (Parker and Sims, 2015), we removed all classes with fewer than 20 lexemes.4 We subsequently removed all lexemes which did not appear in our WORD2VEC models trained on Wikipedia dumps. The final tally of Czech yields 2672 nouns in 13 declension classes, and the final tally of German yields 3684 nouns in 16 declension classes, which can be broken into 3 types of singular and 7 types of plural. Table 5 in the Appendix provides final lexeme counts by declension class.
The remaining lexemes were split into 10 folds: one for testing, another for validation, and the remaining eight for training. Table 1 shows train-validation-test splits, average length of nouns, and
number of declension classes, by language.
Notation. We define each lexeme in a language as a triple. Specifically, the  $i^{\mathrm{th}}$  triple consists of an orthographic word form  $\mathbf{w}_i$ , a distributional semantic vector  $\mathbf{v}_i$  that encodes the lexeme's semantics, and a declension class  $c_i$ . We assume these triples follow a (unknown) probability distribution  $p(\mathbf{w},\mathbf{v},c)$  —which can be marginalized to obtain  $p(c)$ , for example. We take the space of word forms to be the Kleene closure over a language's alphabet  $\Sigma$ ; thus, we have  $\mathbf{w}_i\in \Sigma^*$ . Our distributional semantic space is a high-dimensional real vector space  $\mathbb{R}^d$  where  $\mathbf{v}_i\in \mathbb{R}^d$ . The space of declension classes is language-specific and contains as many elements as the language has classes, i.e.,  $\mathcal{C} = \{1,\dots ,K\}$  where  $c_{i}\in \mathcal{C}$ . For each noun, a gender  $g_{i}$  from a language-specific space of genders  $\mathcal{G}$  is associated with the lexeme. In both Czech and German,  $\mathcal{G}$  contains three genders: feminine, masculine, and neuter. We also consider four random variables: a  $\Sigma^{*}$ -valued random variable  $W$ , an  $\mathbb{R}^d$ -valued random variable  $V$ , a  $\mathcal{C}$ -valued random variable  $C$  and a  $\mathcal{G}$ -valued random variable  $G$ .
Bipartite Mutual Information. Bipartite MI (or, simply MI) is a symmetric quantity that measures how much information (in bits) two random variables share. In the case of  $C$  (declension class) and  $W$  (orthographic form), we have
$$
\operatorname {M I} (C; W) = \operatorname {H} (C) - \operatorname {H} (C \mid W) \tag {1}
$$
As can be seen, MI is the difference between an unconditional and a conditional entropy. The unconditional entropy is defined as
$$
\mathrm {H} (C) = - \sum_ {c \in \mathcal {C}} p (c) \log p (c) \tag {2}
$$
and the conditional entropy is defined as
$$
\begin{array}{l} \mathrm {H} (C \mid W) = \tag {3} \\ - \sum_ {c \in \mathcal {C}} \sum_ {\mathbf {w} \in \Sigma^ {*}} p (c, \mathbf {w}) \log p (c \mid \mathbf {w}) \\ \end{array}
$$
4We ran another version of our models that included all the original classes and observed no notable differences.
6685
The mutual linformation  $\mathrm{MI}(C;W)$  naturally encodes how much the orthographic word form tells us about its corresponding lexeme's declension class. Likewise, to measure the interaction between declension class and lexical semantics, we also consider the bipartite mutual information  $\mathrm{MI}(C;V)$ .
Tripartite Mutual Information. To consider the interaction between three random variables at once, we need to generalize MI to three classes. One can calculate tripartite MI as follows:
$$
\begin{array}{l} \operatorname {M I} (C; W; V) = \tag {4} \\ \operatorname {M I} (C; W) - \operatorname {M I} (C; W \mid V) \\ \end{array}
$$
As can be seen, tripartite MI is the difference between a bipartite MI and a conditional bipartite MI. The conditional bipartite MI is defined as
$$
\operatorname {M I} (C; W \mid V) = \operatorname {H} (C \mid V) - \operatorname {H} (C \mid W, V) \tag {5}
$$
Essentially, Equation 4 is the difference between how much  $C$  and  $W$  interact and how much they interact after "controlling" for the meaning  $V$ .<sup>5</sup>
Controlling for Gender. Working with mutual information also gives us a natural way to control for quantities that we know influence meaning and form. We do this by considering conditional MI. We consider both bipartite and tripartite conditional mutual information. These are defined as follows:
$$
\begin{array}{l} \operatorname {M I} (C; W | G) = \tag {6a} \\ \mathrm {H} (C \mid G) - \mathrm {H} (C \mid W, G) \\ \end{array}
$$
$$
\operatorname {M I} (C; W; V \mid G) = \tag {6b}
$$
$$
\operatorname {M I} (C; W \mid G) - \operatorname {M I} (C; W \mid V, G)
$$
Estimating these quantities tells us how much  $C$  and  $W$  (and, in the case of tripartite MI,  $V$  also) interact after we take  $G$  (the grammatical gender) out of the picture. Figure 1 provides a graphical summary for this section until this point.
Normalization. To further contextualize our results, we consider two normalization schemes for MI. Normalizing renders MI estimates across languages more directly comparable (Gates et al.,
2019). We consider the normalized mutual information, i.e., which fraction of the unconditional entropy is the mutual information:
$$
\operatorname {N M I} (C; W) = \frac {\operatorname {M I} (C ; W)}{\min  \left\{\mathrm {H} (C) , \mathrm {H} (W) \right\}} \tag {7}
$$
This yields a percentage of the entropy that the mutual information accounts for—a more interpretable notion of the predictability between class and form or meaning. In practice,  $\mathrm{H}(C) \ll \mathrm{H}(W)$  in most cases and our normalized mutual information is termed the uncertainty coefficient (Theil, 1970):
$$
\mathrm {U} (C \mid W) = \frac {\mathrm {M I} (C ; W)}{\mathrm {H} (C)} \tag {8}
$$
5 Computation and Approximation
In order to estimate the mutual information quantities of interest per §4, we need to estimate a variety of entropies. We derive our mutual information estimates from a corpus  $\mathcal{D} = \{\left(\mathbf{v}_i,\mathbf{w}_i,c_i\right)\}_{i = 1}^N$
5.1 Plug-in Estimation of Entropy
The most straightforward quantity to estimate is  $\mathrm{H}(C)$ . Given a corpus, we may use plug-in estimation: We compute the empirical distribution over declension classes from  $\mathcal{D}$ . Then, we plug that empirical distribution over declension classes  $\mathcal{C}$  into the formula for entropy in Equation 2. This estimator is biased (Paninski, 2003), but is a suitable choice given that we have only a few declension classes and a large amount of data. Future work will explore whether choice of estimator (Miller, 1955; Hutter, 2001; Archer et al., 2013, 2014) could affect the conclusions of studies such as this one.
5.2 Model-based Estimation of Entropy
In contrast, estimating  $\mathrm{H}(C\mid W)$  is non-trivial. We cannot simply apply plug-in estimation because we cannot compute the infinite sum over  $\Sigma^{*}$  that is required. Instead, we follow previous work (Brown et al., 1992; Pimentel et al., 2019) in using the cross-entropy upper bound to approximate  $\mathrm{H}(C\mid W)$  with a model. More formally, for any probability distribution  $q(c\mid \mathbf{w})$  , we have
$$
\begin{array}{l} \mathrm {H} (C \mid W) \leq \mathrm {H} _ {q} (C \mid W) \tag {9} \\ = - \sum_ {c \in \mathcal {C}} \sum_ {\mathbf {w} \in \Sigma^ {*}} p (c, \mathbf {w}) \log q (c \mid \mathbf {w}) \\ \end{array}
$$
To circumvent the need for infinite sums, we use a held-out sample  $\tilde{\mathcal{D}} = \{(\tilde{\mathbf{v}}_i,\tilde{\mathbf{w}}_i,\tilde{c}_i)\}_{i = 1}^M$  disjoint
We emphasize here the subtle, but important, typographic distinction between  $\mathrm{MI}(C;W;V)$  and  $\mathrm{MI}(C;W,V)$ . (The difference in notation lies in the comma replacing the semicolon.) While the first (tripartite MI) measures the amount of (redundant) information shared by the three variables, the second (bipartite) measures the (total) information that class shares with either the form or the lexical semantics.
6686
from  $\mathcal{D}$  to approximate the true cross-entropy  $\mathrm{H}_q(C\mid W)$  with the following quantity
$$
\hat {\mathrm {H}} _ {q} (C \mid W) = - \frac {1}{M} \sum_ {i = 1} ^ {M} \log q (\tilde {c} _ {i} \mid \tilde {\mathbf {w}} _ {i}) \tag {10}
$$
where we assume the held-out data is distributed according to the true distribution  $p$ . We note that  $\hat{\mathrm{H}}_q(C\mid W)\to \mathrm{H}_q(C\mid W)$  as  $M\rightarrow \infty$ . While the exposition above focuses on learning a distribution  $q(c\mid \mathbf{w})$  for classes and forms to approximate  $\mathrm{H}(C\mid W)$ , the same methodology can be used to estimate all necessary conditional entropies.
Form and gender:  $q(c \mid w, g)$ . We train one LSTM classifier (Hochreiter and Schmidhuber, 1996) for each language. The last hidden state of the LSTM models is fed into a linear layer and then a softmax non-linearity to obtain probability distributions over declension classes. To condition our model on gender, we embed each gender and feed it into each LSTM's initial hidden state.