SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.03546 · 2019

Entity, Relation, and Event Extraction with Contextualized Span Representations

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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 5 have no contract verdict; 0 failures of our instrument; 2 no recorded run), 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/1909.03546.json · badge: /api/ran/1909.03546.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
diffbot/knowledge-net community (classifier label)
classifier basis not recorded on the link
5 ran · 2 no recorded run
FunctionStatusWhere it lives
bert_embedding Ran
ran on a synthesized input
diffbot/knowledge-net/baselines/EMNLP2019/features.py
code served (permissive licence) · get_code("2a1b8b5cbb603a5f")
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 torch
import numpy as np
from unittest.mock import Mock

torch.manual_seed(0)

# Create a mock word object with a ._bert_vector attribute
mock_word = Mock()
mock_word._.bert_vector = torch.randn(4)

# Create a mock instance (spacy Doc or similar) that will be passed to bert_embedding
instance = Mock()

ARGS = {
    "instance": instance
}
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 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
buildAnnotatedPassage Ran
ran on a synthesized input
diffbot/knowledge-net/dataset/evaluator.py
code served (permissive licence) · get_code("b47d5106b6bd0ffd")
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 torch
import numpy as np

# Construct arguments for buildAnnotatedPassage
# The function takes a document text and annotates a passage with entity positions

documentText = "The quick brown fox jumps over the lazy dog and the cat runs fast"
passageStart = 0
passageEnd = 65
subjectStart = 4  # "quick"
subjectEnd = 9
objectStart = 26  # "lazy"
objectEnd = 30

ARGS = {
    "documentText": documentText,
    "passageStart": passageStart,
    "passageEnd": passageEnd,
    "subjectStart": subjectStart,
    "subjectEnd": subjectEnd,
    "objectStart": objectStart,
    "objectEnd": objectEnd,
}
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 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
checkField Ran
ran on a synthesized input
diffbot/knowledge-net/dataset/evaluator.py
code served (permissive licence) · get_code("df9e14535042dcdf")
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 torch

torch.manual_seed(0)

# The function checks if an attribute exists in a dict (knObject)
# and if it exists, whether it's an empty string.
# We need to provide:
# 1. attribute: a string key name
# 2. knObject: a dictionary that may or may not contain that key

# Test case 1: attribute exists and has a value
attribute_1 = "username"
knObject_1 = {
    "username": "john_doe",
    "email": "john@example.com"
}

# Test case 2: attribute exists but is empty
attribute_2 = "password"
knObject_2 = {
    "username": "jane_doe",
    "password": ""
}

# Test case 3: attribute missing
attribute_3 = "phone"
knObject_3 = {
    "username": "bob",
    "email": "bob@example.com"
}

# We'll use the first case for ARGS
ARGS = {
    "attribute": "username",
    "knObject": {
        "username": "john_doe",
        "email": "john@example.com"
    }
}
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 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
embedding Ran
ran on a synthesized input
diffbot/knowledge-net/baselines/EMNLP2019/features.py
code served (permissive licence) · get_code("340b033ce6245cbf")
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 torch
import numpy as np

class MockWord:
    def __init__(self, vector):
        self.vector = vector

torch.manual_seed(0)

# Create a mock instance that has the structure expected
class MockInstance:
    pass

instance = MockInstance()

ARGS = {
    "instance": instance
}
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 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
readKnowledgenetFile Ran
ran on a synthesized input
diffbot/knowledge-net/dataset/evaluator.py
code served (permissive licence) · get_code("c77cf114994f5b70")
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 tuple, 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 json
import io
import tempfile
import os

# Create a temporary JSON file with valid knowledge net data
temp_data = []

# Create a valid document entry
doc_entry = {
    "documentId": "doc_1",
    "documentText": "John Smith was born in New York. He is a famous scientist.",
    "fold": 1,
    "source": "TREx",
    "passages": [
        {
            "passageId": "passage_1",
            "passageStart": 0,
            "passageEnd": 30,
            "passageText": "John Smith was born in New York",
            "exhaustivelyAnnotatedProperties": [
                {
                    "propertyId": "prop_1",
                    "propertyName": "birthPlace",
                    "propertyDescription": "Place where person was born"
                }
            ],
            "facts": [
                {
                    "factId": "fact_1",
                    "propertyId": "prop_1",
                    "subjectStart": 0,
                    "subjectEnd": 10,
                    "objectStart": 21,
                    "objectEnd": 30,
                    "subjectUri": "http://example.com/john_smith",
                    "objectUri": "http://example.com/new_york",
                    "subjectText": "John Smith",
                    "objectText": "New York",
                    "annotatedPassage": "John Smith was born in New York",
                    "humanReadable": "John Smith was born in New York"
                }
            ]
        }
    ]
}

temp_data.append(doc_entry)

# Create a temporary file with JSONL format
with tempfile.NamedTemporaryFile(mode='w', suffix='.jsonl', delete=False) as f:
    for entry in temp_data:
        f.write(json.dumps(entry) + '\n')
    temp_file_path = f.name

try:
    # Define ARGS for the function
    ARGS = {
        'dataset': temp_file_path,
        'foldToRead': 1,
        'propertiesToConsider': {}
    }
finally:
    pass
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 tuple, ndim 1, dtype family float — a tuple 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
bert_layers Not yet run
unverified (harvested, no recorded run)
diffbot/knowledge-net/baselines/EMNLP2019/features.py
code served (permissive licence) · get_code("b9b6c55cbf3e0233")
How it ran

no invocation recorded.

coref_score Not yet run
unverified (harvested, no recorded run)
diffbot/knowledge-net/baselines/EMNLP2019/global_features.py
code served (permissive licence) · get_code("8596fe57c887b433")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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.

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

We examine the capabilities of a unified, multi-task framework for three information extraction tasks: named entity recognition, relation extraction, and event extraction. Our framework (called DyGIE++) accomplishes all tasks by enumerating, refining, and scoring text spans designed to capture local (within-sentence) and global (cross-sentence) context. Our framework achieves state-of-the-art results across all tasks, on four datasets from a variety of domains. We perform experiments comparing different techniques to construct span representations. Contextualized embeddings like BERT perform well at capturing relationships among entities in the same or adjacent sentences, while dynamic span graph updates model long-range cross-sentence relationships. For instance, propagating span representations via predicted coreference links can enable the model to disambiguate challenging entity mentions. Our code is publicly available at https://github.com/dwadden/dygiepp and can be easily adapted for new tasks or datasets.

For agents

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

get_harvested_code_for_paper("1909.03546")
get_code_for_paper("1909.03546")
have("1909.03546")

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

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

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

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

Connect an agent — have() is free.