Thai Nested Named Entity Recognition Corpus
Paper · 2022 · Weerayut Buaphet, Can Udomcharoenchaikit, Peerat Limkonchotiwat et al.
Summary
The name of a university can tell you which institution a sentence is about and supply a place name that helps identify it. In Chiang Mai University, the institution takes up the full phrase, while Chiang Mai is a place named within it. The same principle applies when a person’s full name includes a title or when an event name contains a date. Thai N-NER, which Buaphet and colleagues introduce, is the first corpus in Thai created to document these embedded mentions. It lets researchers test whether a system can identify a complete expression and give the parts their own boundaries and types. This extends the usual task of named entity recognition.
The collection has 4,894 documents from news and restaurant reviews, with 264,798 labeled occurrences. Its 104 classes fall into 10 broad groups. Though the deepest example reaches 8 layers, most annotations are in the outermost layers. Building the corpus required a practical decision about Thai writing, where spaces are an unreliable guide to word divisions. An automatic word splitter can hide the boundary between a title and the name that follows it by putting parts of both in the same unit. The annotators worked with shorter selectable units obtained through syllable segmentation. The authors then used the annotated boundaries when preparing the word-level release.
The benchmark requires a prediction to get the full extent of an expression and its type right. The highest overall test F1 is 79.75 for a baseline that shares an XLM-R encoder and gives each depth its own tagging output. Second-best-learning, the strongest of the adapted methods built specifically for nested recognition, obtains 79.43. The scores show that independent outputs for the different depths, supplied with a shared representation of the text, can compete with more elaborate ways to recover nested spans.
Performance is much weaker for infrequent types. Shared XLM-R scores 84.31 F1 on the most frequent group and 51.16 on the least frequent group. Low recall shows that the systems leave many rare mentions unidentified. The error analysis also finds predictions that stop at the wrong place and labels that fail to distinguish between context-dependent readings of the same expression. The corpus was released as scb-nner-th-2022. The authors also make the annotation guidance, experimental code and trained weights available.
Deep dive: Thai Nested Named Entity Recognition Corpus
Thai N-NER records names and their parts in Thai text and tests how well recognition systems recover exact spans, especially for rare types. · about 32 minutes to read
The problem and its context
What can a single stretch of text tell us?
A mention is an occurrence in a text. Its span is the stretch of writing from its start to its end, and its type describes what the expression refers to there. If the same institution is named again later in an article, that later occurrence has its own span. At the level of an individual mention, recognition therefore involves a boundary decision and a classification decision. Nesting adds the possibility that material within the selected span has an identifiable meaning of its own and warrants another annotation.
The paper’s university example makes the distinction concrete. A reader can pick out the name of an organization and, within the same material, recognize Chiang Mai as a location. In a flat representation, once the words have been assigned to the university span, the city cannot also occupy those positions as a separately labeled span. A nested representation can preserve both. If a later process needs to find a connection between the institution and the city, it can use the location mention as evidence. The task in the paper ends with recovering the typed mentions. Connecting an occurrence to the correct record for a real institution or place would be a further step.
The same concern applies when the outer expression and its parts convey different kinds of information. A date can be useful as a complete expression, and its constituent fields can also be useful separately. The day and month can then be distinguished by their functions within the date. In the authors’ account, giving systems access to such information motivates work on nested recognition. They situate the task within information extraction and describe entity information as useful for question answering and knowledge graphs.
The paper also points to earlier work that used entities when constructing representations of text and found benefits on downstream tasks. That work provides a reason for caring about the information supplied by a recognizer. The contribution here concerns the data needed to learn and assess recognition in Thai, with enough detail to see what is lost if a system returns only the broadest expressions. The earlier example of incorporating entity information into the representation is LUKE.
Nesting and category detail solve different problems. An annotation that says an institution contains a location gives a structural description. A classification that distinguishes a city from other kinds of location supplies greater specificity. Either choice can be made without the other. The authors want the corpus to capture both, so that the annotation of an outer mention can coexist with more informative labels for recognizable material inside it. This makes the corpus useful for asking whether a system understands the general kind of expression it encounters and whether it can recover the distinctions the annotation makes within that kind.
The resources that preceded it
The paper describes a field in which the available English corpora covered substantially different kinds of text and annotation. The early ACE collections supplied nested examples. ACE-2005 contained 30,966 entity mentions and used 7 broad entity types. It also supported work on relations and events. GENIA supplied an example from a specialized domain, with 92,681 mentions of entities in 2,000 abstracts. Even when both collections can be used to study nesting, the entities that matter in biomedical writing and the distinctions made in a broad extraction benchmark lead to different recognition tasks.
The closest example for the Thai project was a large English newswire corpus with 114 classes. The Thai paper illustrates its approach with a calendar expression whose complete span is recorded as a date. The day, month and year then have separate annotations. The example shows how a corpus can keep an everyday category like date while distinguishing the different pieces a recognizer would need to extract from it. That degree of detail, in addition to the size of the corpus, made it the main point of comparison for Thai N-NER and a source of ideas for the guideline. The English resource is NNE.
The earlier work on German illustrates a concern with how annotation quality is obtained. NoSta-D had 41,005 mentions and drew its text from Wikipedia and online news. The authors describe it as an effort to produce reliable German labels with native-speaking annotators. They relate that choice to reported inconsistencies in the German portion of an earlier benchmark, which had been annotated by people who were not native speakers. The earlier benchmark they discuss is the CoNLL-2003 shared task.
The Vietnamese and Danish resources addressed other aspects of the problem. VLSP–2018 offered a shared evaluation for Vietnamese with 35,817 mentions and 3 entity types. The Danish DAN+ corpus gave researchers data from multiple domains and was used to investigate transfer between languages and changes in performance when the domain shifts. It contained 6,425 mentions and used 4 classes. These examples establish that nested annotation was already useful beyond English. The Thai authors emphasize the shortage of resources outside English at a scale and level of detail near that of NNE.
In Thai, the public corpora the authors identify used flat annotation with broad types. They could supply examples for recognizing a person or an organization at a single level. Training a system to find titles or other inner mentions requires labels for those occurrences, and evaluation requires a reference against which to check them. A missing annotation in a flat corpus may simply reflect the scope of its guideline. It is therefore impossible to tell from such a corpus how often the recognizer finds the pieces that Thai N-NER is intended to capture.
The recognition methods themselves were already varied. Some research explored ways of expressing nested structures as sequences, as in Nested NER through Linearization. Other approaches discussed by the authors recover spans from the outside inward or construct representations at several levels. What the field lacked was a Thai test of these choices against detailed human annotations. Making that test possible required agreement on the text units people could select, on the structures they could mark, and on the information a tag should convey.
The method, step by step
Giving annotators boundaries they can select
The collection starts with 4,396 Prachathai articles and 498 Wongnai restaurant reviews. Prachathai supplies news writing, and Wongnai supplies reviews contributed by users of the platform. Together they give the project formal and colloquial material. Both sources go through the same annotation scheme. A mention in a review and a mention in an article must each be located in the text, interpreted in context and assigned a type.
A practical difficulty arises before any of those choices can be made. In Thai, a reader can recognize where one word ends and another begins even when there is no separating space. An annotation interface that lets people highlight complete words has to obtain those divisions somehow. If a word segmenter guesses wrongly, the interface can make the correct name boundary unavailable. This is particularly relevant to names or name components that contain unfamiliar words, where the automatic procedure is liable to make the very error that would prevent the annotator from marking the expression.
Working directly with characters gives the annotator finer control, with a selection point at each character boundary. The authors argue that such a large set of choices makes highlighting more error-prone. Manual word segmentation would add work before the entity labeling could begin. They use automatic syllable segmentation as an intermediate step. Prior work cited in the paper supports using syllables to address uncertain word divisions. The authors explain that the orthographic rules give a strong basis for finding selectable units automatically when the text has few typos. The procedure changes the set of boundaries offered during linguistic annotation.
An appendix example involves นาย, a title before a personal name. In the syllable-segmented version, the pieces นา and ย are both selectable, so the annotator can include them together and stop at the end of the title. In the word-segmented version used to illustrate the problem, the second piece has been joined to part of the following name. Selecting that complete unit would include unwanted text, and leaving it out would give an incomplete title. The skill of the annotator cannot compensate for a missing selection point in an interface that works with whole units. The syllable analysis is useful even though it offers the title in pieces.
The annotators’ selection points carry forward into the release. The authors use PyThaiNLP’s maximal matching tokenizer to propose word divisions, then combine its output with the chosen entity boundaries. The word rows can consequently express the span the annotator selected even if the automatic word division alone would have put an endpoint inside a word unit. Human annotation and the release impose different requirements on tokenization.
From source documents to the Thai N-NER benchmark
The steps in order.
Building a hierarchy from individual decisions
The guideline adapted from NNE tells annotators what kinds of expressions to look for and how to place them inside one another. Start with the largest mention, which occupies the outer layer. If a component of that expression qualifies for its own label, it can be marked at a deeper layer. Each such span must fit within a span above it. Spans at a given depth must occupy disjoint portions of the text. Together, the containment relationships give a complex mention the shape of a tree, with the full expression at the root.
The guideline distinguishes a broad type from the place that type occupies in the tree. A broad type can occur at any depth. A finer label belongs under the broader mention appropriate to it. In the person example, the full designation for Police Colonel Prawet Munpramuk receives the person label. The rank is separately marked as a title, Prawet as a given name, and Munpramuk as a surname. Each annotation covers the part that performs that function. The name including the rank can then be recovered in full, and the component labels describe the roles of material inside it.
In the committee example, the enclosing mention identifies a position, the committee president. Part of its wording identifies a political organization, and the organization’s name contains the designation of an event. Within the event are expressions for a duration and a date. The day and month appear deeper still as parts of the date expression. Placing the date deep in this example leaves its broad type intact. The label describes the expression, while its placement tells the reader how that occurrence fits into the larger designation.
The tree constraint also gives annotators a way to rule out certain apparently plausible selections. The authors consider a deputy spokesperson’s title that includes the name of the Office of the Prime Minister. They describe a proposed inner role span that stops within the office name, alongside an inner government span that includes the whole office name. These selections would share some words at the same depth. The structure would lack a clean division into children of the outer title. The authors also object to the interpretation produced by cutting off the proposed role span there, since it would leave the word for minister outside the phrase to which it belongs. Their example ties a structural restriction to an analysis of what the words mean together.
There is a separate decision about when a string deserves a label at all. For instance, the authors present uses of ทหารไทย in two contexts. In the sentence about an arrest, it describes a soldier, so the whole expression is left without a named entity label. In the sentence where the military orders people to stay inside, it refers to the institution. The guideline treats that use as a named entity. An annotator therefore has to resolve what the writer is referring to, even when the spelling looks like a familiar institutional designation. Such cases accompany the type definitions so that the team has examples of the contextual decisions the rules require.
Finding and correcting annotation errors
The project used 47 annotators with linguistic training. They passed an assessment of their understanding of the guideline and could discuss difficult cases with each other and the project manager. The Datasaur interface let them highlight a sequence of the supplied syllable units and associate the selection with an entity type. The annotations therefore came from human decisions within a common set of type definitions and span rules.
The first verification pass combined random manual inspection with a recognizer used to surface further cases. The authors trained a conditional random field, abbreviated CRF, using the outer annotation layer. A CRF is used here as a sequence tagger, assigning labels across the units of a text. When its output and an annotation differed, the case could be examined for a possible labeling problem. Looking at those cases together with the manual review helped the team identify recurrent problems, including inconsistent applications of a tag, mistaken types and violations of the guideline. The authors sent the cases back to the annotators to evaluate again.
After the first revisions, a rule-based check flagged documents containing overlap that the guideline prohibited. This check addresses the geometry of the spans, which can be inspected even before someone determines whether the labels describe the entities accurately. A gazetteer, or list of names, provided a further way to flag suspect type assignments. The resulting lists gave the annotators specific documents and labels to correct. A candidate flagged by such a check still required attention to the actual use of the expression in its sentence.
Following the next revisions, the authors trained the nested recognizer of Shibuya and Hovy as a further check. It served both to see whether the annotations could support nested training and to collect a new set of errors for inspection. The authors report 75.44% F1 for its test during the verification process. This score concerns an intermediate quality check. The comparative evaluation of the final benchmark reports its own results.
The verification account describes reserving 20% for testing against an 80% remainder. The test documents were labeled again by two annotators, with a third resolving their disagreements. The final benchmark is reported with distinct training and development portions as well as the test set. The reannotation and adjudication give the reference test data a further verification step beyond the rounds of correction applied during construction.
What agreement means in a layered corpus
The authors measured agreement on eight sampled documents with 2,922 tokens. Their measure was Cohen’s kappa, which takes into account the agreement expected by chance under the labeling scheme. Because a nested annotation can be represented in more than one way, the authors asked what agreement looked like with different comparison units. The resulting scores describe reliability under those conventions.
Under CoNLL scoring for agreement, an annotator’s decision on a token is compared with the other annotator’s decision at the same depth. A single disputed mention can affect several comparisons if it covers a long span. A pair of otherwise matching mentions can also produce disagreement when the annotators placed them at different depths. The reported kappa with this representation is 0.79. That figure reflects agreement about the distribution of labels across token positions and columns.
The alternative is called Pyramidal. The process enumerates contiguous candidate spans and groups them by length. Each candidate is then compared across annotations as a unit. A disagreement about a mention contributes once even if the disputed span contains several tokens. The authors report 0.85 with the token version and say that a comparison at the character level yielded the same score on their sample. The candidate length used to organize this comparison has a different purpose from the annotation depth in the tree. In the CoNLL convention a column identifies a level of containment, while the Pyramidal convention aligns candidates through the text they occupy.
Encoding the finished annotations
In the word-level CoNLL file, each row contains a word token followed by annotation columns for the possible depths. The tags use BIOES, a compact way of indicating a token’s position in a mention. B marks the beginning of a span, I an interior position, and E its end. S designates a complete span occupying one token, and O marks a token outside any mention at that depth. When a token belongs to a mention, its tag also identifies the type. Separate columns allow the same token to start one mention while continuing another.
For example, material describing a duration can occur as part of an event name inside a larger role designation. A token can therefore have a tag for its position in the duration, a separate tag for the event and another for the role. Reading down a column yields the spans at a particular depth. Reading across a row shows the different roles the token has in the complete annotation. An underscore represents an original space, so those spaces can be recovered from the word-level representation.
Turning annotation columns into recognition tasks
The simplest comparison system fits a separate CRF to each layer and merges the resulting predictions. It uses IOB tags. These encode beginnings and interiors along with positions outside mentions, with fewer boundary distinctions than the released BIOES convention. The authors chose the smaller tag scheme because training with the extended scheme would take longer with so many classes. The CRF provides a baseline for what can be recovered when the same general tagging procedure is applied independently at successive depths.
The other baselines separate representation from prediction. An encoder takes the text and represents it in context. A fully connected linear output layer uses those representations to assign tags. The authors compare a Thai encoder, WangchanBERTa, with the multilingual XLM-RoBERTa, called XLM-R in the results. In both cases the pretrained encoder is adapted to Thai N-NER using the annotated data. This training stage is fine-tuning.
The separate configuration, marked sp, gives every depth a full encoder and its own output layer. Training on one layer’s labels updates the encoder assigned to that layer. The shared configuration, marked sh, uses a single encoder to supply all the depth-specific output layers. The output for an inner layer still has its own tag decisions to make. Its input representation, however, has been fitted in a setup that also supports the other layers. Neither configuration needs to find the outer span first in order to run the inner output layer. The gold annotations tell each output where its own layer’s mentions occur during training.
For these neural baselines, the authors use Adam and begin at a learning rate of 1e-5. The learning rate scales the updates made during training. The appendix describes multiplying it by a fixed factor on a schedule. Written as an update, the rule is:
ηafter = 0.1 × ηbefore
Here ηafter is the learning rate after a scheduled update and ηbefore is the rate immediately before it. The equality sign sets the new value, × means multiplication, and 0.1 is the decay factor. The update takes place every 50 epochs, where an epoch is a pass through the training data. The cap is 500 epochs, with early stopping if performance fails to improve for 16 epochs. The appendix says the shared variants use the last checkpoint for evaluation. It describes the separate variants’ selected epoch in terms of when training ceases to improve.
Adapting recognizers that use nesting directly
The comparison also includes existing approaches the authors selected for their strong English results and accessible implementations. Second-best-learning recursively decodes spans from the outside inward. Once an outer span has been found, the procedure can look within it for inner spans. Pyramid builds hierarchical representations with pyramid and inverse pyramid mechanisms, using representations associated with different span lengths. That organization differs from the depth columns of the baseline. A long span can be deeply embedded in a still longer mention, while a short span can be a mention all on its own.
The remaining approach separates the boundary decision from the type decision. It first locates spans, then predicts their labels. Here the authors can compare a procedure built around explicit span detection with the baselines’ assignment of position tags to individual tokens. The specialist is Locate and Label.
For all of the specialized approaches, the Thai experiments replace the original encoder with WangchanBERTa. The authors use configurations for GENIA as the starting point for the parameters, so they can check their setup by reproducing earlier results on GENIA. Locate and Label requires further changes. WangchanBERTa has a shorter sequence limit than the BERT-large encoder used in the original work. The Thai adaptation therefore takes only ten words from each neighboring sentence when adding context.
Locate and Label also uses static word representations, which supply a representation tied to the word itself alongside the contextual information from the encoder. For the Thai adaptation, the authors take these static representations from thai2fit. It was trained on Thai sentiment data, Prachathai material and Thai Wikipedia. This replaces the original use of GloVe. Thus the Thai run preserves the separate span and type stages while changing several of the inputs on which those stages depend.
Experiments and results
The splits and the distribution of mentions
The corpus has 1,272,381 tokens. The benchmark allocates 60% of the documents to training, 20% to development and 20% to testing. The training split contains 2,935 documents, 763,421 tokens and 155,353 mentions. The development split contains 979 documents, 256,553 tokens and 50,501 mentions. The test split contains 980 documents, 252,407 tokens and 58,944 mentions. All 104 types occur in training and test, with 101 represented in development. The tail evaluation therefore concerns categories for which the training split offers some supervision, even when the available examples are scarce.
The counts by layer show how frequently the benchmark calls for nesting. Across the full corpus, the outer layer has 125,180 mentions. Of those, 67,168 have nested structure and 58,012 do not. The second layer accounts for 120,909 mentions, and the third for 16,500. The authors report that those first layers together contain 99.2% of all mentions. The layers below them account for 2,209 mentions, or 0.8%. The deepest training example reaches 7 layers, the deepest development example reaches 8, and the test set reaches 6. This distribution gives the benchmark substantial evidence about mentions within other mentions, with success at the deepest levels contributing relatively little to an aggregate score.
Counts for individual types vary more widely than the size of the label inventory suggests. Before the corpus is split, the count for the cardinal-number type is 30,457, and the count for people is 16,358. The station type has 115 mentions, latitude has 8, and concert has 2. These are counts over the entire resource, including mentions inside other annotations. An annotator has a rule for identifying a station or a concert even where the recognizer has little training evidence for how that rule applies.
For the grouped evaluation, the authors rank classes by their frequencies in the training split. The head comprises the classes responsible for 80% of the training mentions. The body accounts for 15%, and the tail accounts for 5%. The body and tail together contain 84 of the 104 classes. Their combined share of the training mentions is 20%. The test results for these groups answer a question about how well the systems recognize types they had different opportunities to learn. A mention’s depth in a tree plays no part in putting its type in one of these groups.
What counts as a recovered entity
The unit of evaluation is a typed span. A prediction is a true positive when its beginning, ending and type agree with the reference. A mistaken extent or type produces an incorrect prediction and can leave the reference mention unrecovered. Suppose the text includes a complete address and the system stops before the final part. The output can identify the general kind of expression and much of its text, yet under the benchmark’s rule it has missed the full address. If it recovers some of the inner mentions correctly, those are scored on their own.
Precision asks how many of the returned mentions match a reference. Recall asks how many of the reference mentions have been recovered. F1 combines precision and recall as their harmonic mean, so a weak result on one curbs the combined score. The authors report all of these measurements on the test set, both across the full type inventory and within each group defined by training frequency. This allows the overall comparison to show the balance of errors and omissions, and the grouped comparison to show where that balance changes.
Overall performance on Thai
Overall F1 on the Thai N-NER test set
The shared XLM-R baseline has the highest F1, with shared WangchanBERTa and Second-best-learning close behind.
The numbers
| System or setting | F1 |
|---|---|
| CRF by layer | 70.61 |
| Separate WangchanBERTa | 78.94 |
| Shared WangchanBERTa | 79.70 |
| Separate XLM-R | 78.48 |
| Shared XLM-R (this paper) | 79.75 |
| Second-best-learning | 79.43 |
| Pyramid | 78.50 |
| Locate and Label | 74.06 |
The CRF reaches 70.61 overall F1, with precision of 84.60 and recall of 60.59. Each encoder-based entry has higher overall recall. The leading XLM-R configuration gives 86.93 precision and 73.66 recall. The shared WangchanBERTa baseline gives 88.87 precision and 72.25 recall. These closely placed systems make different errors in aggregate. Of the outputs returned, the proportion of exact matches is higher for shared WangchanBERTa. A larger share of the reference occurrences is recovered by shared XLM-R.
Second-best-learning has the strongest overall result among the adapted specialists. Its 79.43 F1 combines precision of 86.41 and recall of 73.49. Pyramid reaches 78.50 F1 with precision of 85.65 and recall of 72.45. Locate and Label has recall of 72.61, similar to the Pyramid result on that measure, and precision of 75.57. Its lower overall F1 is associated particularly with the accuracy of the spans and types it returns. Recall by itself would place it differently in the comparison.
What is striking about the comparison is the level of performance obtainable by tagging each depth separately once the text representations are available. The shared baselines achieve scores close to or ahead of a recursive procedure that specifically exploits nesting. The main table ranks the configurations as they were adapted and trained. It gives researchers simple competitive points of comparison for this corpus and makes it possible to ask whether a more elaborate procedure improves on the cases those baselines find difficult.
How the ranking changes with frequency
The head results favor Second-best-learning, which has 84.58 F1 and 81.78 recall on these frequent types. Shared WangchanBERTa gives 84.50 F1, with 90.51 precision and 79.24 recall. Separate WangchanBERTa obtains the highest head precision at 90.70, while its head recall is 77.66. Several systems reach similar head F1 values by returning predictions with different balances of coverage and reliability. The architecture at the top of the overall table does not lead on every such measure. Shared XLM-R has head F1 of 84.31.
On the body group, separate WangchanBERTa has the highest F1 at 66.33. Its body precision is 81.55 and its recall is 55.90. Shared XLM-R gives the nearby result of 66.31 F1, with 77.29 precision and 58.06 recall. Second-best-learning is the strongest specialist on this group at 65.12 F1. The head leader is still competitive here, but the relative standing of the baselines changes. Body performance supplies evidence about a large part of the label inventory that appears relatively infrequently in training.
Tail-class F1 on the Thai N-NER test set
Shared XLM-R leads this group, and Pyramid leads among the adapted specialists.
The numbers
| System or setting | F1 |
|---|---|
| CRF by layer | 42.15 |
| Separate WangchanBERTa | 39.10 |
| Shared WangchanBERTa | 44.20 |
| Separate XLM-R | 45.95 |
| Shared XLM-R (this paper) | 51.16 |
| Second-best-learning | 31.16 |
| Pyramid | 36.18 |
| Locate and Label | 30.33 |
Shared XLM-R gives 39.73 recall and 71.80 precision on the tail. Its recall is the highest on that group, and even this system recovers substantially fewer of the tail references than its precision figure on returned mentions might suggest. Second-best-learning illustrates the distinction from the other direction. Its tail precision is 79.05, yet its recall is 19.41. The predictions it makes for rare classes are often correct, while the large number of rare occurrences left uncovered pulls its F1 down to 31.16.
Pyramid produces the highest tail F1 of the specialists, with recall of 23.92. The independently trained CRFs score above the specialized systems on tail F1, even though the CRF ranks last overall. That reversal makes the group scores important when selecting a comparison system for work on rare types. The aggregate is heavily influenced by the examples that occur most often. A system can do relatively well on the rarer classes and gain little in the overall ordering if its frequent-class performance is weaker.
Every configuration loses F1 between the head and the tail, and in the tail precision exceeds recall for all of them. The authors associate the pattern with too many missed mentions. The same imbalance between precision and recall holds overall, although the table has an exception within the head: Locate and Label has 77.60 head precision and 80.38 head recall. The most consistent evidence for a coverage problem comes from the tail comparisons. Improving recognition there means finding more correct occurrences of hard-to-learn types as well as typing the ones already proposed accurately.
The comparison with English benchmarks
To see how the adaptations compare with earlier results, the authors assemble scores from the original studies on English. Pyramid’s F1 on English NNE is 94.68%, while the Thai result is 78.50%. NNE is the closest English reference in the paper because of the scale and detail of its annotation. It provides a more pertinent comparison than a corpus chosen solely because it also permits nesting. Even so, each result reflects a different collection of texts and a particular implementation of the approach.
The appendix also reports English evaluations on ACE-2004, ACE-2005 and GENIA. For example, Locate and Label has 86.67 F1 on ACE-2005 and 80.54 on GENIA, against 74.06 in the Thai comparison. The published English scores help explain why the authors regarded it as a strong option to adapt. Its Thai score describes the configuration that could be run with the substitutions for the encoder, static word representations and neighboring context. The cross-benchmark comparison shows how much harder the task proved for these implementations under the Thai conditions. It combines changes in training resources, annotation targets and system inputs.
What the ablations show
Sharing the encoder while keeping outputs specific to depth
The paired baseline configurations provide the closest comparison of an architectural choice. Each configuration retains a dedicated tagging output at every annotation layer. In one configuration, the encoder is trained for that output alone. In the other, a shared encoder supplies representations to all the outputs. This tests whether the approach benefits from fitting a common representation of Thai text for several annotation depths.
With WangchanBERTa, the overall F1 is 78.94 in the separate configuration and 79.70 in the shared one. The gain accompanies higher overall recall, from 70.89 to 72.25. Overall precision moves from 89.04 to 88.87. Tail F1 is also higher with sharing, at 44.20 compared with 39.10 for the separate configuration. In the body, the ordering goes the other way. The separate variant achieves 66.33 F1 and the shared variant achieves 65.70. The evidence favors sharing for this encoder on the complete test set and on tail F1, with different outcomes in the middle of the frequency distribution.
With XLM-R, overall F1 is 78.48 for the separate variant and 79.75 for the shared variant. Overall recall increases from 70.56 to 73.66. On the tail, recall is 33.04 with separate encoders and 39.73 with the shared encoder. Tail precision falls from 75.42 to 71.80. Tail F1 consequently reflects a different balance, reaching 51.16 with sharing and 45.95 without it. The recall figures establish that the shared version recovers more annotated rare mentions. The precision figures show that the larger share of recoveries comes with a lower proportion of correct outputs among those returned.
These results are consistent with a representation benefiting from exposure to more than one annotation layer. The experiment reports the net effect of training the configurations as implemented. The checkpoint procedures described for the shared and separate cases differ, and the paper’s performance breakdown groups mentions by class frequency rather than by depth. The comparison therefore leaves open which depth-specific outputs benefit most, and whether gains come from training signals at a particular layer. A rare type and a deeply nested type need not be the same kind of challenge.
The table also gives a way to look at the contribution of the encoder choice within each configuration. With separate encoders, WangchanBERTa has higher F1 overall, while XLM-R has higher tail F1. With a shared encoder, XLM-R narrowly leads overall and has a clearer lead on the tail. This pattern supports the authors’ interest in multilingual recognition, while linking the empirical comparison to the particular encoders fine-tuned on Thai. There is no transfer experiment tracing the recognition of a specific Thai type to knowledge learned from a particular other language.
Rescoring the same spans with broader labels
The authors investigate the cost of fine distinctions by mapping detailed types to their broader categories and evaluating shared WangchanBERTa again. This is a change to the scoring target. The span still has to match, but the prediction can receive credit when the original type and its reference belong to the same broad group. A prediction that correctly identifies the words of an organization while confusing a political group with a government entity can then count as a recognized organization.
Overall test F1 for shared WangchanBERTa under fine and coarse Thai N-NER scoring
The same predictions receive higher F1 when the type comparison uses broad categories.
The numbers
| System or setting | F1 |
|---|---|
| Fine-grained evaluation | 79.70 |
| Coarse-grained evaluation (this paper) | 81.89 |
With broad types, overall precision is 91.30 and recall is 74.24. The fine-label figures are 88.87 and 72.25, respectively. The error analysis reports 1,160 mentions that would be correct under the broad evaluation. These are cases where the system recovered boundaries that were usable for the more general description. The subtype decision matters to a user who needs to distinguish government departments from political parties or advocacy groups. For a task that needs only to flag organizations, the broader result is informative about what the same outputs can supply.
The effect differs markedly across the groups reported in the appendix. For organizations, fine-grained F1 is 63.32 and coarse-grained F1 is 70.04. For dates, the corresponding scores are 91.47 and 91.61. This means the total change combines groups where the broader scoring rule gives appreciable extra credit with groups where it gives little. The result is evidence about the subtype errors already present in the outputs. Training a recognizer with broad labels from the outset would change the information available during learning, which the rescoring experiment holds fixed.
The authors regard the overall difference as small enough to show that fine labels are usable, in spite of the additional mistakes they expose. Span selection and omissions still matter under the looser type criterion. A system that leaves an entire mention unreported, or places its boundary incorrectly, cannot gain credit for it merely because its broad category would be easier to infer. The two scoring settings give complementary views of the information the recognizer recovered.
Misplaced boundaries and context-dependent types
The span-error analysis counts 47,923 predictions, of which 5,334 are wrong. It attributes 3,103 of those incorrect predictions to spans that fail to align with the reference. These counts concern returned mentions. Recall also reflects omissions for which no matching span was proposed. The distinction matters when trying to read a diagnosis from an error total. Fixing the endpoint of a returned span and finding another span that the system has skipped are different problems.
The long address in the appendix demonstrates how demanding the exact boundary can be. It takes in a building, the floor, a road, a subdistrict and district, Bangkok, and a postal code. The address has a span for the complete expression. If a prediction stops at Bangkok, it leaves some of the address outside the span. Correct identification of an inner component can still be credited independently. An end boundary misplaced by a word is sufficient to lose the address match, even if the predicted type is address. This explains why the authors study span alignment separately from grading the labels more broadly.
The ambiguity analysis starts with the distribution of types for the same written expression in training. The authors use normalized class distribution entropy to characterize how widely its observed labels are spread. In this use, low entropy means the training occurrences are concentrated in a particular type. High entropy means the expression has been used across a broader range of types. The paper gives English as an example of an expression that can be labeled for a language, nationality or location, depending on the context. A tendency to select its most familiar reading can produce errors on uses with another meaning.
The authors put the training-derived entropy values into [0, 0.33), [0.33, 0.66) and [0.66, 1.0]. The square bracket includes an endpoint and the parenthesis excludes it. They then examine errors on mentions in the test set from each group. The respective average error rates are 23.43%, 37.07% and 69.28%. The comparison links greater diversity of observed types in training to a higher test error rate. The expressions in these bins may also differ in frequency, length or the types of context they occur in. The analysis measures the association available in the corpus.
When the recognizer proposes too little
The paper gives a separate tally for rare types. It reports 1,380 tail predictions in the error analysis, with 1,081 correct, against 3,511 references. Those counts illustrate a shortfall in the number of proposed occurrences. Even a high proportion of correct outputs among the attempts can leave a large share of reference mentions without a match. The authors discuss classes such as food ingredients, vehicles, religious organizations and stations as examples of types for which some systems produce no predictions.
Attribution of the diagnostic counts requires care. The main error-analysis prose introduces separate WangchanBERTa, while the caption of the span-error figure names the shared variant. The broader-label table explicitly identifies shared WangchanBERTa. The frequency table names the separate and shared runs individually and supplies directly comparable results for them. The diagnostic counts characterize the failure patterns the authors found, with an uncertain assignment of some counts to a specific WangchanBERTa configuration. Across the explicitly labeled tail results, the coverage shortfall is visible regardless of that attribution.
Limitations
Limits identified by the authors
The paper states that the corpus covers central Thai. The authors describe this variety as widely understood and used in official settings and online writing. The dialect restriction still matters to the scope of the benchmark. Its results characterize recognition in the sampled central Thai texts. They leave recognition in other Thai varieties open, including whether the same guidelines and resources would support annotators and recognizers working with them.
The authors also recognize a tradeoff in the granularity of the guideline. More detailed classes give the corpus a way to encode useful distinctions, while requiring annotators to resolve more borderline cases. The review process can improve consistency and remove rule violations. It cannot increase the natural frequency with which the source documents present some of the types. The reported tail results identify sparse supervision as a difficulty, and the authors’ example of closely related organization types shows that distinguishing fine categories remains difficult even when a span has been found.
In discussing the Thai and English results, the authors identify the available pretrained encoders as a possible contributor to the gap. This matters particularly for Locate and Label, where the original English configuration has a different encoder and can receive more neighboring context. The paper’s Thai adaptation also uses different static representations. The observed score is the result of running that adaptation on this corpus. The experiment supplies no matched comparison that independently varies the encoder, the context window or the embedding source.
Limits that follow from the setup
The text selection covers particular sources within the news and restaurant review domains, with substantially more news articles than reviews. An overall score on that mixture describes performance across the sources as sampled. The paper gives no separate recognition results for news and reviews, so the effect of changing from formal to colloquial writing cannot be read from the aggregate. The setup also leaves open how a recognizer trained on one of the sources would do when evaluated specifically on the other.
The corpus’s maximum depth describes an annotation that occurs in development. The test set is shallower and contains few mentions at its deepest levels. A high overall score is consequently compatible with several different levels of performance far inside a hierarchy. The paper gives no per-depth breakdown of recognition scores that could distinguish those possibilities. The relevant evidence for the deepest spans is much thinner than the evidence for the outer layers and their immediate contents.
The annotation rules determine what kinds of structures the benchmark can examine. Containment supports the tree representation, and crossing annotations are excluded. The benchmark also checks exact mention spans and types without separately scoring parent–child links. A collection of correct mentions can therefore provide evidence of successful nested recognition while leaving unanswered questions about how consistently the system constructs complete trees. For applications that need each mention attached to the correct parent, that additional requirement would need its own evaluation.
The agreement study provides a check on human consistency across the sampled documents. Its value depends in part on whether agreement is assessed per token and depth or per candidate span, a distinction the authors address with their two calculations. The sample of eight documents gives limited scope for judging consistency in rare types or at the deepest layers. The paper reports no agreement breakdown by class, depth or source. Readers can use the reported scores to assess the general annotation procedure while keeping those more specific questions open.
The overall ordering of the leading systems is based on reported point scores. The comparison does not supply estimates for variation across repeated runs or uncertainty around their positions. The tested shared baselines and the strongest adapted specialist are close in overall F1. The evidence supports their competitiveness on the benchmark, with less scope for interpreting a narrow lead as a dependable advantage across training runs or corpora.
Finally, the paper motivates the annotation in part by the information nested mentions can give later tasks. Its experiments measure recognition itself. The exact-match rule gives a clear test of whether the system recovered what the annotators marked, but offers no direct measure of how useful a near match might be to an application. Similarly, recovering an organization and a city inside its name is a possible input to an entity linking decision. The benchmark provides evidence on obtaining those inputs and leaves their effect on a downstream system to a separate evaluation.
What came after
A later paper applies corpus-building work to named entity and relation extraction in Malaysian English news. It cites Thai N-NER in the course of presenting a resource for another language setting. The shared concern is supplying annotated text for entity extraction in a particular setting. The later project’s title gives relation extraction an explicit place alongside entities, while the Thai paper centers on recognizing the spans and types that occur inside other entity mentions. The citing work is Malaysian English News Decoded (2024).
The citation places Thai N-NER in the context of subsequent resource development for news and information extraction. It establishes a connection between the projects at that level. Whether the later resource uses the Thai annotation tree, the fine-grained type inventory, the approach to selectable boundaries or any of the benchmark configurations 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.
@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}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/buaphet-2022-thai-nested-named-entity-recognition/