SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.13625 · EMNLP · 2020

Event Extraction by Answering (Almost) Natural Questions

Xinya Du, Claire Cardie

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2004.13625.json · badge: /api/ran/2004.13625.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
zhaoyuesun/phee community
Papers with Code archive
1 ran · 1 no recorded run
xinyadu/eeqa marked official in Papers with Code
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_examples_to_features Ran
ran; our contract draft was wrong, not the code
zhaoyuesun/phee/eeqa/code/run_stage1.py
code served (permissive licence) · get_code("a99894f46ca03cb9")
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 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
from transformers import AutoTokenizer

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def tokenize(self, text):
        # Simple whitespace tokenization
        return text.split()
    
    def convert_tokens_to_ids(self, tokens):
        # Map tokens to simple integer IDs
        token_to_id = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[UNK]': 100,
            'the': 1,
            'quick': 2,
            'brown': 3,
            'fox': 4,
            'jumps': 5,
            'over': 6,
            'lazy': 7,
            'dog': 8,
            'trigger': 9,
            'event': 10,
            'type': 11,
            'what': 12,
            'is': 13,
            'the': 14,
            'argument': 15,
        }
        return [token_to_id.get(token, 100) for token in tokens]

# Create a minimal Example class
class Example:
    def __init__(self, example_id, sentence, s_start, events):
        self.example_id = example_id
        self.sentence = sentence
        self.s_start = s_start
        self.events = events

# Create example data
tokenizer = MinimalTokenizer()

# Example structure: event = ((trigger_start, trigger_end, event_type), (arg_start, arg_end, arg_type, ...))
example1 = Example(
    example_id=0,
    sentence=['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog'],
    s_start=0,
    events=[
        (
            (1, 2, 'movement_event'),  # trigger at position 1-2 with type 'movement_event'
            (4, 5, 'agent'),  # argument: position 4-5, type 'agent'
            (6, 8, 'theme'),  # argument: position 6-8, type 'theme'
        ),
    ]
)

example2 = Example(
    example_id=1,
    sentence=['the', 'dog', 'runs', 'fast'],
    s_start=0,
    events=[
        (
            (2, 3, 'motion_event'),
            (1, 2, 'agent'),
        ),
    ]
)

examples = [example1, example2]

# Query templates
query_templates = {
    'agent': {
        0: 'What is the agent of [trigger] [event_type]?',
    },
    'theme': {
        0: 'What is the theme of [trigger] [event_type]?',
    },
}

ARGS = {
    'examples': examples,
    'tokenizer': tokenizer,
    'query_templates': query_templates,
    'nth_query': 0,
    'is_training': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — 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
convert_examples_to_features Ran
ran; our contract draft was wrong, not the code
xinyadu/eeqa/code/run_args_qa.py
code served (permissive licence) · get_code("837c69d4640d3699")
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 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
from transformers import BertTokenizer

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def tokenize(self, text):
        # Simple whitespace tokenization
        return text.lower().split()
    
    def convert_tokens_to_ids(self, tokens):
        # Map tokens to simple IDs
        token_to_id = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[PAD]': 0,
            'what': 2054,
            'is': 2003,
            'the': 1996,
            'trigger': 8045,
            'john': 2198,
            'left': 2187,
            'the': 1996,
            'building': 2311,
            'quickly': 4377,
        }
        return [token_to_id.get(token, 1000 + hash(token) % 1000) for token in tokens]

# Create minimal Example class
class Example:
    def __init__(self, example_id, sentence, s_start, events):
        self.example_id = example_id
        self.sentence = sentence
        self.s_start = s_start
        self.events = events

# Create test data
tokenizer = MinimalTokenizer()

# Example structure: event = ((trigger_offset, event_type), (arg_start, arg_end, arg_type), ...)
examples = [
    Example(
        example_id=0,
        sentence=['John', 'left', 'the', 'building', 'quickly'],
        s_start=0,
        events=[
            ((1, 'Movement'), (1, 2, 'Agent'), (2, 4, 'Destination'))
        ]
    ),
    Example(
        example_id=1,
        sentence=['Mary', 'entered', 'the', 'room'],
        s_start=0,
        events=[
            ((1, 'Movement'), (0, 1, 'Agent'), (2, 4, 'Destination'))
        ]
    )
]

# Query templates structure
query_templates = {
    'Movement': {
        'Agent': {
            0: 'Who is the [trigger]?'
        },
        'Destination': {
            0: 'Where is the [trigger]?'
        }
    }
}

ARGS = {
    'examples': examples,
    'tokenizer': tokenizer,
    'query_templates': query_templates,
    'nth_query': 0,
    'is_training': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — 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
InputFeatures Not yet run
unverified (harvested, no recorded run)
zhaoyuesun/phee/eeqa/code/run_stage1.py
code served (permissive licence) · get_code("50bc9fc9be6cc278")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 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 3 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-22.

Repositories linked to this paper

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

Abstract

The problem of event extraction requires detecting the event trigger and extracting its corresponding arguments. Existing work in event argument extraction typically relies heavily on entity recognition as a preprocessing/concurrent step, causing the well-known problem of error propagation. To avoid this issue, we introduce a new paradigm for event extraction by formulating it as a question answering (QA) task that extracts the event arguments in an end-to-end manner. Empirical results demonstrate that our framework outperforms prior methods substantially; in addition, it is capable of extracting event arguments for roles not seen at training time (i.e., in a zeroshot learning setting). 1

For agents

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

get_harvested_code_for_paper("2004.13625")
get_code_for_paper("2004.13625")
have("2004.13625")

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

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

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

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

Connect an agent — have() is free.