SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2022.findings-acl.116 · ACL Findings · 2022

Thai Nested Named Entity Recognition Corpus

Peerat Limkonchotiwat, Sarana Nutanong, Weerayut Buaphet, Can Udomcharoenchaikit, Attapol Rutherford

Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2022.findings-acl.116.json · badge: /api/ran/2022.findings-acl.116.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
vistec-AI/Thai-NNER canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
conll2span Ran
ran on a synthesized input
vistec-AI/Thai-NNER/thai_nner/utils/conll2span.py
code served (permissive licence) · get_code("1c64586fa797099e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function conll2span takes a label parameter which should be a sequence of strings
# in BIO/BIOES format (e.g., 'B-PER', 'I-PER', 'E-PER', 'S-LOC')
# The function expects strings that can be split by '-'

# Construct a valid label sequence in BIO format
label = [
    'B-PER',    # Beginning of Person
    'E-PER',    # End of Person
    'S-LOC',    # Single Location
    'B-ORG',    # Beginning of Organization
    'E-ORG'     # End of Organization
]

ARGS = {
    'label': label
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cross_entropy_loss Ran
ran on a synthesized input
vistec-AI/Thai-NNER/model/loss.py
code served (permissive licence) · get_code("fc13a6fe4c6c8129")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# CrossEntropyLoss expects:
# - output: (N, C) tensor of logits where N is batch size, C is number of classes
# - target: (N,) tensor of class indices

batch_size = 2
num_classes = 4

output = torch.randn(batch_size, num_classes)
target = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "output": output,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_B Ran
ran on a synthesized input
vistec-AI/Thai-NNER/thai_nner/utils/correcting_labels.py
code served (permissive licence) · get_code("0cea380b0dfca9fc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Analyzing the function is_B:
# - It takes three parameters: prev, now, next
# - Each parameter is passed to is_same_NE which expects:
#   - A string-like object with indexing (NE[0] for first char, NE[1:] for rest)
#   - The first character should be one of: 'B', 'I', 'E'
#   - The rest should be comparable strings (entity type labels)

# Valid NE tags follow BIO tagging scheme:
# - 'B-TYPE': Beginning of entity
# - 'I-TYPE': Inside/continuation of entity  
# - 'E-TYPE': End of entity (in BIOE scheme)
# Where TYPE is the entity type (e.g., 'PER', 'ORG', 'LOC')

ARGS = {
    'prev': 'B-PER',      # Beginning of Person entity
    'now': 'I-PER',       # Inside Person entity (same as previous)
    'next': 'I-PER'       # Inside Person entity (same as current)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_S Ran
ran on a synthesized input
vistec-AI/Thai-NNER/thai_nner/utils/correcting_labels.py
code served (permissive licence) · get_code("d0e82a8767611662")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function is_S takes three parameters: prev, now, next
# Each parameter is used with indexing operations like [0] and [1:]
# This suggests they are strings in BIO tagging format (e.g., "B-PER", "I-ORG", "O")

# Valid BIO tag examples:
prev = "B-PER"      # Beginning of Person entity
now = "I-PER"       # Inside Person entity
next = "E-PER"      # End of Person entity (or could be another tag)

ARGS = {
    "prev": prev,
    "now": now,
    "next": next
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_same_NE Ran
ran on a synthesized input
vistec-AI/Thai-NNER/thai_nner/utils/correcting_labels.py
code served (permissive licence) · get_code("0fb205b89d4b2457")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Analyze the function:
# - is_same_NE takes two parameters: NE1 and NE2
# - Each parameter is indexed with [0] to get first character
# - Each parameter is sliced with [1:] to get the rest
# - The function checks if the first character matches certain patterns
#   and if the rest of the strings are equal
# - These look like named entity tags in BIO format (Begin, Inside, End)

# Valid test cases:
# NE1 and NE2 should be strings where:
# - First character is one of: 'B', 'I', 'E'
# - Rest of string is the entity type (e.g., 'PERSON', 'LOC')

NE1 = "B-PERSON"
NE2 = "I-PERSON"

ARGS = {
    "NE1": NE1,
    "NE2": NE2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
nll_loss Ran
ran on a synthesized input
vistec-AI/Thai-NNER/model/loss.py
code served (permissive licence) · get_code("8c2db3d4435816c0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# NLL loss expects log probabilities as output and target class indices
# output should be of shape (batch_size, num_classes) with log probabilities
# target should be of shape (batch_size,) with class indices

batch_size = 2
num_classes = 4

output = F.log_softmax(torch.randn(batch_size, num_classes), dim=1)
target = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "output": output,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_json Ran
ran; our contract draft was wrong, not the code
vistec-AI/Thai-NNER/thai_nner/utils/util.py
code served (permissive licence) · get_code("bb3e67ec54bb65e3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned OrderedDict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
from pathlib import Path
from collections import OrderedDict
import tempfile
import os

# Create a temporary JSON file with some test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.json")

test_data = OrderedDict([
    ("key1", "value1"),
    ("key2", [1, 2, 3]),
    ("key3", {"nested": "dict"})
])

with open(temp_file, 'w') as f:
    json.dump(test_data, f)

ARGS = {
    "fname": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
span2json Ran
ran on a synthesized input
vistec-AI/Thai-NNER/thai_nner/utils/span2json.py
code served (permissive licence) · get_code("a353dfdc7fcc811e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Set random seed for reproducibility
torch.manual_seed(0)

# Define arguments for span2json function
tokens = ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']

span_labels = [
    (0, 2, 'NOUN_PHRASE'),
    (2, 4, 'ADJECTIVE_PHRASE'),
    (4, 6, 'VERB_PHRASE'),
    (7, 9, 'NOUN_PHRASE')
]

ARGS = {
    'tokens': tokens,
    'span_labels': span_labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unique Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vistec-AI/Thai-NNER/thai_nner/utils/unique.py
code served (permissive licence) · get_code("70834a46f93a4007")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes a list and removes duplicates while preserving order
# It checks membership with 'in' operator and appends to a list
# Works with any hashable or comparable items

list1 = [1, 2, 2, 3, 1, 4, 3, 5]

ARGS = {
    "list1": list1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
nll_loss 7 other papers
2 dated earlier, 2 later, 3 same year, order not determinable
2104.00650 (2021-04)
Frozen in Time: A Joint Video and Image Encoder for End-to-End Retrieval
2109.04912 (2021-09)
ReasonBERT: Pre-trained to Reason with Distant Supervision
2022.findings-emnlp.24 (2022 (year only))
AssistSR: Task-oriented Video Segment Retrieval for Personal AI Assistant
and 4 more not named here
read_json 2 other papers
2 dated earlier
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
2008.10292 (2020-08)
Automated Search for Resource-Efficient Branched Multi-Task Networks
unique 1 other paper
1 later
2402.03172 (2024-02)
Accurate and Well-Calibrated ICD Code Assignment Through Attention Over Diverse Label Embeddings

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

This paper presents the first Thai Nested Named Entity Recognition (N-NER) dataset. Thai N-NER consists of 264,798 mentions, 104 classes, and a maximum depth of 8 layers obtained from news articles and restaurant reviews, a total of 4894 documents. Our work, to the best of our knowledge, presents the largest non-English N-NER dataset and the first non-English one with fine-grained classes. To understand the new challenges our proposed dataset brings to the field, we conduct an experimental study on (i) cutting edge N-NER models with the state-of-the-art accuracy in English and (ii) baseline methods based on wellknown language model architectures. From the experimental results, we obtain two key findings. First, all models produce poor F1 scores in the tail region of the class distribution. There is little or no performance improvement provided by these models with respect to the baseline methods with our Thai dataset. These findings suggest that further investigation is required to make a multilingual N-NER solution that works well across different languages. The dataset and code are available at: github.com/vistec-AI/Thai-NNER.git *

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2022.findings-acl.116")
get_code_for_paper("2022.findings-acl.116")
have("2022.findings-acl.116")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2022.findings-acl.116.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2022.findings-acl.116.svg)](https://syntology.ai/paper/2022.findings-acl.116)

Connect an agent — have() is free.