Preparing a corpus of spoken X hosa (2023)

Abstract: The aim of this paper is to describe ongoing work on an annotated corpus of spoken Xhosa. The data consists of natural spoken language and includes regional and social variation. We discuss encountered challenges with preparing such data from a lower-resourced language for corpus use. We describe the annotation, the search interface and the pilot experiments on automatic glossing of this highly agglutinative language.

## introduction xhosa, or isixhosa, is a bantu language of the nguni sub-group, spoken in south africa. approximately 16 percent of south africa's population speak the language as their first language, and it is one of 11 official languages of the country @xcite . xhosa is to a large extent mutually intelligible with the other nguni languages ndebele, swati and especially zulu. although a relatively large language, it can be considered a lower-resourced language in several respects including in terms of its digital resources. there exist unannotated text collections made available through the south african centre for digital language resources (sadilar), and since recently also an annotated parallel corpus for the four nguni languages @xcite . the corpus consists of ca. 50 000 tokens of government texts for each language (translated from english) @xcite . annotated spoken language corpora are lacking altogether. there exists a small collection of audio resources (available through sadilar) such as orthographically transcribed audio recordings (6 hours) for the development of text-to-speech @xcite . none of these resources contain natural conversation data. the aim of the current project is to fill this gap by creating an annotated corpus of spoken xhosa. one important reason for this is that many speakers who were recorded, especially those belonging to minority communities in the area, requested that their contributions of data be well preserved and disseminated. consequently, a collaboration was initiated with the aim to make the data available and searchable. besides providing the digital infrastructure, we aim to explore the possibilities of reducing the manual workload by using automated annotation tools. ## fieldwork and content of the data the recordings included in the corpus all stem from fieldwork by the first author. these recordings have been made in different parts of the eastern cape, the province in south africa where a majority of the population speak xhosa. not all speakers identify as xhosa, however, since the identification as xhosa implies a certain ancestral line. they identify as belonging to other communities with their own languages. in present-day south africa, however, differences between these varieties are small as evidenced from the collected data (bloom ström 2018). our material is therefore not necessarily in accordance with standard xhosa norms. this gives a unique opportunity to study the language in all its facets, as the language is actually used in the communities. the recordings vary in spontaneity. the collection of texts includes dialogues with several speakers. some of these dialogues are about a certain topic and others are completely free. there are monologues in which one speaker explains a certain procedure (e.g., cooking), or tells a traditional story, mostly including an audience. a minority of recordings are more controlled and based on stimuli, i.e., the speaker explains the content of a series of pictures or a film. this is still a small corpus, with the aim of expanding when the infrastructure is in place. at present, there are approximately 10 hours of transcribed recordings. this is estimated to sum up to ca. 40 000 tokens. metadata for each recording is noted, including the date, location, speaker information, topic of discussion, length of recording, and audio quality. ## premises for data preparation the overall guideline in the process of making the data available has been maximal searchability for linguistic researchers. ## pilot experiments on automatic annotation automatic annotation of spoken xhosa texts faces several challenges: first, the small amount of data available, second, frequent variation and usage of non-standard forms. third, the annotation guidelines are being finalized as the manual annotation progresses, which means that the tag sets have not been finalized yet. despite that, we make a preliminary attempt to estimate whether parts of the pipeline can be automated. as mentioned above, a corpus of written xhosa @xcite has recently been released, and an annotation tool used to create it have also been made available by sadilar (du toit and puttkammer 2021). sadilar, however, uses different glossing principles. the pos tag set, on the other hand, was judged to be compatible with the purposes of the current project. du toit and puttkammer (2021) report the accuracy of their pos tagger, based on the marmot tagger @xcite ) and trained on the parliamentary texts, to reach 96% in the same domain. on our data, the accuracy is 74%. the drop in accuracy is unsurprising, given the high number of out-ofvocabulary items and the systematic differences in the usage of grammatical forms. since the sadilar corpus cannot be used to train a morphemic (glossing) tagger, we ran a pilot experiment, training marmot on our own data. despite a very small training set of 1122 morphemes, marmot achieves 67% on the test set (267 morphemes). as is common in such tasks @xcite , we did not attempt 1 https://spraakbanken.gu.se/korp/?@xmath0, using the lex tag for all stems instead. on the grammatical morphemes only, the accuracy is 51%, with some of the ambiguous morphemes being correctly tagged. pre-annotating the texts automatically and manually post-correcting them is likely to be more efficient than manually annotating them from scratch. as the amount of manually annotated data increases, the performance of the tagger will hopefully improve. it remains to be seen whether, given the small training set, "fast learners" like marmot can be beaten by large languages models (e.g. eiselen 2023), fine-tuned on the same data. we have not yet attempted automatically segmenting words into morphemes. ## the search interface the corpus is hosted by språkbanken text (sbx) and available 1 through the corpus search tool korp @xcite . korp can be used to perform advanced corpus search queries where transcriptions along with their annotations (segmentation, glosses, pos, lexical meanings etc.) can be used as search parameters. the parameters can be combined in various ways in order to refine the search. note that the parameters apply to different levels of analysis; some are on sentence level (e.g., idiomatic translation of the whole sentence), some are on token level (e.g., pos, lexical meaning), some are on sub-word (morpheme) level (gloss). for querying purposes, we distinguish between "microglosses" and "macroglosses". a microgloss is any single gloss, the smallest possible unit of glossing, e.g., pst: 'past tense'. macrogloss is any gloss of a non-segmentable morph. it may contain one microgloss (e.g., recp for an in example 2a) or several microglosses if the morph expresses several grammatical meanings at once, e.g., sm.pst.2 (the gloss for ba in example 2a) or sm.pst.ipfv.1sg (the gloss for ndandi in example 4). depending on the users' needs, they may either search for a micro-or macrogloss. the search for microgloss pst, for instance, would return both example (2a) and ( 4 ), but it is also possible to search specifically for the macrogloss sm.pst.2. as an example, figure 1 shows a search for all copulatives in the corpus (cop). for this particular corpus a special button was added to the interface which allows the user to copy a traditional four-row representation of glossed examples in linguistics (surface form, underlying form, glossing and translation, cf. example 2b). this was done to facilitate using examples from search results in publications or for teaching purposes. the corpus will be publicly available, both in korp and as a downloadable data set. in the future we will also incorporate the original audio recordings into korp, and, ideally, synchronize them with the transcriptions (cf. the implementation in the ivip corpus foot_0 ).