SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.07150 · ACL · 2020

Named Entity Recognition as Dependency Parsing

Bernd Bohnet, Massimo Poesio, Juntao Yu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 3 failures of our instrument; 4 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2005.07150.json · badge: /api/ran/2005.07150.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
juntaoy/biaffine-ner canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
flatten Ran
ran, honoured the contract we drafted
juntaoy/biaffine-ner/util.py
code served (permissive licence) · get_code("20922c79a0929bbf")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:50:02Z). 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 flatten takes a list of lists and flattens it into a single list
# It iterates through sublists and extracts items from each

# Create a simple nested list structure
nested_list = [
    [1, 2, 3],
    [4, 5],
    [6, 7, 8, 9]
]

ARGS = {
    "l": nested_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
convert_to_unicode Ran
ran; our contract draft was wrong, not the code
juntaoy/biaffine-ner/extract_bert_features/tokenization.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from huawei-noah/Pretrained-Language-Model, is pointer only (licence: NONE) · get_code("1923fc05163d207d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from huawei-noah/Pretrained-Language-Model, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_activation Ran
ran; our contract draft was wrong, not the code
juntaoy/biaffine-ner/extract_bert_features/modeling.py
code served (permissive licence) · get_code("2dc172f4dc0c745c")
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) and returned function. 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 tensorflow as tf
import six

def gelu(input_tensor):
    """Gaussian Error Linear Unit.

    This is a smoother version of the RELU.
    Original paper: https://arxiv.org/abs/1606.08415

    Args:
      input_tensor: float Tensor to perform activation.

    Returns:
      `input_tensor` with the GELU activation applied.
    """
    cdf = 0.5 * (1.0 + tf.erf(input_tensor / tf.sqrt(2.0)))
    return input_tensor * cdf

def get_activation(activation_string):
    """Maps a string to a Python function, e.g., "relu" => `tf.nn.relu`.

    Args:
      activation_string: String name of the activation function.

    Returns:
      A Python function corresponding to the activation function. If
      `activation_string` is None, empty, or "linear", this will return None.
      If `activation_string` is not a string, it will return `activation_string`.

    Raises:
      ValueError: The `activation_string` does not correspond to a known
        activation.
    """
    if not isinstance(activation_string, six.string_types):
        return activation_string
    if not activation_string:
        return None
    act = activation_string.lower()
    if act == 'linear':
        return None
    elif act == 'relu':
        return tf.nn.relu
    elif act == 'gelu':
        return gelu
    elif act == 'tanh':
        return tf.tanh
    else:
        raise ValueError('Unsupported activation: %s' % act)

ARGS = {
    'activation_string': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
input_fn_builder Ran
ran on a synthesized input
juntaoy/biaffine-ner/extract_bert_features/extract_features.py
code served (permissive licence) · get_code("fb8d325e40dbff1b")
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 function. 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 numpy as np
import tensorflow as tf


class SimpleTokenizer:
    """Minimal tokenizer for testing."""
    def convert_tokens_to_ids(self, tokens):
        # Map tokens to simple integer IDs
        return [hash(token) % 1000 for token in tokens]


class SimpleExample:
    """Minimal example object with required attributes."""
    def __init__(self, document_index, tokens, bert_to_orig_map):
        self.document_index = document_index
        self.tokens = tokens
        self.bert_to_orig_map = bert_to_orig_map


# Create minimal test data
tokenizer = SimpleTokenizer()

# Create simple examples with small token sequences
examples = [
    SimpleExample(
        document_index=0,
        tokens=["[CLS]", "hello", "world", "test"],
        bert_to_orig_map=[0, 1, 2, 3]  # All tokens are valid (>= 0)
    ),
    SimpleExample(
        document_index=1,
        tokens=["[CLS]", "foo", "bar"],
        bert_to_orig_map=[0, 1, 2]
    )
]

window_size = 3  # Must be odd
stride = 1       # Must be odd

ARGS = {
    "examples": examples,
    "window_size": window_size,
    "stride": stride,
    "tokenizer": tokenizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
mkdirs Ran
ran on a synthesized input
juntaoy/biaffine-ner/util.py
code served (permissive licence) · get_code("e9675d534fa5b1ba")
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 str. 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 os
import tempfile

# Create a temporary directory path that doesn't exist yet
temp_base = tempfile.gettempdir()
test_path = os.path.join(temp_base, "test_mkdirs_unique_" + str(os.getpid()))

# Clean up if it somehow exists
if os.path.exists(test_path):
    os.rmdir(test_path)

ARGS = {
    "path": test_path
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
printable_text Ran
ran; our contract draft was wrong, not the code
juntaoy/biaffine-ner/extract_bert_features/tokenization.py
code served (permissive licence) · get_code("0e5615f8994003cf")
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 str. 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 six

# The function takes a single parameter 'text' which can be:
# - str (works in both Python 2 and 3)
# - bytes (in Python 3, decoded to utf-8)
# - unicode (in Python 2, encoded to utf-8)

# Since we're running on Python 3, we'll test with a string
text_input = "Hello, World!"

ARGS = {
    "text": text_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
gelu Not yet run
unverified (harvested, no recorded run)
juntaoy/biaffine-ner/extract_bert_features/modeling.py
code served (permissive licence) · get_code("6558b9f62bb65244")
How it ran

no invocation recorded.

get_assignment_map_from_checkpoint Not yet run
unverified (harvested, no recorded run)
juntaoy/biaffine-ner/extract_bert_features/modeling.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from toggle1995/RIS-DMMI, is pointer only (licence: NONE) · get_code("50958618b65e514e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from toggle1995/RIS-DMMI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_vocab Not yet run
unverified (harvested, no recorded run)
juntaoy/biaffine-ner/extract_bert_features/tokenization.py
code served (permissive licence) · get_code("ff83ccc8b0b6462d")
How it ran

no invocation recorded.

make_summary Not yet run
unverified (harvested, no recorded run)
juntaoy/biaffine-ner/util.py
code served (permissive licence) · get_code("304ac22fbc54657a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 6 the same month, 9 later) and 1 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
convert_to_unicode 36 other papers
15 dated earlier, 1 the same month, 20 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 33 more not named here
printable_text 33 other papers
14 dated earlier, 1 the same month, 18 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 30 more not named here
get_activation 32 other papers
19 dated earlier, 1 the same month, 12 later · 1 only as an assembly brick
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 29 more not named here
get_assignment_map_from_checkpoint 26 other papers
17 dated earlier, 1 the same month, 8 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1808.09781 (2018-08)
Self-Attentive Sequential Recommendation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 23 more not named here
flatten 21 other papers
5 dated earlier, 16 later
1609.08675 (2016-09)
YouTube-8M: A Large-Scale Video Classification Benchmark
1802.04821 (2018-02)
Evolved Policy Gradients
1811.05014 (2018-11)
NeXtVLAD: An Efficient Neural Network to Aggregate Frame-level Features for Large-scale Video Classification
and 18 more not named here
gelu 16 other papers
10 dated earlier, 1 the same month, 5 later · 2 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 13 more not named here
load_vocab 16 other papers
9 dated earlier, 1 the same month, 6 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.08746 (2019-01)
BioBERT: a pre-trained biomedical language representation model for biomedical text mining
and 13 more not named here
input_fn_builder 2 other papers
1 dated earlier, 1 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
2022.acl-long.56 (2022 (year only))
Constrained Multi-Task Learning for Bridging Resolution
make_summary 2 other papers
1 dated earlier, 1 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
2022.acl-long.56 (2022 (year only))
Constrained Multi-Task Learning for Bridging Resolution

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-21.

Repositories linked to this paper

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

Abstract

Named Entity Recognition (NER) is a fundamental task in Natural Language Processing, concerned with identifying spans of text expressing references to entities. NER research is often focused on flat entities only (flat NER), ignoring the fact that entity references can be nested, as in [Bank of [China]] (Finkel and Manning, 2009). In this paper, we use ideas from graph-based dependency parsing to provide our model a global view on the input via a biaffine model (Dozat and Manning, 2017). The biaffine model scores pairs of start and end tokens in a sentence which we use to explore all spans, so that the model is able to predict named entities accurately. We show that the model works well for both nested and flat NER through evaluation on 8 corpora and achieving SoTA performance on all of them, with accuracy gains of up to 2.2 percentage points.

For agents

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

get_harvested_code_for_paper("2005.07150")
get_code_for_paper("2005.07150")
have("2005.07150")

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

curl https://syntology.ai/api/ran/2005.07150.json

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

[![Syntology run record](https://syntology.ai/api/ran/2005.07150.svg)](https://syntology.ai/paper/2005.07150)

Connect an agent — have() is free.