---
title: "Thai Nested Named Entity Recognition Corpus — Buaphet 2022"
description: "How Thai Nested NER captures names inside names, how its annotations were built, and why even the strongest systems miss many rare entities."
canonical: "https://research.elamur.ai/free/en/papers/buaphet-2022-thai-nested-named-entity-recognition/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/buaphet-2022-thai-nested-named-entity-recognition/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / Thai Nested Named Entity Recognition Corpus

# Thai Nested Named Entity Recognition Corpus

Paper · 2022 · Weerayut Buaphet, Can Udomcharoenchaikit, Peerat Limkonchotiwat et al.

**Authors:** [Weerayut Buaphet](https://md.research.elamur.ai/free/en/authors/weerayut-buaphet/), [Can Udomcharoenchaikit](https://md.research.elamur.ai/free/en/authors/can-udomcharoenchaikit/), [Peerat Limkonchotiwat](https://md.research.elamur.ai/free/en/authors/peerat-limkonchotiwat/), [Attapol Rutherford](https://md.research.elamur.ai/free/en/authors/attapol-rutherford/) and [Sarana Nutanong](https://md.research.elamur.ai/free/en/authors/sarana-nutanong/) · **Year:** 2022 · **Venue:** Findings of the Association for Computational Linguistics: ACL 2022 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Findings of the Association for Computational Linguistics: ACL 2022 · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2022.findings-acl.116/)
- [PDF](https://aclanthology.org/2022.findings-acl.116.pdf)
- [DOI 10.18653/v1/2022.findings-acl.116](https://doi.org/10.18653/v1/2022.findings-acl.116)

## Summary

A university name can contain the name of a city. A person’s name can include a title, a given name and a family name. In [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), a system has to find the boundaries of such expressions and tell the reader what kind of thing each one names. A flat annotation can record the university or the person as a whole, but it cannot also record the names and titles inside that same span. Buaphet and colleagues introduce Thai N-NER, the first Thai corpus built to preserve those inner mentions. It gives researchers a way to test whether a system can find both the larger expression and the meaningful parts it contains.

The corpus has 264,798 annotated mentions in 4,894 documents drawn from news articles and restaurant reviews. Its 104 fine-grained classes can be grouped into 10 broader categories. An annotation can extend to 8 layers, though the great majority of mentions occur in the first three. Thai writing introduces a practical complication because written spaces do not consistently separate words. Annotators therefore selected spans over syllables, avoiding cases where automatic word segmentation would put a name boundary inside an unselectable token. The released word-level representation uses those selected boundaries when preparing the data for research.

The authors compare basic approaches that learn to label each depth separately with specialized approaches that had performed strongly on English nested recognition benchmarks. A prediction counts as correct only if its span and type both match the reference annotation. On the Thai test set, a baseline with an XLM-R encoder shared across depths achieves an overall F1 of 79.75, the highest in the comparison. The strongest of the adapted specialized systems, Second-best-learning, reaches 79.43. The best aggregate score thus comes from a system that gives each depth a separate output layer while sharing the representation of the text.

Frequency changes the picture. The same shared XLM-R baseline scores 84.31 F1 on the most frequent classes and 51.16 on the rarest group. Other systems also lose ground as they move toward rare categories. The weaker recall there means that many reference mentions go unrecovered, even when the predictions a system does make are frequently correct. Analysis of the errors also finds problems with exact boundaries and with choosing a specific type for expressions whose interpretation depends on context. The authors make the corpus available as `scb-nner-th-2022`, with annotation guidance, experimental code and trained weights to support further work.

## Deep dive: Thai Nested Named Entity Recognition Corpus

How Thai Nested NER captures names inside names, how its annotations were built, and why even the strongest systems miss many rare entities. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What an entity label leaves out

An entity recognition annotation records an occurrence of a name or other expression in a text. It specifies where that occurrence starts, where it ends and which category it belongs to. The occurrence is called a mention, and the part of the text it covers is called its span. A span may include a full institution name, a date or a person’s title. The task concerns those expressions as they occur in context. A name that appears repeatedly can give rise to several mentions, and each occurrence needs its own boundaries.

Consider Chiang Mai University, the authors’ introductory example. The whole expression names an organization. The words Chiang Mai also name a location, and their occurrence inside the university name still carries that information. A flat annotation can select the complete university name. Representing the city as well requires assigning another span that uses some of the same text. The distinction matters to the authors because later processing might need to connect the university with its city. Finding the organization gives that downstream task one piece of evidence. Finding the city within the name gives it another. The paper also places entity recognition among the inputs used in [question answering](https://md.research.elamur.ai/free/en/topics/question-answering/) and the construction of [knowledge graphs](https://md.research.elamur.ai/free/en/topics/knowledge-graphs/).

The structure can become richer than an organization containing a place. A long designation can include an event, and the event can contain a date whose day and month each receive a label. The task at that point is to recover a collection of related spans at different depths. A system that recognizes the outer designation may miss its date. A system that correctly finds the day and month can still miss the complete date span or its type. These outcomes are distinct because each annotation identifies a separate piece of information.

Nesting and specificity are also separate design choices. A corpus can allow an organization to contain a location while giving both broad category names. It can also distinguish cities from provinces or given names from surnames. A finer inventory gives a downstream system more information about each occurrence, at the expense of more distinctions for annotators and recognizers to make. Thai N-NER combines both choices. Its annotations are meant to say which parts of a complex expression are worth recovering and how specifically each part can be described.

The paper relates this motivation to work that incorporates entity information into contextual representations. It cites [LUKE](https://md.research.elamur.ai/free/en/papers/yamada-2020-luke-deep-contextualized-entity-representations/) as evidence that such representations can help downstream tasks. The Thai study tests the earlier step of finding and typing the mentions themselves. The possible benefit to a system that consumes them motivates the resource, while the evaluations in the paper concern the recognition task.

#### How earlier corpora framed the task

The authors describe a field with several nested resources for English and far fewer options for other languages. English resources also differed in what they were meant to support. The early ACE collections included nested entity annotation. ACE-2005 had 30,966 mentions and 7 broad entity types, alongside annotations for relations and events. GENIA came from a different setting altogether. Its 2,000 abstracts and 92,681 mentions gave researchers annotated examples of entity names in biological writing. The source and purpose of a corpus shaped the expressions its examples contained.

The closest precedent for the Thai annotation scheme was [NNE](https://md.research.elamur.ai/free/en/papers/ringland-2019-nne-dataset-nested-named-entity/), an English newswire corpus with 114 classes. In the example Buaphet and colleagues discuss, NNE annotates a complete date and gives its day, month and year their own labels. This is the same sort of distinction that matters for Thai N-NER. A reader can identify a date by looking at the broad span, or recover the function of each component from the finer labels. NNE gives the authors a precedent for annotating both levels together throughout a large corpus.

The authors also discuss NoSta-D for German, which used native-speaking annotators and drew on Wikipedia and online news. They place it against the earlier German data from the [CoNLL-2003 shared task](https://md.research.elamur.ai/free/en/papers/sang-2003-introduction-conll-2003-shared-task/), citing concerns about consistency in that earlier annotation. For Vietnamese, they describe VLSP–2018 as a shared-task benchmark with 35,817 mentions across 1,282 documents and 3 entity types. Danish DAN+ included 6,425 mentions and 4 classes and was used to investigate transfer between languages and shifts between domains. These projects addressed different needs. None offered the combination of Thai text, nesting and a richly differentiated inventory that the authors sought.

Public Thai resources known to the authors supplied broad, flat annotations. Those resources could help train or evaluate a system that assigns one set of entity spans, but their labels could not tell a researcher how frequently that system recovered inner mentions. The issue was therefore one of supervision as well as evaluation. A recognizer needs examples that identify the components it is supposed to learn, and an evaluator needs reference annotations that distinguish a missed component from one that the annotation scheme never asked for.

The paper situates its benchmark in a research area that already had several ways to make nested predictions. It cites work such as [Neural Architectures for Nested NER through Linearization](https://md.research.elamur.ai/free/en/papers/strakova-2019-neural-architectures-nested-ner-through/) and discusses systems that represent several levels, decode from outer entities inward, or split the job into span detection and labeling. What was missing was a Thai benchmark on which to see how these choices behaved. The authors also wanted a benchmark where the inventory covered many types. With such an inventory, a high score on familiar mentions can coexist with weak results across much of the category list. Annotating the categories separately makes that distinction visible.

### The method, step by step

#### Choosing the texts and the annotation units

The authors collected 4,396 articles from the Prachathai news site and 498 reviews from the Wongnai restaurant platform. The sources gave the corpus formal and colloquial writing. This matters for the material available to annotators. The corpus can include names and complex designations of the sort found in news alongside expressions used by people writing about restaurants. The paper treats the domains as sources for a common annotation scheme, with the same basic decision about span and type in either kind of document.

Before anyone could label a mention, the project had to decide how an annotator would select its boundaries. In text where spaces reliably mark words, a span can often be selected as a sequence of already delimited words. The Thai writing system does not generally offer those boundaries in that form. A project can insert them with a word segmenter, but an automatic segmenter can be wrong around words outside its vocabulary. Those words can include precisely the names the annotators need to mark. If a segmenter joins the end of a title to the beginning of a name, the interface may offer no word boundary at the point where the desired span ends.

Giving annotators every character boundary would allow more exact selections but would also give them more opportunities to select the wrong position. The authors chose an intermediate unit. They first segmented the text into syllables and gave annotators those boundaries as selectable points. Their rationale draws on earlier work showing that syllables help resolve word segmentation ambiguities in Thai. They also cite work explaining why automatic syllable segmentation can be highly accurate when spelling errors are infrequent. Thai orthography supplies much of the information needed for that step. The authors use syllable segmentation as a practical aid to [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/).

An example in the appendix makes the choice concrete. In the name the paper renders as Mr. Makata Arvasa, the title นาย can be recovered by adjoining the units นา and ย from the syllable segmentation. In the example output from a standard word tokenizer, ย is grouped with material that follows the title. The correct end of นาย then falls inside a unit, so selecting complete units cannot recover it. Syllable boundaries let the annotator combine the relevant pieces without accepting the tokenizer’s guess about the whole word. The example is about whether the interface makes a boundary selectable. It does not require the title to have been presented as one unit to begin with.

The choice of annotation units is distinct from the choice of release format. Researchers receive a word-level version because word segmentation is a common step in working with Thai text. For that version, the authors combine a maximal matching tokenizer from PyThaiNLP with the boundaries recorded by annotators. In practical terms, if the tokenizer’s proposed division would erase an annotated entity boundary, the selected boundary has to be retained. The paper thus uses [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/) in different ways at different stages. Syllable units support human selection, while word units support the released format.

How Thai N-NER goes from text to benchmark The steps in order.

#### Deciding what belongs inside a mention

The guideline adapted ideas from English NNE to the Thai data. It offers broad categories such as person and organization, with more specific classes for components or kinds of entity that the authors wanted to identify. In the paper’s example of Police Colonel Prawet Munpramuk, the complete expression receives a person label. The rank, given name and surname each receive a label on an inner span. The rank is useful as a title in its own right, and its extent differs from that of the person’s name as a whole. Annotating both lets the corpus preserve that distinction.

The authors describe the structure of a complex mention as a tree. The outermost span sits at the first depth. A span placed deeper inside it must be contained within its parent, and spans at the same depth cannot overlap. A broad category can appear at any depth appropriate to its occurrence. A fine-grained category must appear under the corresponding broader type according to the guideline. As a result, broad categories and annotation depths answer different questions. A category says what kind of entity the text names. Depth says where that annotation sits inside other annotations in this occurrence.

The long committee example illustrates why depth cannot simply be determined from the category name. The whole expression designates the committee president and is labeled as a role. Within it there is a political organization, and within that there is an event. The event wording includes a duration and a date. The day and month sit inside the date. The date is a broad type even though it occurs well inside the outer role span. The narrower day and month labels describe parts of the date rather than arbitrary pieces of the enclosing committee expression.

The rule against spans that cross is also a rule about which analyses the guideline admits. The paper illustrates it with a title for a deputy spokesperson associated with the Office of the Prime Minister. It considers a proposed role annotation that ends partway through the office name and a government annotation that covers the complete office name. The two would share material at the same level while neither span contains the other. That would be impossible to represent as sibling branches in the tree. The authors also argue that the proposed role boundary gives the remainder of the office name the wrong semantic relationship to the title. In this example, requiring well-formed nesting helps avoid endorsing a misleading decomposition.

Sometimes the harder decision is whether there is an entity at all. In the guidelines’ examples, ทหารไทย can describe a Thai soldier or refer to the Thai military as an institution. In a sentence about an arrest, the intended reading is a soldier and the expression receives no named entity annotation. In the example where the military forbids people from leaving their homes, the expression denotes the institution and qualifies for an annotation. The characters alone cannot resolve the decision. The guideline gives annotators such cases so they can use the surrounding sentence to decide what the expression refers to.

The guideline therefore asks annotators to make several judgments together. They choose a span, determine whether its use in context warrants a label, choose a type at the appropriate degree of specificity and place it in a valid hierarchy. A dictionary of names can assist with some of these decisions during review. It cannot determine in isolation whether a particular sentence refers to an institutional actor or describes an individual. Likewise, marking a correct span does not resolve whether it should be typed as a government body or as a political organization. Those distinctions remain explicit in the released annotations.

#### Checking the labels and preparing the release

The annotation team comprised 47 people with training in linguistics. They passed a test on the guideline and had a shared channel for discussing questions with one another and the project manager. In the annotation interface, they highlighted spans over the syllable segmentation and assigned entity types. The test checked that annotators understood the rules before labeling. The discussion channel let them resolve cases that arose when applying the rules to the news and reviews.

Verification started with a manual review of sampled annotations. The authors also used a conditional random field, or CRF, trained only on the outermost layer. Here the CRF is a tagger that assigns labels across a sequence. Its disagreements with the reference data produced examples for further inspection. The authors combined those examples with issues found in manual review and sent the annotators a list for reassessment. Recurrent problems included inconsistent labeling, incorrectly chosen labels and applications that violated the guideline.

The next check targeted problems with more explicit signals. A rule-based program flagged documents with crossing or otherwise disallowed overlapping annotations, and a gazetteer helped identify potentially mislabeled entities. A gazetteer is a list of names that can be consulted when checking a label. The programs produced cases to inspect, and annotators made the corrections. This division of labor matters when the type of a name depends on its context. A disagreement with a list or a recognizer can point to a question worth checking without deciding the answer by itself.

The authors then trained a nested recognizer drawn from Shibuya and Hovy’s work. It provided a check that the annotation could support nested training, and the authors used its prediction errors to identify further cases for review. Its test F1 in this verification stage was 75.44%. That number belongs to the corpus development procedure. The final benchmark separately reports scores for the systems evaluated on the released splits. Once annotators had addressed the additional issues, the project reserved 20% of the data as the test portion, had two annotators label it again and used a third annotator to settle mismatches. In the final benchmark the non-test material was divided into training and development sets.

The authors measured agreement on eight sampled documents containing 2,922 tokens. They used Cohen’s kappa, an agreement measure that takes into account agreement expected by chance, and computed it under two representations. In the CoNLL representation, the comparison proceeds token by token and depth by depth. A disagreement over a long span can contribute several token disagreements. A span also counts as mismatched if both annotators marked it but placed it on different layers. Under this representation the reported kappa is 0.79.

The alternative, called Pyramidal, organizes candidates by their length. It generates the possible contiguous candidates for each sequence, treats each candidate as a span to compare and groups candidates of the same length together. If the annotators disagree on a mention, that disagreement contributes once regardless of how many tokens the mention covers. The authors report 0.85 kappa for the token version of this comparison and say they found the same score when they performed it at the character level. The two agreement figures reflect different units of comparison. The CoNLL score is especially sensitive to disagreement about depth and about long entities, whereas the candidate-based score assesses agreement on the spans as units.

The CoNLL release places a word token on each row and gives each depth its own label column. The corpus reaches 8 layers, so the format can hold a token and a label for every layer that might apply. A tag in the BIOES scheme tells the reader whether the token begins a span, sits inside it, ends it, forms a complete mention on its own or lies outside an entity at that depth. In the committee example, the same row can continue the outer role and begin a more deeply nested duration. Separate columns allow those assignments to coexist. The release also represents original spaces with an underscore so the spacing can be recovered when the segmented text is converted back.

#### Training systems to recover the spans

The experiments use the annotation layers in several different ways. The classical baseline trains a separate CRF for each layer and merges their predictions. It uses IOB tags, which identify beginnings, interiors and tokens outside a mention. The authors chose this smaller tag scheme for the CRF because the large number of entity classes makes the extended boundary scheme slower to train. Each CRF learns to tag its own layer from the data for that layer. The final list comes from assembling those depth-specific predictions.

The neural baselines have an encoder that produces representations of the text and a fully connected linear decoder that predicts the tags. The paper tests a Thai encoder, WangchanBERTa, and a multilingual encoder, XLM-RoBERTa, abbreviated XLM-R in the results. Both are adapted on the corpus through [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). For each encoder the authors compare two ways of assigning the work across depth. In the separate configuration, indicated by `sp`, each depth gets its own complete encoder and decoder. Training for the outer level therefore updates a different encoder from training for an inner level. In the shared configuration, indicated by `sh`, the depths use a common encoder and each retains a decoder of its own. The shared text representation can support several layers while the separate output layers learn their particular tag decisions.

For these neural baselines the authors use Adam and start with a learning rate of 1e-5. The learning rate governs the size of updates during training. The appendix describes a scheduled decrease that can be written as follows.

```
η_next = 0.1 × η_current
```

Here η_current is the learning rate immediately before a scheduled decrease, and η_next is the rate immediately after it. The subscripts indicate which of the two states the rate refers to. The equality sign gives the update rule, and × means multiplication. The factor is 0.1, applied every 50 epochs, where an epoch is a pass through the training data. The maximum is 500 epochs, with early stopping after 16 epochs without improvement. The appendix says the shared variants are evaluated using the last checkpoint. For the separate variants it describes checkpoint selection by reference to when training stops improving.

The specialized systems bring different ways of using the nested structure. Second-best-learning decodes an outer mention and works inward recursively to identify deeper mentions. The order allows the system to look for inner entities in the context of a larger recognized span. Pyramid builds representations across levels with pyramid and inverse pyramid mechanisms. Its levels are organized around spans of different lengths, a different organizing principle from separate output columns for annotation depth. A long span can represent an entity under either a deeply nested or an outer annotation, so length and depth need not coincide.

The third system, [Locate and Label](https://md.research.elamur.ai/free/en/papers/shen-2021-locate-label-two-stage-identifier/), divides prediction into locating candidate spans and assigning categories to them. This makes the decision about extent a distinct stage from the decision about type. The authors adapt all the specialized systems to Thai with WangchanBERTa and start from GENIA parameter configurations, which they use for a reproduction check on that benchmark. The comparison thus asks how existing recognition procedures work after adapting them to the available Thai encoder and benchmark.

Locate and Label required some additional changes. WangchanBERTa has a shorter input limit than the BERT–large encoder used in the original system. The authors stay within the sequence limit by restricting the context to ten words per neighboring sentence. They also replace the original static [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) representations with the static [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) from thai2fit, alongside the contextual representations from the encoder. A static embedding supplies a representation associated with a word, while the contextual encoder represents the occurrence in its surrounding text. The resulting Thai configuration therefore differs from the published English configuration in the encoder, the source of the static embeddings and the amount of neighboring text it can use.

### Experiments and results

#### What the benchmark measures

The full corpus has 1,272,381 tokens and 264,798 mentions. The splits are described as 60% training, 20% development and 20% test. Training contains 2,935 documents and 155,353 mentions. Development contains 979 documents and 50,501 mentions. Test contains 980 documents and 58,944 mentions. The training and test splits each contain all 104 types, while development contains 101. For the main benchmark, even the rare test categories are therefore categories the systems have had a chance to encounter in training. The issue is how much they learn from the examples available to them.

The corpus can represent deep hierarchies, but the need for those layers is uneven. Across the corpus there are 125,180 mentions at the first layer, 120,909 at the second and 16,500 at the third. The authors report that these layers account for 99.2% of mentions, leaving 2,209 mentions, or 0.8%, in all deeper layers combined. Among the outermost mentions they count 67,168 with nested structure and 58,012 without it. The maximum depth is 7 in training, 8 in development and 6 in test. The benchmark’s overall score consequently reflects a great deal of learning about outer and immediately nested entities, with much less evidence about the deepest structures the format permits.

The disparity across types is also large. In the whole corpus before splitting, the frequency inventory lists 30,457 cardinal mentions and 16,358 person mentions. It lists 115 station mentions, 8 latitude mentions and 2 concert mentions. Those figures describe the complete collection and should be read separately from the training frequencies used to partition the experimental categories. They illustrate why an inventory can encompass many distinctions without giving a recognizer substantial practice on every one. A category’s presence in a guideline or test split says little by itself about the number of examples available for learning it.

For the frequency analysis, the authors sort the classes by how many training mentions they have. The most frequent group, the head, accounts for 80% of training mentions. The middle group, the body, accounts for 15%, and the tail accounts for 5%. Together the body and tail contain 84 of the 104 classes, with 20% of training mentions. The evaluation then follows those groups into the test set. A head score describes performance on types that were common in training. A tail score describes performance on types the systems had relatively little opportunity to learn. The groups are based on frequency, not on how far a mention sits inside another annotation.

Every scored prediction must match the reference boundaries and category. A correct type assigned to a shortened address is an error under this rule. A span with correct boundaries can likewise receive no credit if the proposed type is wrong. Precision describes how often predicted mentions are correct. Recall describes how many reference mentions the system recovers. F1 combines the two so a high result requires both accurate predictions and good coverage. The authors report all three measures for the test set as a whole and for the head, body and tail separately.

#### The overall comparison

Overall F1 on the Thai N-NER test set The shared XLM-R baseline leads a close group that includes the strongest adapted specialist.

**The numbers**

| System or setting | F1 |
| --- | --- |
| CRF | 70.61 |
| WangchanBERTa, separate | 78.94 |
| WangchanBERTa, shared | 79.70 |
| XLM-R, separate | 78.48 |
| XLM-R, shared (this paper) | 79.75 |
| Second-best-learning | 79.43 |
| Pyramid | 78.50 |
| Locate and Label | 74.06 |

The CRF establishes an overall test F1 of 70.61 using separate taggers for the layers. All of the encoder-based baselines and adapted specialized systems exceed it. The leading shared XLM-R baseline has overall precision of 86.93 and recall of 73.66. Shared WangchanBERTa is close in F1, with precision of 88.87 and recall of 72.25. These two systems obtain similar aggregate F1 scores with different balances. Shared WangchanBERTa makes a higher proportion of correct predictions. Shared XLM-R recovers a higher proportion of the reference mentions.

Among the specialized systems, Second-best-learning is strongest overall with F1 of 79.43. Its precision is 86.41 and its recall is 73.49. Pyramid and Locate and Label achieve overall F1 of 78.50 and 74.06, respectively. Locate and Label recovers reference mentions at 72.61 recall, but its overall precision of 75.57 is below that of the other entries. Its position in the comparison is therefore associated with the accuracy of its predictions as well as with how many references it finds. Its recall alone would give a very different impression of its standing.

These results show that separately decoding the depths from an encoder is viable on this benchmark. The finding is especially relevant because the adapted specialized systems use procedures expressly designed for nested entities. The simplest encoder-based baselines remain close to the best specialized result while requiring only a linear output layer for each depth. Conversely, a competitive overall score does not settle which system will do best on a particular set of classes. The test results split by frequency show where rankings change.

#### Frequent classes and rare classes

Second-best-learning has the highest head F1, at 84.58. Its head recall is 81.78. The shared WangchanBERTa baseline has head F1 of 84.50 and a different balance of precision and recall, at 90.51 and 79.24. Separate WangchanBERTa provides the highest head precision in the table, 90.70, with recall of 77.66. The strong head scores show that several systems recover common types well enough to be competitive, even though they make different decisions about which spans to return.

In the body, the highest F1 is 66.33 for separate WangchanBERTa. Shared XLM-R reaches 66.31, while Second-best-learning scores 65.12. The two leading baselines again arrive at very similar F1 scores from different balances. Separate WangchanBERTa has body precision of 81.55 and recall of 55.90. Shared XLM-R has body precision of 77.29 and recall of 58.06. A reader interested in these categories can see that the aggregate ranking conceals a tradeoff between the proportion of correct outputs and coverage of the reference annotations.

Tail-class F1 on the Thai N-NER test set Shared XLM-R leads the rare classes, and Pyramid is strongest among the adapted specialists.

**The numbers**

| System or setting | F1 |
| --- | --- |
| CRF | 42.15 |
| WangchanBERTa, separate | 39.10 |
| WangchanBERTa, shared | 44.20 |
| XLM-R, separate | 45.95 |
| XLM-R, shared (this paper) | 51.16 |
| Second-best-learning | 31.16 |
| Pyramid | 36.18 |
| Locate and Label | 30.33 |

On the tail, shared XLM-R has recall of 39.73 and precision of 71.80, producing the highest rare-class F1 at 51.16. Pyramid’s F1 of 36.18 leads the adapted specialists, with recall of 23.92. Second-best-learning, which leads on the head, has tail recall of 19.41 even though its tail precision is 79.05. For a reader interested in coverage, this is the central difference between its strong head result and its much weaker tail result. Its predictions on rare classes are frequently correct when it makes them, but the predictions cover relatively few of the target mentions.

The CRF provides another illustration of why the comparisons need both the frequency breakdown and the overall result. Its tail F1 of 42.15 is higher than the tail score of any of the adapted specialists, although its overall F1 is the lowest in the table. It also exceeds separate WangchanBERTa on the tail. An aggregate F1 ranking is therefore a poor substitute for inspecting the frequencies that matter to a particular use of the corpus.

Every system has lower recall than precision overall and within each frequency group. The authors interpret this as a tendency to miss more reference mentions than the number of incorrect mentions returned. The recall problem is especially acute in the tail. Even the shared XLM-R system, which obtains the highest tail recall, has much lower tail recall than precision. This pattern explains why the authors highlight recovering more of the scarce mentions as an important part of the benchmark challenge. It also shows that poor tail F1 is not interchangeable with a claim that rare predictions are mostly wrong.

#### Comparison with published English results

The authors place the Thai results alongside published results for the specialized systems on English corpora. The most direct illustration uses Pyramid, which has F1 of 94.68% on English NNE and 78.50% on Thai N-NER. The authors view NNE as the closest English comparison because the corpora are similar in size and in the breadth of their entity inventories. Other scores in their comparison come from ACE-2004, ACE-2005 and GENIA. Across the English results they assembled, the specialized approaches achieved higher scores than in the Thai experiments.

The comparison documents how published systems fare in the configurations available for those benchmarks. It also highlights that choosing a strong recognizer for one corpus does not settle which choice will work best in another. Pyramid leads the English NNE result reported for it. In the Thai comparison, it is behind Second-best-learning overall and behind both shared neural baselines. The paper notes that the adapted systems have different encoders from their English versions. For Locate and Label in particular, the changes to context and static representations make the Thai run a test of the full adaptation. Corpus composition, annotation choices and training conditions are also part of the comparison.

### What the ablations show

#### Sharing an encoder across depths

The paper offers paired configuration comparisons and diagnostic evaluations, while the specialized systems are compared as complete approaches. The closest comparison to an architectural ablation is between the separate and shared variants of each encoder. Both configurations keep a decoder for each annotation layer. The change is whether those decoders get representations from a common encoder or from encoders fitted independently to their own layers.

For WangchanBERTa, overall F1 is 78.94 with separate encoders and 79.70 with a shared encoder. Recall rises from 70.89 to 72.25, while precision goes from 89.04 to 88.87. The tail follows the same direction for recall, from 26.09 to 30.79, with F1 of 39.10 and 44.20, respectively. The body is an exception to the overall F1 pattern. Its F1 is 66.33 with separate encoders and 65.70 with a shared encoder. Sharing helps the aggregate comparison while separate encoders retain a slight edge in that group.

XLM-R shows the same overall direction. Its F1 is 78.48 in the separate configuration and 79.75 in the shared configuration. Overall recall is 70.56 in the separate case and 73.66 in the shared case. The tail shows the benefit particularly clearly. It has recall of 33.04 with separate encoders and 39.73 with a shared encoder. Precision on the tail moves from 75.42 to 71.80, so the extra coverage comes with less reliable predictions. The combined result is nevertheless higher F1, at 51.16 for shared XLM-R and 45.95 for its separate counterpart.

This comparison supports sharing as an effective choice among the settings the authors ran. One possible interpretation is that representations fitted across depths help a decoder whose own layer has fewer useful examples. The results do not identify which depths account for the improved recall, since the relevant tables report results by frequency group and overall. The checkpoint procedures also differ as described in the appendix. The paired scores show what happened with the two training configurations as implemented, without isolating every factor that could influence the difference.

The same table can be read as a comparison between Thai and multilingual encoders, provided the configuration is held in view. XLM-R leads the rare classes in both variants, and its shared variant narrowly leads overall. With separate encoders, WangchanBERTa has the higher overall F1, at 78.94 against 78.48. It also has the stronger body result in that configuration. The authors suggest that the multilingual results make cross-language work worth investigating. The comparisons establish the performance of the particular fine-tuned encoders on Thai data. They do not identify the language in which any useful representation was learned or show that a specific category was transferred from English.

#### Asking a broader labeling question

The paper also rescored WangchanBERTa–sh after mapping specific labels to their parent categories. This retains the span requirement and relaxes the type requirement. Suppose a span correctly identifies an organization, but the prediction and reference disagree about whether it is a government body or a political organization. Fine-grained evaluation counts that as a wrong prediction. If both specific categories map to organization, the broader evaluation can give credit for having found the right span and its general type. The comparison changes what success means while using the same system’s predictions.

Fine and broad label scoring for shared WangchanBERTa on the Thai N-NER test set Grouping specific labels under broad types raises F1 for the same recognizer.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Fine-grained scoring | 79.70 |
| Coarse-grained scoring (this paper) | 81.89 |

Under the broader scoring, overall precision is 91.30 and recall is 74.24. The fine-grained evaluation gives precision of 88.87 and recall of 72.25. The paper counts 1,160 mentions that become correct under the broader categories. This is evidence that some useful span detections fail the fine-grained evaluation because the subtype is wrong. It also shows why coarser scores can conceal errors that matter if an application really needs to distinguish a government department from a political party.

The effect varies across broad groups. In the organization group, F1 is 63.32 under fine-grained scoring and 70.04 after the conversion to broad tags. The date group yields 91.47 and 91.61 in the respective evaluations. A large improvement from collapsing labels in one group can coexist with a small improvement elsewhere. The result says something about where current predictions are already useful at a broad level. It does not estimate how a system trained exclusively with broad labels would behave, since that would change the supervision as well as the scoring.

The authors regard the increase in overall F1 as limited in size while acknowledging that fine distinctions account for a substantial set of mistakes. Both observations matter. The results do not support treating the size of the type inventory as the sole explanation for low scores. They do show that the detailed annotations reveal a real difference in how well the recognizer distinguishes subtypes. A broad label can be a satisfactory answer under one evaluation while leaving out the information the finer evaluation was designed to measure.

#### Where boundaries fail

In the breakdown accompanying the error analysis, the paper reports 47,923 predicted mentions and 5,334 incorrect predictions. Of the incorrect predictions, 3,103 have spans that fail to align with the reference annotation. These counts describe the errors among proposed mentions. A missed reference mention for which there is no relevant prediction is a different failure, reflected in recall. The boundary breakdown helps explain what goes wrong when the system finds something in the right area of the text but returns an extent that does not match.

The address example contains a building name, a floor, a road, administrative areas, a city and a postal code. The annotation treats the complete address as a single span of the address type. Recognizing the building or the city is useful at the relevant inner level, and a system can do so while still failing to identify the address as a whole. Truncating the address by a word is also enough to fail the exact-match test. The example gives a concrete reason to keep a boundary diagnosis distinct from a type diagnosis. A system can know which kind of expression it has encountered and still misjudge where that expression ends.

The evidence for boundary errors also matters when reading the coarse-label comparison. Collapsing subtypes can recover credit for a correct span with an overly specific typing mistake. The change cannot fix an address whose boundaries were cut short, since both evaluations require the reference span. The two analyses expose different sources of error. A broader category inventory answers one question about fine distinctions, while the exact-span analysis shows why improving type decisions alone would leave many failures in place.

#### Ambiguous strings and missing rare mentions

For context-dependent typing, the authors group expressions by how their labels are distributed in training. They use normalized class distribution entropy, where a low value indicates that an expression’s observed uses are concentrated in a category and a high value indicates that its uses are spread across categories. The paper gives the example of English as an expression that can name a language, indicate a national group or receive a location label according to context. Learning a frequent type for the string may work in some sentences but will fail when the context calls for another interpretation.

The authors place the training-derived entropy values in the intervals `[0, 0.33)`, `[0.33, 0.66)` and `[0.66, 1.0]`. A square bracket includes the endpoint and a parenthesis excludes it. They then measure errors on occurrences of those expressions in the test set. The reported average error rates are 23.43% in the lowest interval, 37.07% in the middle interval and 69.28% in the highest. This is an association between diversity of training labels for an expression and difficulty on test occurrences. It gives a more precise picture of ambiguity than a list of examples alone. It does not isolate ambiguity from other properties of the expressions in each interval.

For rare categories, the paper reports 1,380 tail prediction attempts in its diagnostic, of which 1,081 are correct, against 3,511 reference mentions. It cites rare classes such as food ingredients, vehicles, religious organizations and stations when discussing the absence of predictions for some classes. The counts show a coverage problem before any examination of subtle distinctions among labels. Even correct predictions among the attempted mentions leave many references unrecovered when the recognizer makes so few attempts. The grouped recall scores show the same problem across the full comparison.

The paper’s descriptions of these diagnostics warrant care in assigning them to a configuration. The main discussion introduces the error analysis with separate WangchanBERTa, while the caption of the span-error diagram identifies shared WangchanBERTa. The appendix explicitly identifies shared WangchanBERTa for the broad-label comparison and also names the shared variant in its discussion of a tendency to predict head classes. The span and tail counts are therefore best read as reported diagnostics, without assuming that every diagnostic uses the same configuration. The frequency-group table supplies the direct comparison when the distinction between separate and shared matters.

### Limitations

#### Limits the authors identify

The authors state that the resource covers central Thai. They explain the choice by pointing to its use in official settings and in Thai writing on the internet. The benchmark measures performance within that variety. Dialectal coverage is a separate question from the size of the corpus or the number of entity types. Even a system that performs well on the supplied texts has not thereby been evaluated on other Thai varieties.

The paper recognizes the cost of making distinctions among many fine-grained categories. Detailed annotation puts more decisions in the hands of annotators and creates more opportunities for inconsistency or mistakes. The guideline, training and successive rounds of review address that risk. The broad-label diagnostic shows that some of the distinctions remain difficult for a trained system. The authors also note that many categories are rare. An inventory can specify those categories clearly while still providing too few examples for a recognizer to learn when to use them.

The authors identify differences in pretrained encoders as a possible contributor to the gap between the Thai scores and the English results. This is particularly relevant for Locate and Label, whose original choice of encoder and representations could not simply be carried over. The shorter context and different embeddings in the adaptation are part of the test conditions. The conclusion justified by the comparison is that the tested adaptations leave room for improvement on Thai N-NER. Pinning the gap on a single component would require a comparison that held the other conditions steady.

#### Limits of the experimental setup

The source texts come from news and restaurant reviews, with many more news documents than reviews. This supports evaluation on a mixture of formal and colloquial text as sampled from those sources. The aggregate benchmark does not tell the reader how performance differs between the domains or whether training in one would support reliable prediction in the other. Some tags occur in both domains, and others can depend on the content a source tends to publish. A source-specific comparison would be needed to determine which part of the mixture drives a particular result.

Deep hierarchies are another case where the corpus design is broader than the evidence in the scores. The release accommodates a maximum of 8 layers, while test examples reach 6. The first three levels account for 99.2% of all mentions. Thus a system’s overall F1 can be useful evidence about the benchmark while saying little about its ability to recover very deep entities. There is also no reported evaluation of alternative systems under a split constructed expressly to test generalization to depths unseen in training. The maximum depth describes what occurs in the corpus and what its format supports.

The benchmark tests exact recovery of spans and types defined by the guideline. It does not directly measure whether an incomplete span remains usable in a downstream task, or whether correctly identifying both a university and its city improves an actual entity linking system. Similarly, a collection of correct span and type predictions is only part of what one might want to assess about a complete hierarchy. The metric described in the paper checks the span and type of a mention. It does not require a separate successful prediction of a parent–child relation for each scored mention. Scores are therefore best interpreted at the level of the annotated units the benchmark counts.

The annotation schema also limits what counts as a possible answer. The prohibition on crossing spans means that annotators choose among structures that fit a tree. That choice makes it possible to store the labels in parallel columns and aligns with the authors’ analysis of the examples they discuss. A comparison on this corpus cannot establish how approaches deal with crossing annotations in a scheme that does allow them. This is a limit of the phenomenon represented in the resource, separate from how accurately a system can reproduce the annotations that are represented.

The agreement figures come from eight sampled documents. They are a check on annotation consistency under the chosen representations. The paper does not report agreement for every class, for each depth or for the two domains separately. A strong overall kappa leaves those more specific questions open, particularly for rare types that may occur infrequently in the sample. The difference between the CoNLL and Pyramidal values also makes the scoring representation part of the interpretation. A comparison at the token and depth level pays attention to disagreements that a candidate-span comparison counts differently.

Finally, the reported F1 values are point estimates for the experimental setups. The table gives shared XLM-R the highest overall F1, followed closely by shared WangchanBERTa and Second-best-learning. The paper does not give repeated-run variation or uncertainty estimates alongside those scores. The numerical ordering describes the reported test runs. The broader observation that simple shared encoders performed competitively is less dependent on how those close scores are ordered. The tail breakdown is valuable for a different reason. It shows an extensive coverage problem across configurations, including those that rank highest overall.

### What came after

[Malaysian English News Decoded](https://md.research.elamur.ai/free/en/papers/chanthran-2024-malaysian-english-news-decoded-linguistic/) (2024) cites Thai N-NER in work on a linguistic resource for named entity and relation extraction in Malaysian English news. The two projects share an emphasis on creating annotated data for a particular language setting. They differ in the scope indicated by their research questions. Thai N-NER uses news and reviews to investigate the spans and types that occur within larger entity mentions. The later work’s title identifies news as its source domain and includes relation extraction alongside named entities.

The connection is clearest at the level of corpus research. Thai N-NER makes decisions about what annotators should mark, how to represent a span and how to evaluate its recovery explicit for a Thai benchmark. The later citation places that contribution among the resources relevant to studying entities in Malaysian English news. The citation establishes that connection. Whether the later project adopted the Thai corpus’s nesting rules, label inventory, segmentation approach or recognition baselines is unspecified.

## Cite

Cite as Weerayut Buaphet, Can Udomcharoenchaikit, Peerat Limkonchotiwat, Attapol Rutherford and Sarana Nutanong. 2022. Thai Nested Named Entity Recognition Corpus. Findings of the Association for Computational Linguistics: ACL 2022.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2022.findings-acl.116](https://doi.org/10.18653/v1/2022.findings-acl.116)

```bibtex
@inproceedings{buaphet2022thai,
  title = {{Thai Nested Named Entity Recognition Corpus}},
  author = {Weerayut Buaphet, Can Udomcharoenchaikit, Peerat Limkonchotiwat, Attapol Rutherford and Sarana Nutanong},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2022},
  year = {2022},
  doi = {10.18653/v1/2022.findings-acl.116},
  url = {https://doi.org/10.18653/v1/2022.findings-acl.116}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
