W iki H an: A New Comparative Dataset for C hinese Languages (2022)

Abstract: Most comparative datasets of Chinese varieties are not digital; however, Wiktionary includes a wealth of transcriptions of words from these varieties. The usefulness of these data is limited by the fact that they use a wide range of variety-specific romanizations, making data difficult to compare. The current work collects this data into a single constituent (IPA, or International Phonetic Alphabet) and structured form (TSV) for use in comparative linguistics and Chinese NLP. At the time of writing, the dataset contains 67,943 entries across 8 varieties and Middle Chinese. The dataset is validated on a protoform reconstruction task using an encoder-decoder cross-attention architecture (Meloni et al 2021), achieving an accuracy of 54.11%, a PER (phoneme error rate) of 17.69%, and a FER (feature error rate) of 6.60%.

## introduction the chinese language family consists of many mutually unintelligible languages, which linguists cluster into seven well-established subgroups @xcite and a few more debated subgroups @xcite . each subgroup is made of varieties that may or may not be mutually unintelligible. most scholars of sinitic believe that all varieties except for min languages descended from middle chinese @xcite , which is a set of old varieties documented in qièyùn (切韻), a rhyme dictionary compiled in 601 ce. today, there are a total of 1.3 billion speakers of sinitic varieties, making the family one of the largest in terms of speaker count @xcite . eight of the subgroups have at least tens of millions of speakers. in all chinese-speaking societies except for hong kong, mandarin is the language of administration, meaning that other varieties are not commonly written, although it is possible to do so, either with han characters (chinese logographic characters) or romanized orthographies. because standard written chinese diverged from the spoken varieties over time @xcite , it is unclear which han characters should be used for transcription, for many words in the spoken varieties. however, scholars can trace from which "original character" in middle chinese or old chinese the modern word descended (běnzì 本字) @xcite . to determine the pronunciations of these original characters in middle chinese, historical linguists and dialectologists compare the pronunciations of words across modern sinitic varieties. more broadly, protoform reconstruction is the inference of morphemes or words as they appeared in the ancestral languages of a set of daughter languages. cognates-words deemed to descend from the same ancestral form-are inputs to the reconstruction, while this ancestral form is the output of the reconstruction. see to enable fair comparison across the daughter languages, the pronunciations should be in a common phonetic or phonemic transcription system, as opposed to divergent romanizations. the problem is that large datasets that do offer phonetic transcriptions such as the great dictionary of modern chinese dialects 現代漢語方言大詞典 @xcite are often in print form. wiktionary, on the other hand, offers a digital compilation of pronunciation entries across several sources manually entered by users (wiktionary contributors, 2022a). however, entries are stored in subgroup-specific romanizations on the back end. the ipa transcrip-tions are generated on the front end by lua scripts that convert romanizations to ipa 2 and as such are not available in data exports, which only store the romanized forms. to obtain a large dataset of pronunciations in ipa, one could scrape the front end of wiktionary, but this would be inefficient. instead, we write our own romanization to ipa conversion modules in epitran @xcite for each subgroup based on those from wiktionary. using the outputs of these epitran modules, we compile a large dataset of pronunciation entries in ipa in tsv form. we then show that the entries we generate can be used in a computational protoform reconstruction of middle chinese, demonstrating that our dataset addresses the inadequacies of previous digital comparative sinitic datasets with respect to computational reconstruction. ## related work linguists have created digital comparative datasets since the birth of computers. refer to one challenge with many of the aforementioned datasets is that they organize entries by words instead of characters. across subgroups, synonymic compound words may use different characters to express the same meaning. 3 even though partial cognacy of such compounds is possible, the 2 see https://en.wiktionary.org/wiki/module: nan-pron for an example of a conversion script. ## dataset and methodology we obtain sinitic pronunciation entries using a cbor snapshot of the zh-pron module on wiktionary. 4 for heteronyms, characters with multiple pronunciations within a variety, each pronunciation is stored as a separate entry in the snapshot and is grouped along with pronunciations in other varieties believed to be cognate with that particular pronunciation. the dataset spans eight subgroups: the seven conventionally recognized ones (mandarin, yue, wu, min, xiang, gan, and hakka) and the proposed jin subgroup, for which wiktionary has entries. we chose the dialects with the most data to represent each subgroup. refer to to convert from romanization to ipa, we extend epitran with additional modules for each subgroup @xcite . refer to we represent tones using ipa tone letters. we do not mark the neutral tone, as opposed to marking it as ipa tone 3. the transcription is relatively narrow, with diphthongs always represented as se2014 ) are derived programmatically from fǎnqiè formulae 7 from qièyùn (available for around 20,000 characters). despite concerns raised by @xcite and others, we treat mc pronunciations as the gold standard protoform. we process the qièyùn descriptions in three stages. first, the middle chinese descriptions of initial, final, tone, division (等), and openness (合開) are converted to the ascii romanization system in baxter and sagart (2014). the romanizations are then converted to ipa with epitran, using a mapping table based on sinopy @xcite . finally, we rewrite some ipa phonemes to match the phonetic transcription convention used in this dataset (e.g. the final result is a list of nearly 20,000 characters, each with a reconstruction written in ipa symbols. ## experiments we show that the dataset can be used for the protoform reconstruction task. @xcite model the latin protoform reconstruction task as a sequence to sequence transduction problem with a 7 fǎnqiè spelling provides equivalence classes for the pronunciation of a syllable by using one character with the same onset and another with the same rhyme. all daughter forms within one cognate set are concatenated into one string before entering the encoder. to distinguish between each variety, a language code is first prepended before each pronunciation entry. in the encoder, a language embedding is learned for each dialect. the same is done in the decoder for the proto-language. token embeddings are applied to individual characters (close to a phone) in the input and are shared across each language. there is a residual connection between the attention output and the decoder rnn output before entering the multi-layer perceptron. the objective function is cross-entropy loss between the protoform and the predicted protoform. the only difference between our pytorch version and their code is that we do not implement variational dropout in the encoder @xcite , but dynet comes with this flavor of dropout in its rnn modules. we do implement variational dropout for the decoder, though. foot_5 character middle chinese yue gan hakka jin mandarin min wu xiang 犬 /kʰwen²/ [hyːn˧˥] [t͡ ɕʰy ̯ ɵn˨˩˧] [kʰi ̯en˧˩] [t͡ ɕʰy ̯ e˩˩˩] [t͡ ɕʰy ̯ ɛn˨˩] [kʰi ̯ɛn˥˩] [t͡ ɕʰy ̯ ø˧˦] [ t͡ ɕʰy ̯ e̞ ˦˩ ] we find that dropout makes a significant difference when trained on the small 39-variety dataset of 1,000 cognate sets from hóu (2004) (which ended up being around 800 sets because not every entry in @xcite had an entry in the qièyùn). 10 we now discuss how we adapted our dataset for meloni et al. (2021)'s model. in order for the model to learn correspondences between phonemes as linguists would, we tokenize by phonemes, for example /tʰ/ and /t͡ ɕʰ/, instead of characters. these two example phonemes should each be treated as one consonant despite being represented with several unicode characters. we treat diphthongs and triphthongs as one token because they constitute one syllable, phonetically speaking. we also restrict ourselves to cognates with at least 4 entries including middle chinese to avoid being biased to varieties with more entries, such as mandarin. another decision we made is to arbitrarily take the first pronunciation when multiple variants are included in the same entry on wiktionary. we compare @xcite against two baselines. the random daughter baseline selects a daughter form at random and takes that as the reconstructed protoform. this assumes that no sound change occurred from the protoform to the daughter. the majority constituent baseline first separates daughter forms into onset, nucleus, and coda with the consonantal feature of the phoneme obtained using panphon @xcite , reflecting domain knowledge about the syllable structure of chinese languages. this allows us to easily obtain sound correspondences across the daughter languages. within each constituent (onset, nucleus, and coda), we take the most common phoneme sequence. this relies on the majority wins heuristic employed by historical linguists wherein the most frequent sound across the daughter languages is chosen as the protosound @xcite . @xcite outperforms both baselines on 3 different metrics (see per is more suited for the protoform reconstruction task than character error rate or edit distance because many phonemes are written with more than 1 character in ipa, as shown in the examples from above. as for fer, its benefit lies in how it is able to assign partial credit to hypothesized phonemes that are more phonetically similar. intu- ## discussion and future work our dataset is intended for a computational reconstruction of middle chinese, as we have demonstrated in the experiments, but can be used to accomplish much more. it can also be used for cognate prediction and for dialectometry (quantifying relationships between linguistic varieties). along the same lines, it can be used to build phylogenetic models of sinitic that can shed light on the history of chinese populations. additionally, chinese speech models could benefit from a phonetic language model @xcite trained on our data or from estimations of phone distributions @xcite in low resource varieties present in our dataset. in a future release, we will include other varieties available on wiktionary (taishanese, southwest mandarin, teochew, min bei, and min dong). wiktionary also contains pronunciations for sino-xenic loanwords in korean, japanese, and vietnamese, which linguists often reference when creating chinese reconstructions. the more languages we include, the fewer the number of sources that chinese historical phonologists need to consult, reducing the tediousness of work in this field.