Natural language processing for under-resourced languages: Developing a Welsh natural language toolkit
Paper · 2021 · Daniel Cunliffe, Andreas Vlachidis, Daniel Williams et al.
Summary
Welsh spelling can change at the beginning of a word when a nearby word triggers a consonant mutation. An exact-spelling search may thus overlook an occurrence, and software seeking the dictionary form must determine whether the word changed and, if so, how. The Welsh Natural Language Toolkit, or WNLT, addresses that problem as part of a larger project. The authors want to give developers enough infrastructure to build applications for written Welsh, including developers with little experience of natural language processing.
The team builds on GATE, an open-source framework that already knows how to run text-processing components in sequence and pass their results along. WNLT adapts those components to find word and sentence boundaries, assign grammatical categories and recover dictionary forms. The last task, called lemmatization, draws on the Welsh Eurfa dictionary, rules for endings such as noun plurals, and rules for initial consonant mutations triggered nearby. CymrIE, the Welsh adaptation of GATE’s English entity recogniser, combines Welsh vocabulary lists and grammatical patterns to find people, places, organisations and time expressions. It uses the same output categories as the English component, so applications can work with a familiar representation of the results.
Against a Welsh language expert’s annotations on 10 news stories comprising 2,200 words, WNLT scores 98.25% F-measure for tokenization, 81.03% for part-of-speech tagging, and 79.69% for lemmatization. An extension evaluated on 120 Welsh tweets retains broadly comparable recall, meaning that it recovers a similar share of the expert’s annotations. Its precision is lower across all the outputs scored. A separate application uses CymrIE to interpret 32 manually selected wedding notices. It identifies ceremony dates with an F-measure of 92.88% and ceremony locations with 62.22%. The authors attribute some of the difficulty with venues to gaps in the available lists of local names.
The project shows how much a small team can build when a reusable framework and suitable Welsh lexical resources are already available. Its results also make the remaining work concrete. A word’s grammatical role can depend on context that the tagger misses, the lemmatizer handles only a subset of Welsh mutations, and a specialised application can run out of vocabulary even when its general categories work well. The authors released WNLT as open-source software. Developers can use it in GATE or through a Java interface or command line, and a standalone graphical application gives users access to the analysis without requiring them to configure GATE.
Deep dive: Natural language processing for under-resourced languages: Developing a Welsh natural language toolkit
The Welsh Natural Language Toolkit adapts GATE to analyse Welsh words, grammar and names, with evaluations on news, tweets and wedding notices. · about 38 minutes to read
The problem and its context
What an application needs from a toolkit
Consider what a program has to know to look for a particular word in Welsh writing. It needs to decide where words begin and end, then recognise when a spelling in the document belongs to the same dictionary headword as the search term. A program that finds people or dates needs a different output. It must be able to identify a whole name or date expression even when the expression takes up several words. Such decisions can be shared across applications. A developer building a search tool and a researcher compiling facts from old newsletters can start from the same word boundaries and grammatical labels, then make different use of them.
The authors approach these decisions as an infrastructure problem for low-resource languages. They describe a widening gap in the availability of language technology as applications in areas such as education, consumer devices and text analysis become commonplace for well-resourced languages. The resources needed to build those applications include more than collections of text. A project needs financing, people with technical and linguistic skills, lexical materials, and ways of finding and combining relevant work. A useful resource that is difficult to locate or whose format is hard to integrate may do little for a developer on a small project. The paper also notes that limited commercial incentives can leave a language with a collection of narrowly scoped tools that work in isolation.
Resource planning provides part of the background. The authors describe the Basic Language Resource Kit as an effort to identify foundational resources and plan their development. They also cite work questioning its effectiveness for languages with limited resources. The Digital Language Vitality Scale and the associated Digital Language Survival Kit address those circumstances more directly. The latter situates activities such as building dictionaries and developing speech technology within a progression of digital capabilities. The authors also discuss proposals to put language communities in charge of resource development. WNLT takes on a particular part of this wider problem by making computational analyses of written Welsh accessible to application developers.
Welsh, or Cymraeg, had official status in Wales from 2011. The paper reports that the 2011 census counted just over 560,000 speakers aged 3+ in Wales, about 19% of the population. It also cites an estimate that approximately 56% of Welsh speakers in Wales used the language daily. The authors describe Welsh as vulnerable under UNESCO’s framework and as developing under the Digital Language Vitality Scale, with some aspects tending towards vital. Those descriptions place the project in a setting where Welsh has established uses and institutions, and where the range of digital services available to its speakers still matters for its future use.
The paper traces some of the work that WNLT could draw on. Bangor University’s Language Technologies Unit had developed spelling and grammar checkers, digital dictionaries and standard terminology. The authors also mention a Welsh lemmatizer service, a national portal for language technology, and work on Welsh speech technology. The Welsh Government’s language strategy sought to extend the use of Welsh in digital settings, while its technology action plan emphasised tools, skills and open innovation. WNLT received funding from the government’s programme for Welsh-language technology and digital media. Its intended audience included developers who knew how to build an application and might have little background in computational linguistics.
The available resources shaped the division of work. The project could source extensive Welsh vocabulary from Eurfa and reuse other digital collections for names and abbreviations. It still had to translate those resources into decisions an application could use. A grammatical abbreviation in a dictionary needed a corresponding output label in the tagger. An entry in a list of Welsh names needed a rule that could use it alongside nearby words. Some of those decisions also required attention to how Welsh differs from the language for which the existing component had been designed.
Why the authors chose GATE
GATE stands for General Architecture for Text Engineering. Its architecture distinguishes resources that hold language material from components that process that material. A project can load documents individually or as a corpus, which is a collection of documents. Processing components include tokenizers, sentence splitters and gazetteers. A gazetteer looks for entries from a prepared list, such as names or abbreviations, and records where it finds them. GATE makes reusable components available through its CREOLE repository. A developer can arrange them in a pipeline, where one component’s output becomes available to components farther along.
The shared representation is linguistic annotation. An annotation marks a span of text and may carry attributes. A name annotation, for instance, can span several words and carry a category that distinguishes a person from an organisation. A grammatical annotation on a word can give a rule access to its category while leaving its spelling available for another test. Accordingly, a rule can look for a grammatical category, a particular written form, the result of a vocabulary lookup, or a combination of those kinds of evidence.
GATE’s existing English pipeline, called ANNIE, gave the project a concrete starting point for information extraction. Its principal job is named entity recognition, which finds mentions such as names or temporal expressions and assigns categories appropriate to the task. ANNIE combines gazetteer matches and the outputs of earlier processing components with pattern rules written in JAPE, the Java Annotation Pattern Engine. JAPE uses finite-state pattern matching. In practice, this lets a developer describe sequences of textual or annotated items and specify what should be recorded when the sequence matches. A single vocabulary hit can thus contribute to the recognition of a larger expression.
Earlier projects suggested that this architecture could support Welsh. The paper discusses how GATE acquired Unicode capabilities through EMILLE and how subsequent projects developed its multilingual entity recognition. The authors cite a rapid adaptation to Cebuano in a setting without training data or prior knowledge of the language. They also describe cases where external components could be brought into GATE, including work supporting Dutch and Swedish. These examples offered several ways to extend a pipeline, from changing the inputs to an existing component to incorporating software developed elsewhere. Support was uneven. GATE could have some components for a language while lacking a tagger or depending on an outside implementation to provide one.
The authors give two principal reasons for choosing GATE. Its long maintenance history and established users offered a basis for distributing and supporting the new toolkit. Published descriptions of rule-based adaptations gave the team examples to follow when bringing a new language into the framework. They also had experience using GATE to annotate and index archaeological material. That experience was relevant because a toolkit for Welsh had to support the same general progression from linguistic analysis to application-specific extraction. Familiar components and data structures reduced the amount of new infrastructure the project needed before it could address Welsh spellings, grammatical distinctions and vocabulary.
The method, step by step
From text to annotations an application can use
WNLT begins with the visible text of a document. The first operations decide how to divide it so that later operations have units to work on. A token can be a word, a punctuation mark or another discrete piece of text. A sentence annotation encloses a larger span. The tagger attaches a grammatical category to a token, and the morphological analyser tries to associate it with a dictionary headword. CymrIE then uses text, gazetteer matches and linguistic annotations to find named entities. An application such as the wedding demonstrator can take those entities and assign roles with a narrower meaning.
How WNLT annotates written Welsh
The steps in order.
An important property of the design is that each stage can add information without discarding the evidence used to produce it. An annotation can retain the written span for a word whose dictionary form has been identified. An entity can cover several tokens, each of which still has its own linguistic features. When an application classifies a person as a participant in a ceremony, the underlying name annotation remains available. The design also lets a developer use the tokenizer or tagger separately if their application ends at word-level analysis.
The adaptation involves work on both the data and the operations. A Welsh list can supply spellings to an existing gazetteer. A change in word order inside a name may instead require a revised JAPE rule. The lemmatizer needs both a large lexical resource and new rules to deal with words that change at the beginning. The main stages illustrate different mixtures of these approaches.
Drawing boundaries around words and sentences
WNLT starts with GATE’s Unicode tokenizer and changes some of the regular expressions in its Java implementation. It also adds a substantial JAPE pass that revisits the initial segmentation. A regular expression defines a spelling pattern that can be matched across many strings. The later pass lets the toolkit apply rules to the pieces the first pass identifies. The authors draw on Thorne’s Welsh grammar for the linguistic distinctions reflected in these rules.
A hyphen is one place where a single character can imply different token boundaries. WNLT keeps a loose compound such as cyd-aelod together and applies similar treatment to stressed compounds such as ail-law. It can preserve place names such as Cil-y-cwm and specific letter sequences across a hyphen, as in cybydd-dod. The paper gives is-lywydd and lled-wyro as cases the tokenizer divides. The character makes the program consider a pattern. Its treatment depends on which spelling or construction the rule identifies around it. The choice affects the form that a later dictionary lookup receives.
Apostrophes also call for more than a default split. WNLT has rules for common contractions and for omitted letters in several positions. The initial mark in 'Deryn exemplifies vowel loss at the start, while hapusa' illustrates loss of a consonant at the end. There is also a category of medial vowel loss. The relevant rules keep the word and mark together in these cases. The toolkit separates certain grammatical uses, including forms involving adverbial y or r and the verbal adjunct yn. These rules address similar-looking strings that call for different analyses.
Ordinals and a few fixed expressions establish the other side of the tokenizer’s remit. An ordinal such as 31ain is kept as a word token, taking its digits and letters together. The toolkit also treats Er mwyn as a unit and gives Oddi special treatment when a preposition follows it. A token therefore corresponds to a unit the later analysis is designed to handle. Its span can include spaces in a specified expression or internal punctuation in a single word.
Sentence splitting applies the same general approach to a larger boundary decision. The GATE component runs a sequence of finite-state transducers and consults abbreviation lists alongside patterns for sentence breaks. An abbreviation can contain a full stop that would otherwise look like the end of the sentence. WNLT extends the lexical material to approximately 400 Welsh abbreviations arranged in 5 categories. The list includes linguistic, narrative, scientific, place-related and time-related items, drawn from a review of dictionary resources. The authors particularly credit Geiriadur. The output uses Sentence for a sentence span and Split for a break. An alternative set of rules handles line endings differently when the layout of a document makes a new line evidence of a new sentence.
Assigning grammatical categories with Eurfa
The grammatical tagger is an adaptation of Hepple, the English tagger supplied in ANNIE. The implementation uses both a lexicon and rules learned by training on a large corpus of Wall Street Journal text. For Welsh, the authors follow the precedent described for Cebuano. They populate a substantial Welsh lexicon and dispense with the corpus-trained rule set used by the English version. The Welsh tagger also has programmed patterns for guessing the categories of forms it cannot look up.
The source lexicon is Eurfa, a freely licensed Welsh dictionary. When discussing the tagger, the authors report a total of about 210,000 words, encompassing mutated forms and inflected verbs linked to 10,393 lemmas. A lemma is the headword used to represent a set of related forms. Looking up an already listed inflection or mutation lets the tagger use lexical information about the actual form it encounters. The entry’s grammatical label still needs to be expressed in the vocabulary of the tagger.
The original Hepple inventory has roughly 40 tags. Some Eurfa labels correspond directly to an existing tag, as when adv becomes RB for an adverb. Other mappings bring several Eurfa distinctions under one output label. Appendix A, for example, groups several kinds of adjective under JJ and uses JJR and JJS for comparative and superlative adjectives. This translation between label inventories is a substantive choice. It determines which distinctions from the dictionary remain visible to rules running later in the pipeline.
The Welsh adaptation also introduces tags to express distinctions that the project needs and the original inventory lacks. It distinguishes masculine nouns NNM from feminine nouns NNF, retaining NN for a generic noun. It includes separate verb tags for forms such as the imperfect, pluperfect and future. A grammatical category can have an operational effect beyond what a user sees in the output. In particular, a mutation pattern can ask whether a preceding trigger is followed by a token with a feminine noun tag. Keeping the distinction in the tag inventory makes that test possible.
At runtime, the tagger’s first source of evidence is a match for the token in Eurfa. If the spelling is absent from the lexicon, it tests endings up to a maximum of 5 characters. These patterns may indicate that a word is a masculine, feminine or plural noun, a verb, an infinitive or an adjective. The relevant rules are nested so that a particular ending can take precedence over a broader pattern. An ending in a can prompt a verb tag, while dra and fa receive the more specific treatment of masculine and feminine noun, respectively. If the dictionary and suffix tests supply no answer, the component returns NN.
This procedure gives the tagger a way to handle unlisted forms with evidence available from their spelling. A returned tag can therefore reflect a dictionary classification, a suffix heuristic or the default. The procedure described in the paper gives limited attention to the particular role a familiar spelling plays in a sentence. The authors provide an interface through which trained rules could be added. In the reported system, the project’s preparation for tagging consists of importing the lexicon, aligning grammatical labels and programming the fallback tests. The expert annotations used in the evaluation supply a reference for judging the output.
Recovering headwords from grammatical forms
The morphological analyser uses the token and its part-of-speech tag. Morphology concerns the structure and forms of words. For WNLT, the task includes finding a dictionary headword, identifying mutation when applicable and sometimes recording an affix. An affix is a part added to or removed from a form, such as a plural ending. The inherited GATE component analyses tokens individually and allows different pattern rules for different grammatical categories. The Welsh implementation extends that mechanism for inflection and adds a contextual pass for mutation.
An inflection rule has a matching side and an action side. The match specifies the form to which the rule applies. The action tells the component what operation to perform on that form. Welsh nouns can form plurals with a range of endings, so WNLT provides 21 generic regular-expression rules. One checks for the ending esau and strips off au. Its transformation can be written as follows.
Xesau → Xes
X represents the portion of the matched noun before the literal ending esau. The letters written next to X belong to the same string. The arrow → points from the matched form to the proposed headword, which retains X and the literal sequence es. The action drops only au, even though the match examines esau. With athrawesau, for example, the rule returns athrawes. The test can use a longer pattern to constrain when a shorter deletion is justified.
The rules also specify 75 irregular plurals. An individual entry can connect nyrsys to nyrs without requiring the same transformation to apply across a group of nouns. For verb forms, the analyser is supported by Eurfa’s extensive material on inflection. According to the authors, this section of the dictionary contains more than 30,000 verbs and lists 4,000 lemmas for inflected verbs. An available lexical association can supply the headword directly. Together, the regular rules, exceptions and lexical pairs cover different reasons why a written form differs from its dictionary entry.
Recovering headwords when the initial consonant changes
Mutation presents a different problem because the clue to a word’s form can be outside the word. The authors cover soft, nasal and aspirate contact mutations. In their account, contact mutation depends on a trigger immediately or nearly immediately before the affected word. Other mutations can require evidence from more of the sentence. WNLT’s dedicated transducer is designed for the local case.
The analyser combines lookup with pattern matching and verification. Dictionary lookup can identify a headword when an association is already available. For the mutation rules, the preceding text supplies evidence that a change is plausible. A matching rule proposes a form by reversing a change it is designed to recognise. The analyser then tests the proposed form against Eurfa. The paper describes a validation resource containing 168,785 lemmas. A candidate absent from the dictionary is discarded, and the written form serves as the lemma attribute in that case.
The authors express the local patterns through 12 JAPE rules based on Welsh grammar. Their rules vary in how much evidence is required before proposing a restoration. A broad soft-mutation pattern can be represented as follows.
S · T
S denotes a match for a soft contact-mutation trigger. T denotes a token and represents the possible target. The dot · means that the target follows the trigger in the pattern. The target slot in this example can match any token. The rule casts a wide net at the matching stage, with later checks helping decide whether a proposed headword can be retained.
Other rules make the target’s grammatical classification part of the match. The paper illustrates this with the trigger dwy. A compact representation of that condition is:
{dwy, Dwy} · T[category = NNF]
The braces { } enclose the trigger spellings and the comma separates the alternatives. dwy and Dwy are the lower-case and capitalised forms recognised by the pattern. The dot · again indicates that the target token T follows the trigger. The brackets [ ] enclose a test on the target’s category feature. The equality sign = requires that feature to have the value NNF, the feminine noun tag. This rule relies on the fact that grammatical analysis has already run. If a feminine noun has received only the default noun label, the form can satisfy the position requirement while failing the category test.
A narrower rule can test the spelling of the following word as well as the trigger. The paper gives yng followed by a form beginning with Ngh as an example. Spelling evidence of this kind can help determine whether a local context warrants trying a reversal. The transducer therefore has a way to express anything from a broad trigger-and-target sequence to a pattern with a particular following onset. Differences in specificity concern the evidence needed to propose a candidate. Acceptance still depends on validation.
The paper’s example of gyfrwng shows how the result can be represented. The word’s token retains the written form, carries the noun category NN and has cyfrwng as its lemma. The mutation feature shown for this token has the value TM. An application can work with the lemma while retaining the ability to display or inspect the original form. That is the property needed for a search that aims to find occurrences under a common headword across spelling changes.
Using Eurfa for both direct lookup and candidate verification has two consequences. A known form can receive information with little reliance on a general rule. A proposed restoration can also be rejected because the dictionary lacks the relevant headword. The same policy can prevent an implausible output in one case and preserve a mutated spelling in another where the correct restoration would have been useful. The presence of a trigger, the accuracy of the token’s grammatical tag and dictionary coverage can all affect whether a local pattern yields the intended result.
Using names and grammar to identify entities
CymrIE adapts ANNIE’s named entity transducer and gives it Welsh gazetteers. The paper reports more than 70,500 distinct terms distributed across 70 new lists. These lists contain material for names of people and places and for recognising expressions connected with time, numbers, abbreviations and sport. CymrIE also retains 51 of ANNIE’s lists. The team assembled Welsh entries from existing sources including Welsh Wikipedia, Welsh Assembly pages and NHS material. The publisher Y Lolfa gave permission to use entries from its directory of organisations and companies.
The relationship between the Welsh and English lists depends on the things they name. A Welsh list of weekdays can take the place of the English list because the entries refer to the same recurring days. For people’s names, a separate Welsh list can supplement the English names that may also occur in a Welsh document. Place names likewise call for both resources in some cases. A place can be referred to by a Welsh or English form, and the names familiar to writers can vary. The authors also describe vocabulary for entities particular to Welsh-speaking communities, such as local newsletters known as papurau bro. A general English list contributes little evidence for those entities.
Many inherited rules look for types of gazetteer matches. A Welsh entry assigned the expected match type can therefore feed a rule originally written for ANNIE. Some rules also encode language-specific expectations about what surrounds a match. The team addressed the sequence in which a noun precedes an adjective in Welsh, the occurrence of the definite article in organisation names, and vocabulary such as ac for “and” or Sant for “saint.” Such changes let several words and lexical cues support a single entity annotation. The gazetteer supplies evidence about a term. The recognition rule decides whether that evidence and its surroundings support an entity of a particular kind.
CymrIE preserves the English annotation categories and attributes used by ANNIE. For instance, Location can carry locType, which differentiates kinds of locations such as cities and regions. Organization can carry an orgType feature, and Person can carry gender information. An application using these fields receives the same kinds of values after Welsh analysis. The portability lies in that agreement about the output, even when the evidence used to produce it differs by language.
Giving general annotations a purpose in wedding notices
The wedding study asks what a specialised extractor can infer once the general pipeline has run. Its material comes from Llais Cwmtawe, a Welsh community newsletter serving communities in the Swansea valley. In a short account of a ceremony, a woman’s name could belong to the bride, a relative or the person who officiated. A place name can refer to the venue or to a place where somebody lives. General person and place annotations narrow the search for those answers. The application still needs cues that connect a name to the relationship or event it is meant to extract.
The authors add specialised lexical resources, including a partial list of Welsh chapels and a list of Welsh choirs from the directory supplied by Y Lolfa. A set of 18 heuristics operates on CymrIE annotations to mark the partners, their parents, the service location and the service date. The heuristics are practical assumptions about how this kind of notice is written. The first female person mentioned is a plausible bride, for instance, and a date in the announcement is a plausible ceremony date. JAPE rules give these assumptions a form the application can apply consistently to the annotated notices.
The rules encode a limited set of relationships. The application can encounter relatives or other participants outside the roles scored in the study. Its job is to produce the specified labels where the text and prior annotations give enough evidence. This is a demonstration of how general extraction can serve a social-history task. The crucial additional work is to decide what the recognised mentions refer to within a particular genre and to add enough specialised vocabulary to make those decisions possible.
Adapting the same components to Welsh tweets
TwitterCymrIE starts from Welsh processing components for boundaries, grammar, word forms and entities. It also draws on TwitIE, GATE’s existing pipeline for tweets. The authors add five processing resources from TwitIE and adapt the ones whose decisions depend on Welsh words and names. The rest could be used as supplied. This gives the tweet pipeline a mixture of components previously adapted for Welsh and components previously adapted for the medium.
Annotation Set Transfer identifies the tweet and associated material such as hashtags, user mentions and URLs. The identifiers are represented separately so other components can find the relevant spans. TextCat gives the tweet a language label stored in the lang feature of its Tweet annotation. The emoticon gazetteer recognises emoticons and can standardise variants such as :-) and :} to :). The authors keep these resources without adaptation.
Hashtag processing needs access to Welsh vocabulary. A hashtag can run several words together, sometimes using internal capitals to indicate boundaries. The component uses JAPE to identify those capitals where they occur. For the Welsh adaptation, it can also consult Eurfa and CymrIE’s named entity entries when it tries to separate the words. The capitals provide visible clues to segmentation. Lexical lookup gives the processor a way to look for meaningful pieces, including names, within the hashtag.
The tweet normaliser uses Eurfa and related gazetteers to find spelling candidates. Its test uses Levenshtein distance, a measure of the edits needed to turn one string into another. The procedure described in the paper corrects a word to a gazetteer entry when it finds one at a distance of 2 or less. A separate lookup addresses established informal abbreviations through explicit pairs. The small Welsh slang list includes v and its full form fi. A user can inspect proposed normalisations or turn the feature off. Those controls support uses in which the written variant itself is of interest as well as uses that benefit from grouping variants under a familiar spelling.
Preparing the resources and releasing the software
The preparation work differed by component. General resources such as the Unicode tokenizer and sentence splitter needed rule and configuration changes, plus Welsh abbreviation data. The tagger required a dictionary-to-tagger mapping. The analyser needed lexical pairs and patterns drawn from Welsh grammar. CymrIE needed lists prepared from several sources and entity grammars adapted from ANNIE or written for Welsh. The adaptation procedure therefore combines software work with the selection, alignment and checking of linguistic material.
The authors report roughly 6 months of developer effort on the core pipeline during the initial project phase. The morphological analyser occupied roughly six weeks. A subsequent phase took approximately 4 months of developer effort and covered the demonstrators and new ways to access the toolkit. The Twitter pipeline took about 2 months of that work. The figures concern development effort within a project that ran over two years. Evaluation also required significant time. As an indication of implementation scale, the paper describes six Java files with over 1,200 lines supporting the basic processing components and a further 5,200 lines of entity grammars created for Welsh or adapted from ANNIE.
The authors released WNLT through SourceForge and made it an official GATE plugin. They also built a Java API, a command-line interface and a standalone graphical interface. The Java API lets developers incorporate CymrIE or select individual components for use inside another application. The command line makes the core processing accessible to scripts. The graphical interface lets a user obtain results without learning how to configure the GATE environment. The standalone version and the Java API also include TwitterCymrIE. These routes give the same underlying toolkit uses that range from inspecting one document to incorporating Welsh analysis into another piece of software.
Experiments and results
How the authors judge a match
The main reference for evaluation is a human-annotated version of the material, described as the gold standard. For each task, the reference specifies the annotations the system is expected to produce. Precision measures the share of the system’s outputs credited as matches. Recall measures the share of desired annotations the system retrieves. F-measure gives a harmonic mean of precision and recall, so a weak result on either measure pulls down the combined score. Each metric depends on what the evaluation accepts as a match.
An annotation has a span, and some tasks also assess a feature such as a grammatical category or a headword. The news evaluation records partially correct spans and gives credit for overlap. It also reports false positives, which are outputs without a matching reference annotation, and missing items, which are reference annotations the system fails to find. An F-measure obtained with overlap credit answers a question about approximate as well as exact localisation. A use that needs identical start and end positions imposes a more demanding boundary condition.
For the core news experiment, the authors ran separate assessments for the tokenizer, tagger and morphological analyser. The point of comparison was the expert annotation, instead of an English GATE pipeline evaluated on the Welsh documents. For the wedding application, the comparison was with manual coding of the target roles and service details. For tweets, it was with expert annotation of token spans, grammatical categories and lemmas. A separate comparison with another Welsh tagger evaluated how much of a test corpus each system could identify. Its coverage measure has a different purpose from the reference-based F-measures.
Word-level analysis of Welsh news
The main evaluation document comprises 10 articles from BBC Cymru Fyw, with a total of 2,200 words. The collection includes politics, lifestyle and community stories. A Welsh-language expert followed instructions to annotate words and supply attributes that included their lemmas. The scope of the evaluation is the assembled news document. The paper presents output-level measurements for the pipeline’s word segmentation, grammatical classification and dictionary-form analysis.
The tokenizer achieves recall of 98.65%, precision of 97.86% and F-measure of 98.25% on the news set. The paper records 23 partially correct matches and 25 false positives. Single quotation marks are the main source the authors identify for partial matches. In a text that uses those marks to frame a quotation, the tokenizer can read a mark next to a word as evidence of a contraction or omitted letter. False positives often involve less common prefixes, including sgrin and aml, that the rules miss. The error analysis identifies specific places to look for improvements within a run whose aggregate scores are high.
The tagger reaches recall of 81.36%, precision of 80.71% and F-measure of 81.03% on the news set. It has 13 partially correct matches and 419 false positives as counted by the evaluation. Some of those outputs are related to the desired category at a more general level than the scorer recognises. If the reference calls a word a feminine noun and WNLT supplies the generic noun label, the evaluation treats the annotation as a false positive. Knowing that a form is a noun can still serve a task that needs only a broad category. A rule conditional on the feminine category would need the finer distinction.
Other tag disagreements concern the grammatical role itself. In the authors’ examples, a can act as a conjunction or a pronoun, and y can act as a determiner or a pronoun. The tagger’s lexical and suffix-based decisions do not resolve these contextual uses. These errors differ in kind from a loss of specificity within the noun category. They can give later processing a category incompatible with the word’s role in the sentence.
For the morphological analyser, the authors report recall of 80.01%, precision of 79.37% and F-measure of 79.69% on the news set. The evaluation records 2 partially correct matches and 460 false positives. The aggregate score includes words whose lemmas can be taken from lexical entries and words whose forms need rule-based analysis. The paper does not give separate results for noun plurals, verbs and mutation restorations. Its evaluation shows how often the resulting annotations agree under the study’s criteria across the material, with no measurement of the success rate conditional on needing a particular kind of rule.
The ordering of the reported F-measures gives a picture of the work remaining after segmentation. Identifying a word span is the strongest of the evaluated decisions. Attaching a grammatical category or a headword to that span is harder under the same study design. This ordering makes sense in light of the examples. An ambiguous short word may be easy to locate and still hard to categorise, and a mutated form can be clearly bounded even when its lexical origin is uncertain.
Recovering people and service details from notices
The authors selected and manually coded 32 wedding announcements from Llais Cwmtawe. The evaluation asks whether the application identifies the correct people for the specified roles and the correct location and date for the ceremony. The notices were already isolated from other newsletter material when the application received them. Its outputs can therefore be interpreted as results for structured extraction from a known notice.
Extraction F-measure by role and service detail on Llais Cwmtawe wedding announcements
The application scores highest on the ceremony date, with lower agreement on the venue and family roles.
The numbers
| System or setting | F-measure % |
|---|---|
| Service date (this paper) | 92.88% |
| Bride | 80.74% |
| Groom | 75.46% |
| Groom’s father | 70.98% |
| Bride’s mother | 70.30% |
| Bride’s father | 66.69% |
| Service location | 62.22% |
| Groom’s mother | 62.10% |
For the service date, the precision is 96.3% and recall is 89.7%. The authors had written special rules for Welsh temporal expressions, and the application could use the assumption that a date in a notice typically refers to the ceremony. The table records 26 correct dates, 3 missing dates and 1 false positive for that field. Those results combine recognising a date expression and assigning it the intended event role.
For the bride, precision is 100% and recall is 67.7%. The system identifies 21 correct bride annotations while missing 10. The groom category has precision of 95.2% and recall of 62.5%. The predictions for these roles are usually correct when the application makes them, while the reference still contains examples the system leaves uncovered. This is consistent with rules that exploit recurring formats and can fail when the form of a notice or its names provide different evidence.
The parent categories show a similar pattern. Precision is 100% for bride mothers and 91.7% for bride fathers, with recall of 54.2% and 52.4%, respectively. For groom fathers, precision is 91.7% and recall is 57.9%. For groom mothers, precision is 90% and recall is 47.4%. These categories require the application to distinguish relatives who may all be mentioned in close succession. The figures describe the performance of the whole extraction process, from recognising the name to identifying the relevant relationship.
The venue results show problems of both coverage and precision. Service location recall is 58.3%, precision is 66.7%, and the counts include 14 correct annotations, 10 missing ones and 7 false positives. The authors found that the available vocabulary was too limited for the specificity expected of the application, particularly for chapels and street names. A text can make it clear to a reader that the ceremony took place somewhere and still use a local name outside the system’s lists. The venue result shows where the resources assembled for the demonstration fell short of the distinctions the application tried to make.
Analysing words in Welsh tweets
To evaluate TwitterCymrIE, 120 messages in Welsh were drawn from the Corpus of Welsh Language Tweets. A Welsh-language expert again produced word-based reference annotations, including lemmas. The outputs scored are token spans, the grammatical categories attached to tokens and the lemma attributes. The paper illustrates hashtag, account and URL annotations as well, but its reported precision and recall concern those core linguistic outputs.
The authors found that the program assigned some grammatical labels at a finer level than the expert did. To evaluate tagging against the intended categories, they mapped those detailed predictions to the reference inventory before scoring. For instance, several verb tags were grouped under VB. This normalisation of the output labels is distinct from the normalisation of spelling within the tweet pipeline. Label normalisation sets the level at which the system and reference are compared. Spelling normalisation is one of the processes the system can apply to the text.
Tokenization on the tweets reaches 99.87% recall, 87.66% precision and 93.37% F-measure. The token category scores are 81.32% recall, 71.38% precision and 76.03% F-measure. For lemmas, the scores are 79.39% recall, 69.69% precision and 74.22% F-measure. The published scores put tweet recall in roughly the same range as news recall for each corresponding output. Precision is lower on tweets for all the measured outputs, including token boundaries.
The authors describe the overall decline in F-measure as roughly 5% and the precision decline as almost 10%. They point to colloquial language, abbreviations and special characters as sources of difficulty. Those characteristics can affect segmentation as well as decisions about a token’s category or headword. The experiment shows that the adapted pipeline can still recover much of the expert annotation in microblog text. Its weaker precision means an application would have to contend with a higher proportion of questionable outputs, even on these items which were already selected as Welsh-language tweets.
Comparing text coverage with CyTag
The paper discusses a comparison made in work on Welsh semantic tagging for the CorCenCC corpus. CySemTagger initially used WNLT’s part-of-speech tagger. The later comparison with CyTag assessed text coverage by calculating what proportion of the test corpus’s words each tagger identified. CyTag had greater coverage and was adopted by CySemTagger. The paper attributes the coverage gap mainly to lemmatization performance.
Word identification coverage for WNLT and CyTag on the CorCenCC comparison corpus
CyTag identifies a larger share of the words in the comparison text.
The numbers
| System or setting | Text coverage % |
|---|---|
| WNLT tagger | 73% |
| CyTag (this paper) | 92% |
CyTag employs constraint grammar, which uses grammatical context to constrain possible analyses. The authors describe its method as having two stages and trace its approach to the multilingual Bangor Autoglosser. They regard the constraint grammar as a likely contributor to the stronger coverage and note the work invested in developing that software across languages. The cited account describes Welsh tagging with lexical resources and constraint grammar.
The comparison establishes which complete system identifies more words on the test material used for coverage. The news F-measure instead incorporates whether annotations agree with an expert’s reference. Coverage can matter greatly to a downstream tagger that needs word analyses as inputs, even though the figures leave the quality of those identified analyses to a separate evaluation. The published comparison supplies no relative news-set precision for WNLT and CyTag.
What the ablations show
The paper reports no component ablations, but it does analyse annotation errors, compare news with tweets, contrast extraction targets within the wedding sample and discuss a separate coverage comparison with CyTag.
What the errors reveal about the rules
The tokenizer’s partial matches offer the clearest account of a specific rule behaviour. A mark attached to a word can indicate an omission, and a single quotation mark can occupy much the same position. The tokenizer has rules that treat the former as part of a word. Some news passages written with single quotes present similar evidence even though the writer is setting off a quotation. Reading those errors helps explain how an adaptation designed for Welsh can still give an unintended boundary on Welsh text.
The authors suggest narrowing the recognition of contractions to known forms and removing general rules for initial vowel loss and final consonant loss. That suggestion follows from the kinds of errors observed. The paper does not report a run with those patterns disabled. Their contribution to correctly handling genuine omissions, and the aggregate effect of removing them, remain unmeasured. A narrower pattern can reduce this kind of ambiguity when it fires while also passing over valid examples outside its list.
For the tagger, the discussion identifies disagreements that reflect a difference in specificity and others that reflect ambiguity about grammatical function. The noun example illustrates why a result can be partly informative for some applications even when the evaluator treats it as a mismatch. Generic noun, verb and adjective labels can give a useful broad analysis. A finer annotation can also be essential, as the mutation rule that tests for a feminine noun demonstrates. The authors describe the tagging figures as a lower bound in the sense that an evaluation granting credit to broadly correct labels could recognise more of the tagger’s output. They give no revised news result under such a scheme.
When a spelling such as a can function as a conjunction or a pronoun, the ambiguity affects the grammatical function itself. Resolving it would require more attention to the current sentence. The authors suggest contextual post-processing rules or trained rules as routes for improvement. The error examples identify cases those approaches would have to handle. The evaluation does not measure the gain from either approach. The reported tagging score thus includes both a scoring issue about category granularity and a processing issue about selecting among grammatical uses.
What changes across the evaluated settings
The comparison between news and tweets shows a recurring pattern in the published scores. The drop in precision begins at word segmentation and continues in grammatical categories and lemmas. This is compatible with the authors’ account of difficulties involving informal spellings, abbreviation and special characters. A segmentation error can also change which string the tagger looks up or which preceding token a mutation rule sees. The study gives aggregate outcomes for each stage and does not trace individual errors through the pipeline to determine how often that happens.
The tweet experiment makes a scoring adjustment for tag detail, collapsing some predictions to the categories used in its reference. That procedure addresses a particular source of disagreement between system and annotator. Since the paper reports no paired scores before and after the adjustment, its contribution to the final tweet result is unknown. The news and tweet corpora differ in genre, the tweet system includes dedicated processing resources, and the evaluation handles tag detail differently. The comparison documents performance in each complete setting. It cannot assign the observed changes to the normaliser, hashtag processor or source text independently.
In the wedding notices, using the same sample for all the fields gives a common textual setting. Service dates are the strongest output, and the authors relate this to dedicated temporal rules and recurring notice conventions. Ceremony locations pose difficulties with name coverage, and the family roles require a connection between people and the relationships described. These differences locate weaknesses that matter to an application. The study does not test the same notices with expanded chapel and street vocabularies, so the improvement obtainable by filling the identified gaps is unknown.
The coverage comparison with CyTag provides the closest head-to-head assessment of two Welsh systems. It shows a difference of practical importance for a downstream semantic tagger, which needs enough of the text to receive a grammatical analysis. The paper connects the advantage chiefly to lemmatization and regards contextual constraint rules as a likely contributor. The systems differ in more than their use of context. A comparison of complete systems cannot establish how WNLT would have performed with one of CyTag’s resources or methods substituted into its pipeline.
What the development account establishes
The authors’ effort estimates describe which tasks occupied their team. Within core development, the morphological analyser required substantial work, reflecting the need to handle initial mutation as well as inflection. In the later phase, the Twitter extension drew heavily on development time even though much of the underlying processing already existed. The descriptions of the Java code, the JAPE grammars and the vocabulary adaptation give substance to the account of how the work was allocated.
There is no parallel estimate for a project that builds an equivalent toolkit from scratch. The authors make a feasibility argument from a project that delivered reusable software with the resources at hand. Its schedule records the time they spent and its implementation documents what they could carry over. The amount of time saved, and the division of any savings between framework reuse and existing Welsh data, are outside what the study measures.
Limitations
Limits identified by the authors
The authors give particular weight to the finite coverage of dictionaries and gazetteers. Gaps can matter in several distinct ways. The tagger may fall back to a suffix test or a generic noun label because it lacks an entry for a form. The lemmatizer may find a plausible reversal of an initial mutation and then discard it because validation fails. An entity recogniser may miss a local name that a specialised application requires. Vocabulary coverage has to be understood in relation to the decision that uses it. A large list of general names can coexist with poor coverage of venues in a particular community.
The authors also describe the implemented mutation rules as a limited account of Welsh grammar. They address simple contact mutations, which supply a nearby trigger for a proposed reversal. Some other mutations depend on a broader context and fall outside those patterns. The analyst can extend the rule set, and the authors suggest testing additional contextual patterns iteratively. The existing evaluation quantifies the analyser’s aggregate lemma performance, with no separate estimate of how much additional coverage such an extension could provide.
The tagger has a related contextual limitation. Knowing dictionary categories and characteristic endings can establish plausible categories for a word. The current tagger handles some uses poorly when the form is ambiguous and the sentence determines which grammatical function applies. The authors mention post-processing and corpus-based training as possible ways to address this. Pursuing trained rules would in turn depend on having an appropriate annotated corpus, which the paper describes as a substantial resource to create when one is unavailable.
The authors explicitly qualify the wedding study by describing the notices as short and similar in their content and organisation. Those regularities support heuristics such as using the first female mention as evidence of the bride. Manual extraction also means that a person had already found the notices within the source publication. An application operating directly on whole newsletters would first need to identify relevant passages. The paper leaves that stage for future work. For tweets, the authors regard the comparable recall as encouraging for reuse and identify precision as an area where further adaptation would help.
The paper cautions against transferring its effort estimates to other languages. The fit with available GATE components, the linguistic features requiring special treatment, the format and quality of lexical resources and the experience of the developers can all change the balance of work. WNLT benefited from suitable material that was already digital and relatively easy to adapt. In a setting with sparse or hard-to-convert resources, the authors suggest putting early effort into building or improving those materials. Better resources may then support more than the particular toolkit that prompted their development.
Limits apparent from the evaluation design
The news experiment assesses a small group of stories from a single outlet, while the tweet experiment uses a selection from a named corpus. The paper describes annotation by a Welsh language expert for each evaluation and gives no estimate of agreement among multiple annotators. The results show agreement with the reference used in each experiment. There is uncertainty about how well the scores would transfer to other writing or to a reference produced using different conventions for spelling variants, boundary placement or grammatical specificity.
Overlap credit also affects how the news scores should be used. Two spans can overlap even when a system attaches a quote mark to a word that the reference begins after the mark. Approximate spans can suffice for some uses. An application that displays or replaces precisely the intended characters would need evidence about exact boundaries. Similarly, the treatment of detailed grammatical labels affects whether a score describes recognition of broad categories or complete agreement on finer distinctions. The coarser mapping used for the tweets leaves the accuracy of the original fine-grained outputs open.
The staged design creates a question about where errors begin. The tagger relies on tokens, and the morphological analyser can use the grammatical labels. If a lemma differs from the reference, that disagreement can arise from the lemmatizer itself, from a missing dictionary entry or from an earlier choice about what token or grammatical category to analyse. The paper does not report runs in which every upstream output was replaced with expert annotations. The published results therefore describe what the processing stages produced under the reported setups, with limited evidence about the fraction of errors inherited from other stages.
The scope of the evaluation also differs from the scope of the software. The news experiment scores tokens, grammatical categories and lemmas. It supplies no separate sentence-boundary score or broad test of CymrIE’s person, place and organisation outputs. The wedding evaluation scores an application with additional resources and rules, and its results cannot be treated as general named entity recognition scores. Similarly, the tweet evaluation measures several core annotations while showing tweet-specific outputs in examples. Separate accuracy estimates for normalisation, language identification or hashtag analysis would require further reference annotations and comparisons.
Finally, the study’s claim about reuse concerns a working implementation under the conditions that made it possible. The paper does not compare long-term maintenance effort across different development strategies. It also gives no test of improved search outcomes for users, even though mutation provides a clear motivation for using lexical analysis in search. The evidence consists of evaluated annotations and two demonstrations of how the components can be extended. The performance of a deployed application would depend on its additional rules, the text it receives and how it uses the toolkit’s output.
What came after
Profiling Welsh text
Proffiliadur: Welsh Language Text Profiling Toolkit cites the WNLT paper and takes Welsh text profiling as its subject. The connection is visible in the type of work a profiling toolkit addresses. WNLT turns Welsh text into identifiable units and attaches linguistic information to them. Those operations are relevant whenever a toolkit needs to describe what occurs in a text systematically. The citation connects the projects, and the later title identifies its focus. Which WNLT components, if any, entered Proffiliadur’s implementation or evaluation remains unspecified. Proffiliadur: Welsh Language Text Profiling Toolkit
Labelling the triggers for mutation
The other citing work, Unsupervised Labelling of Mutation Triggers in Welsh, concerns the triggers themselves. In WNLT, a trigger described in the rules is evidence used to propose a headword for a nearby token. The later work makes labelling triggers the stated task and describes its approach as unsupervised. That shift in the object of analysis connects the study to a specific decision in WNLT. The earlier pipeline uses recognised triggers to resolve written word forms, while the later work gives trigger labelling an explicit place of its own. The title and citation leave its use of WNLT’s rules, lexicon and annotations unspecified. Unsupervised Labelling of Mutation Triggers in Welsh
Cite
Cite as Daniel Cunliffe, Andreas Vlachidis, Daniel Williams and Douglas S. Tudhope. 2021. Natural language processing for under-resourced languages: Developing a Welsh natural language toolkit. Computer Speech & Language.
@inproceedings{cunliffe2021natural,
title = {{Natural language processing for under-resourced languages: Developing a Welsh natural language toolkit}},
author = {Daniel Cunliffe, Andreas Vlachidis, Daniel Williams and Douglas S. Tudhope},
booktitle = {Computer Speech \& Language},
year = {2021},
doi = {10.1016/j.csl.2021.101311},
url = {https://doi.org/10.1016/j.csl.2021.101311}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/cunliffe-2021-natural-language-processing-under-resourced/