SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.03797 · 2022

Named Entity Recognition in Twitter: A Dataset and Analysis on Short-Term Temporal Shifts

arXiv · PDF · Open in the Atlas

Code that ran

3 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, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 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/2210.03797.json · badge: /api/ran/2210.03797.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
asahi417/tner canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
aggregate_single_query Ran
ran; our contract draft was wrong, not the code
asahi417/tner/examples/tweetner7_paper/contextual_prediction_analysis.py
code served (permissive licence) · get_code("365f1edbd3098ace")
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 dict. 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 statistics
from scipy.stats import rankdata

def safe_mean(_list):
    return None if len(_list) == 0 else statistics.mean(_list)

list_td = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]

list_rank = [25, 50, 75, 100, None]

def aggregate_single_query(_query_result):
    ids = []
    id_relevancy = {}
    id_td = {}
    entity_feature = {}
    max_td = max(list_td)
    for i in _query_result:
        if i['timedelta'] > max_td:
            continue
        if i['id_retrieval'] not in entity_feature:
            entity_feature[i['id_retrieval']] = []
        entity_feature[i['id_retrieval']].append({'prob_retrieval': float(i['prob_retrieval']), 'flag_accuracy_retrieval': i['label'] == i['pred_retrieval'], 'flag_accuracy_original': i['label'] == i['pred_original'], 'flag_same_prediction': i['pred_retrieval'] == i['pred_original']})
        if i['id_retrieval'] in ids:
            continue
        ids.append(i['id_retrieval'])
        id_relevancy[i['id_retrieval']] = -1 * i['es_score']
        id_td[i['id_retrieval']] = i['timedelta']
    output = {}
    for _td in list_td:
        id_conditioned = [i for i in ids if id_td[i] <= _td]
        if len(id_conditioned) == 0:
            continue
        ranking = rankdata([id_relevancy[i] for i in id_conditioned], method='min')
        output[str(_td)] = {}
        for _rank in list_rank:
            prob_retrieval_positive = []
            accuracy_positive = []
            prob_retrieval_negative = []
            accuracy_negative = []
            same_prediction_negative = []
            for _id, r in zip(id_conditioned, ranking):
                if _rank is None or r <= _rank:
                    for i in entity_feature[_id]:
                        if i['flag_accuracy_original']:
                            prob_retrieval_positive.append(i['prob_retrieval'])
                            accuracy_positive.append(i['flag_accuracy_retrieval'])
                        else:
                            prob_retrieval_negative.append(i['prob_retrieval'])
                            accuracy_negative.append(i['flag_accuracy_retrieval'])
                            same_prediction_negative.append(i['flag_same_prediction'])
            output[str(_td)][str(_rank)] = {'prob_retrieval_positive': safe_mean(prob_retrieval_positive), 'accuracy_positive': safe_mean(accuracy_positive), 'prob_retrieval_negative': safe_mean(prob_retrieval_negative), 'accuracy_negative': safe_mean(accuracy_negative), 'same_prediction_negative': safe_mean(same_prediction_negative)}
    return output

query_result = [
    {
        'timedelta': 5,
        'id_retrieval': 'id_1',
        'prob_retrieval': 0.85,
        'label': 'cat',
        'pred_retrieval': 'cat',
        'pred_original': 'cat',
        'es_score': 0.9
    },
    {
        'timedelta': 8,
        'id_retrieval': 'id_2',
        'prob_retrieval': 0.72,
        'label': 'dog',
        'pred_retrieval': 'dog',
        'pred_original': 'cat',
        'es_score': 0.7
    },
    {
        'timedelta': 15,
        'id_retrieval': 'id_3',
        'prob_retrieval': 0.65,
        'label': 'bird',
        'pred_retrieval': 'cat',
        'pred_original': 'bird',
        'es_score': 0.6
    },
    {
        'timedelta': 25,
        'id_retrieval': 'id_1',
        'prob_retrieval': 0.88,
        'label': 'cat',
        'pred_retrieval': 'cat',
        'pred_original': 'cat',
        'es_score': 0.92
    }
]

ARGS = {
    '_query_result': query_result
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
cosine_similarity Ran
ran, violated the contract we drafted
asahi417/tner/examples/tweetner7_paper/contextual_prediction_analysis.py
code served (permissive licence) · get_code("4b44d9cbe914bd9a")
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 float, 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

torch.manual_seed(0)

# The function computes cosine similarity between two sequences
# It expects iterables that support:
# - sum() and map() operations
# - zip() for pairing elements
# - arithmetic operations on elements

# Create two simple lists of numbers as the arguments
a = [1.0, 2.0, 3.0, 4.0]
b = [2.0, 3.0, 4.0, 5.0]

ARGS = {
    "a": a,
    "b": b
}
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 float, 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
safe_mean Ran
ran; our contract draft was wrong, not the code
asahi417/tner/examples/tweetner7_paper/contextual_prediction_analysis.py
code served (permissive licence) · get_code("9e67989478ee51f3")
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 int, ndim 0, dtype family int, 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 statistics

def safe_mean(_list):
    return None if len(_list) == 0 else statistics.mean(_list)

# Test case 1: non-empty list
ARGS = {
    "_list": [1, 2, 3, 4, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 int, ndim 0, dtype family int, 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

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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 0 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
aggregate_single_query 1 other paper
1 dated earlier
2209.12616 (2022-09)
T-NER: An All-Round Python Library for Transformer-based Named Entity Recognition
cosine_similarity 1 other paper
1 dated earlier
2209.12616 (2022-09)
T-NER: An All-Round Python Library for Transformer-based Named Entity Recognition
safe_mean 1 other paper
1 dated earlier
2209.12616 (2022-09)
T-NER: An All-Round Python Library for Transformer-based Named Entity Recognition

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

Recent progress in language model pre-training has led to important improvements in Named Entity Recognition (NER). Nonetheless, this progress has been mainly tested in well-formatted documents such as news, Wikipedia, or scientific articles. In social media the landscape is different, in which it adds another layer of complexity due to its noisy and dynamic nature. In this paper, we focus on NER in Twitter, one of the largest social media platforms, and construct a new NER dataset, TweetNER7, which contains seven entity types annotated over 11,382 tweets from September 2019 to August 2021. The dataset was constructed by carefully distributing the tweets over time and taking representative trends as a basis. Along with the dataset, we provide a set of language model baselines and perform an analysis on the language model performance on the task, especially analyzing the impact of different time periods. In particular, we focus on three important temporal aspects in our analysis: short-term degradation of NER models over time, strategies to fine-tune a language model over different periods, and self-labeling as an alternative to lack of recently-labeled data. TweetNER7 is released publicly (https://huggingface.co/datasets/tner/tweetner7) along with the models fine-tuned on it.

For agents

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

get_harvested_code_for_paper("2210.03797")
get_code_for_paper("2210.03797")
have("2210.03797")

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

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

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

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

Connect an agent — have() is free.