Keeping Up Appearances—or how to get all U ralic languages included into bleeding edge research and software: generate, convert, and LLM your way into multilingual datasets (2024)

Abstract: The current trends in natural language processing strongly favor large language models and generative AIs as the basis for everything. For Uralic languages that are not largely present in publically available data on the Internet, this can be problematic. In the current computational linguistic scene, it is very important to have representation of your language in popular datasets. Languages that are included in well-known datasets are also included in shared tasks, products by large technology corporations, and so forth. This inclusion will become especially important for under-resourced, under-studied minority, and Indigenous languages, which will otherwise be easily forgotten. In this article, we present the resources that are often deemed necessary for digital presence of a language in the large language model obsessed world of today. We show that there are methods and tricks available to alleviate the problems with a lack of data and a lack of creators and annotators of the data, some more successful than others.

## introduction in recent years, the landscape of language technology has changed quite rapidly, mainly with the advent large language models, but the overarching shift towards big data has been ongoing for longer. the problem with this shift is, that it is based on the big data for large majority languages, the inclusion of all the smaller languages, including all of the uralic languages, has come as an afterthought if at all. the expected solution for the continued sustainability of minority uralic languages in the landscape of modern languages in the time of large language models is to "generate" more data. ideally, by 'generate', the engineers in large language model contexts mean, that authentic written (or spoken) data needs to be created by native writers who should not make too many spelling or grammar errors and write the most current normative form. this can be an unreachable goal for a language that has fewer than million speakers and writers who are not l1, as while the requirements for large language models are going down over time, they are still orders of magnitude larger that can plausibly be created by limited amount of writers and speakers in limited amount of time. what we suggest in this paper is to carefully organise the initial work of corpus curation and creation around materials that are of high importance to the contemporary language technology community. we leverage existing resources and language technologies to minimise unnecessary and repetitive work by linguists and language professionals on the language data that is being worked on; automating what can be automated and re-using linguists annotation efforts is a key to efficient development of high-quality human verified gold data. our research question is, going from existing langauge technology resources: which tools are best suitable for launching and bootstrapping which resources. if language has usable electronical dictionaries, morphological analysers and generators, spell-checkers and so on, what can be used to effectivise the dataset creation and corpus curation. the question is especially interesting now, as there is a possibility to use contemporary multilingual large language models, as well as traditional rule-based, statistical and hybrid language models to perform various pre-processing and processing tasks. our key contributions from this article are: the experimental framework for others to compare and combine methods of gold data annotation for smaller languages, the pipelines from traditional rule-based annotations and llm generations into concrete target formats, and the results of comparing some of the approaches for a low resource uralic language along with recommendations of what is currently the most effective approach. as a side product we have created, curated and an-123 notated beginnings of several new datasets for an under-resourced uralic language. we have laid out experimental computational linguistics data creation and annotation system that can use both existing rule-based tools as well as large language models to aid the processs. one of the goals of this experiment and the approach is that we want to promote inclusion of more uralic languages in all of the common language technology datasets. we are considering three separate approaches to help creation of annotated gold data: ## background the uralic languages, especially besides the bigger national languages, are relatively under-resourced; the size of freely available texts is measured in millions of tokens or less. however, uralic languages do have strong traditions of rule-based language technology. also, lately, the large language model -based language technology has showed itself as a viable option for some use cases. our approach to resource creation to overcome some of the underresourcedness problem is thus to see if we can leverage the existing technology to supplement the well-planned tactical selection of language dataset resources. in this article, we suggest curating and creating data that are highly relevant for the large language model building industry and also for the researchers of languages in language technology and linguists as well. while majority of industry and researchers concern themselves with basically english and maybe handful of commercially plausible majority languages of the world, we have discovered some related research both from the industry and the researchers who specialise in minority and under-resourced languages. as one reference point, we study what technology companies and central research groups in llmbased language technology have said about support for smaller language in the recent years; one reason for writing this article and its experiments is also inspired by these works: meta and fair research group (facebook's ai research) have released resources and studies under the moniker of no language left behind (nllb) @xcite , also known for datasets and evaluation schemes under scaling neural machine translation to next 200 languages (flores) @xcite . unsurprisingly, this data set has so far included only finnish, estonian, and hungarian when it comes to uralic language inclusion. alphabet and google research have also been active on extending the range of languages supported under the name of next 1000 languages @xcite . they have also published several research papers listing exactly the sources they use to gather information and data on the languages @xcite , this is directly useful information to know that, if you want to be included in google's considerations list of languages that might be supported or relevant, perhaps you want to have data in the resources and datasets they use. the resources that we use in this articles experiments here have also been used for several years now in the academic community as the go-to resource to measure if your tool works with the given language. for example, the universal dependencies (ud) treebanks @xcite , are used in a huge number of papers investigating computational linguistic methods in a large number of languages, including the annual shared tasks in syntactic parsing. it would thus appear that ud as a resource has passed the test of time. secondly we have seen the unimorph dataset, that concerns morphology of languages, has been used widely in the research and applications. namely with research of morphophonology and machine learning there have been regular shared tasks. we have explicitly left out parallel corpora and machine translations from this article for two reasons: firstly it is already a main focus of the large corporations and research groups working on the natural language engineering tasks and secondly our corpus selection is based on aiming to have a large subset of professionally human-translated texts as the source texts in these datasets, we find these are much more valuable than machine translated or post-edited texts, for the early phases of big data building we are in. for the experimentation of this article i have chosen inari sámi as a target language; inari sámi is a uralic language, that does not as of now have many of the resources that we are about to create. it is a low-resource indigenous language with limited amount of speakers and written resources available, but an active speaker community that writes new texts. we have existing tools in rule-based language technology available from the well-known free and open source repository 1 . furthermore, the most recent versions of large language model -based systems have been seen to support inari sámi (instead of just refusing to handle it and deferring to professionals as earlier versions did). finally, we have a computational linguist who is not a native speaker but is capable of working with the language and has contacts to language experts, we find this is sufficient for initial experimentation, but of course for serious language data building, more expert knowledge is needed. for some the work on dataset creation there has been previous works, for example in universal dependencies and rule-based analyser there are existing methods that have been used for other existing uralic dependencies treebanks, such as the north sámi (tyers and sheyanova, 2017) and karelian treebanks @xcite . for generation of the unimorph data, some of the datasets are generated based on rule-based generators @xcite , strictly speaking wiktionary can also be considered as rule-based morphological generation, however, we have not found this mentioned explicitly in existimg articles about unimorph. ## methods our experimentation concerns the use of existing language technology tools to help the creation of 1 https://giellalt.github.io/lang-smn the datasets while following the rules and ideals behind the given datasets. for example, when universal dependencies guidelines dictates that the dependency annotation must be manual or human made, we do not use the tools to generate unchecked 1best annotations that would pollute the dataset. the most common strategy here is to give all plausible hypotheses from the automatic analysis to the linguist to post-edit, but another option is that the post-edited analyses are verified to be plausible analyses of the system (our end goal is to have a gold standard that agrees with the analyser and linguistic expertise). for the existing rule-based systems, we have downloaded and installed well-known giellalt softwares, which are freely available from the github with an open source licence @xcite . 2 the llm experimentation is performed using a chatgpt, the state-of-the-art chatbot interface to a closed-source, commercial neural network. 3 we have chosen chatgpt since it is the most popular one, it has freely usable version available for most uralic language researchers even without expensive ai budget. an example of chat-gpt performing unimorph dataset generation task can be seen in figure 1 . when working with a preexisting computational linguistic, rule-based system, one of the main engineering efforts lies on the conversion. although it sounds trivial, there is a lot of linguistic and engineering work to be taken into account here: the actual format of the analyses is rarely exactly the same, so a mapping needs to be devised, for example, converting "noun" analyses from +n to n; or noun. the mappings can also be 1:n or m:1, merging and joining 'tags', as well as more involved re-writings. there are a lot of other technical minor details related to such generations and conversions that are beyond the scope of this article, for example, we needed an algorithm that could remove duplicate forms that is aware of unicode normalisation forms and folding to avoid having the linguist read word forms that look exactly the same several times. the topic of conversions in itself is large enough to deserve its own article, foot_2 for the purposes of this article we will point the readers to our github repositorium containing freely available scripts. 5 some examples of conversions are given in the figure 2 . the experiments with llms are based on the currently available free chatgpt interface prompted in english. we begin prompting with the most straightforward requests, e.g. "can you generate a unimorph annotated list of all word-forms inari sámi noun táálu?", "create a conll-u annotated version of this sentence", etc. it might be noteworthy, that since our goal is inclusion of our uralic languages in the relevant datasets, there is also a component of social engineering involved in all of the dataset creations. merely producing text files that contain acceptable data is only a first step. the datasets we have selected to experiment with, the selection has been also based on the openness and documentation of the contribution process; all of the given datasets exist on github, and the contribution process is detailed in the documentation and happens largely over github only. this is in contrast to the commercially backed datasets mentioned earlier; while it would be very valuable to have all uralic languages in the no languages left behind and next thousand languages, the way to contribute here is not immediately so obvious and available to larger audiences. ## corpora and data selection the corpora available for low-resource uralic languages are scarce and limited. the whole corpora of publically available web crawl data is typically less than the millions of tokens that is often advertised as minimum requirement of large language models. furthermore, the data that is available is limited by licences, quality, and genres: while some argue that all data that can be crawled is free to use for language technologies, in practice ethical use requires selecting only the data that has explicitly been licenced with a suitable licence, such as wikipedia or data coming from governmental public domain records-or that has been personally licenced with the author for the specific use. that furthermore limits both qualitywikipedia data is written by language learnersand genres-government's publication are mainly politics, healthcare and such. in this experiment we have used primarily freely licenced data from saami international corpora (sikor), (sikor, 2021) but we have also performed a short experiment on self-created and selftranslated data that large language model should not contain from beforehands. ## experimental results the main results of our experiment will be the actual datasets we can produce. to quantify the usefulness of the langauge technology tools we have measured post-edit distances. we have also performed a linguistic error analysis to quantify the errors made, the effect on the time/effort tradeoff is further discussed in the section 6. in our experiment in creating datasets for unimorph, we used both the rule-based system and the llm to generate the full datasets, that can be read and corrected by a human. the results of generating are shown in the e.g. finite state morphology to unimorph táálu táálu+n+sg+@xmath0;sg;nom táálust táálu+n+sg+@xmath1;sg;loc tálustân táálu+n+sg+loc+@xmath2;sg;loc;pss1s e.g. visl cg 3 to universal dependencies in ## discussion we have tested rule-based and llm-based annotations as a help in linguistic work. currently, for morphology we get clearly better results with the rule-based tools and the results are good enough that it makes work on dataset creation more effective. if we analyse the errors that the systems make, we see that rule-based system includes some results with linguistically motivated potential errors, like wrong stem alternation or missing accent in a suffix. the errors in llm generated version are that it just uses seemingly random suffixes with unchanged stem, it also uses some forms like cases that do not exist in inari sámi (but for example exist in finnish), all in all cleaning this data would possible even be slower than writing the data by hand. when we error-analyse the dependency analysis the results get more interesting, like both starting points require quite a significant amount of work to get to gold-standard state, but this is also to be expected if reference the past experiences of ud annotation from converted or machine analysed starting point. what is interesting is that the llm can sometimes generate quite accurate de-pdendency subgraphs of certain expressions, for example personal names, we assume this is due to them appearing in very similar form in existing english documentations, where high level dependency structure is the same even if there are slight variations in the morphological level. there are a large number of different large language models and generative artificial intelligence that could possibly be used to experiment this and that is a common feedback we get. we are using a version of a popular llm that is available to us, without excessive extra costs. this is also available to most researchers who are the target audience of this paper. a common feedback we get, that there are various techniques that should be used for low resource setup, like fine-tunings, transfer learnings, in context learnings, prompting techniques and so on. we are experimenting in a situation where we start with zero data for the fine-tuning task, we are the ones who will create these data initially, so the use of such data will generally be a future research topic, after we have done the initial data creation. as the methodology here is extremely fast moving and outdates itself in matter of months, we try to begin by only importing either approaches that have been proven and stabilised, perhaps in majority language context, into out lesser resourced languages, or we can perform experimentation that does not tie up too much valuable and scarce resources. another interesting future research question would be whether it is more beneficial and time-effective to fine-tune early or on-goingly, given the constraints in data and human resources we face in the processing of smaller uralic languages. we have not found an easy enough recipe to do transfer learning that would not take us more time than actually working on the data creation as described by the approach of this article. our impression is furthermore that there is currently ongoing research on this topic that we hope will yield some answers that are relevant to us as well. it is exciting to see that, even if the large language models have rathar disappointing accuracy in generating and annotation of smaller uralic languages, they are able to generate something that is relevant to the task and occasionally some wordforms or annotations are even correct. this suggests that maybe with further fine-tuning, prompting, in-context learning, transfer learning, and so forth, there could be a usable version of llm-aided language data annotation and generation in the fu-ture. one question for future work is of course how to integrate these findings to a workflow and softwares for annotation. in this experiment we used normal text editors and raw data formats for data annotation, which is suitable for programmers and short experiments, for the full scale linguistic annotation this would be integrated to a specific editor. and that raises the question of if the ideal way to help linguistic jobs would bear a user interface similar to what we get in the email post writing programs, office tools and programming editors today with a so-called co-pilot? ## conclusion we performed several experiments to find out an efficient way of creating nlp datasets for smaller uralic languages. we have found that using both existing rule-based technology and large language models can help rapid creation of the data, but neither approach is without its caveats. the gold standard remains fully human annotated data, but in lack of that it should be considered if we can achieve reasonable amounts of resources with computer-aided annotation modes.