SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.01378 · 2019

Distantly Supervised Named Entity Recognition using Positive-Unlabeled Learning

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 4 have no contract verdict; 1 failure of our instrument; 2 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/1906.01378.json · badge: /api/ran/1906.01378.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
v-mipeng/LexiconNER canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_precision_recall_f1 Ran
ran on a synthesized input
v-mipeng/LexiconNER/dict_match.py
code served (permissive licence) · get_code("8ca83638ea04cd97")
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 numpy as np

# Construct valid arguments for compute_precision_recall_f1

# The function expects:
# - labels: list of sequences, where each sequence is a list of items
#   Each item should be array-like (can be compared with np.array)
# - preds: list of sequences with same structure as labels
# - flag: a value/array to compare against labels items
# - pflag: a value/array to compare against predictions items

# Create label sequences (batch of 2 sequences)
# Each item in a sequence is an array
labels = [
    [np.array([1, 0]), np.array([0, 1]), np.array([1, 0])],  # sequence 1
    [np.array([0, 1]), np.array([1, 0])]  # sequence 2
]

# Create prediction sequences (same structure as labels)
preds = [
    [np.array([1, 0]), np.array([1, 0]), np.array([1, 0])],  # sequence 1
    [np.array([0, 1]), np.array([0, 1])]  # sequence 2
]

# flag: the "true positive" marker to look for in labels
# Using a 2-element array to match the structure of items
flag = np.array([1, 0])

# pflag: the "positive prediction" marker to look for in preds
# Using a 2-element array to match the structure of items
pflag = np.array([1, 0])

ARGS = {
    "labels": labels,
    "preds": preds,
    "flag": flag,
    "pflag": pflag
}
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 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
compute_precision_recall_f1_2 Ran
ran on a synthesized input
v-mipeng/LexiconNER/dict_match.py
code served (permissive licence) · get_code("6ce9c8347c180d5d")
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 numpy as np

# Analyze the function:
# - labels: iterable of items that will be converted to numpy arrays and compared with flag
# - preds: iterable of items that will be converted to numpy arrays and compared with pflag
# - flag: a value to compare against labels[i]
# - pflag: a value to compare against preds[i]
# The function iterates through indices and compares scalar values

# Create simple test data
labels = [1, 0, 1, 0, 1, 1]
preds = [1, 0, 1, 1, 0, 1]
flag = 1  # positive label indicator
pflag = 1  # positive prediction indicator

ARGS = {
    "labels": labels,
    "preds": preds,
    "flag": flag,
    "pflag": pflag
}
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 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
getLabelsAndPreds Ran
ran on a synthesized input
v-mipeng/LexiconNER/dict_match.py
code served (permissive licence) · get_code("baee7959667f3ee4")
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 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 torch

torch.manual_seed(0)

# Analyze the function: it takes 'sentences' which is iterable
# Each sentence is iterable and contains tuples of (word, label, pred)
# The label is a string that may contain '-' characters
# The pred is appended as-is (appears to be a string or similar)

# Build sample sentences structure
sentences = [
    [
        ("The", "O", "O"),
        ("cat", "B-ANIMAL", "B-ANIMAL"),
        ("sat", "O", "O"),
    ],
    [
        ("John", "B-PERSON", "B-PERSON"),
        ("runs", "O", "O"),
        ("fast", "B-ADV", "O"),
    ]
]

ARGS = {
    "sentences": sentences
}
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 tuple, ndim 2, 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
get_output Ran
ran on a synthesized input
v-mipeng/LexiconNER/final_evl.py
code served (permissive licence) · get_code("779dc0b23e846462")
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. 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 tempfile
import os

# Create a temporary file with test data in the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, encoding='utf-8', suffix='.txt')
temp_filename = temp_file.name

try:
    # Write test data matching the function's expected format
    # Lines with space-separated values, last value is a float
    temp_file.write("word1 tag1 0.95\n")
    temp_file.write("word2 tag2 0.87\n")
    temp_file.write("\n")
    temp_file.write("-DOCSTART- -X- O\n")
    temp_file.write("word3 tag3 0.92\n")
    temp_file.write("word4 tag4 0.78\n")
    temp_file.write("\n")
    temp_file.write("word5 tag5 0.64\n")
    temp_file.close()
    
    ARGS = {
        'filename': temp_filename
    }
except Exception as e:
    temp_file.close()
    os.unlink(temp_filename)
    raise
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 list — a list output has no array shape of its own; none is 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
log_sum_exp Ran
ran; our contract draft was wrong, not the code
v-mipeng/LexiconNER/sub_model.py
code served (permissive licence) · get_code("390527929922fd01")
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 2, dtype family float, shape (2, 4) 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)

# Analyze the function:
# - vec: shape (batch_size, vanishing_dim, hidden_dim)
# - m_size: hidden_dim (an integer)
# The function uses:
#   - torch.max(vec, 1) to find max along dimension 1
#   - torch.gather with idx reshaped to (-1, 1, m_size)
#   - Operations that expand and reshape tensors

# Set distinct sizes for clarity
batch_size = 2
vanishing_dim = 5  # distinct from batch_size and hidden_dim
hidden_dim = 4

# Create vec with shape (batch_size, vanishing_dim, hidden_dim)
vec = torch.randn(batch_size, vanishing_dim, hidden_dim)

# m_size should equal hidden_dim
m_size = hidden_dim

ARGS = {
    "vec": vec,
    "m_size": m_size,
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
get_final_result Not yet run
unverified (harvested, no recorded run)
v-mipeng/LexiconNER/final_evl.py
code served (permissive licence) · get_code("9dfdc3ee7db11b99")
How it ran

no invocation recorded.

prf1 Not yet run
unverified (harvested, no recorded run)
v-mipeng/LexiconNER/final_evl.py
code served (permissive licence) · get_code("057e0a226e67ecbd")
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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 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
log_sum_exp 10 other papers
3 dated earlier, 7 later
1505.08075 (2015-05)
Transition-Based Dependency Parsing with Stack Long Short-Term Memory
1806.05626 (2018-06)
NCRF++: An Open-source Neural Sequence Labeling Toolkit
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 7 more not named here

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

In this work, we explore the way to perform named entity recognition (NER) using only unlabeled data and named entity dictionaries. To this end, we formulate the task as a positive-unlabeled (PU) learning problem and accordingly propose a novel PU learning algorithm to perform the task. We prove that the proposed algorithm can unbiasedly and consistently estimate the task loss as if there is fully labeled data. A key feature of the proposed method is that it does not require the dictionaries to label every entity within a sentence, and it even does not require the dictionaries to label all of the words constituting an entity. This greatly reduces the requirement on the quality of the dictionaries and makes our method generalize well with quite simple dictionaries. Empirical studies on four public NER datasets demonstrate the effectiveness of our proposed method. We have published the source code at \url{https://github.com/v-mipeng/LexiconNER}.

For agents

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

get_harvested_code_for_paper("1906.01378")
get_code_for_paper("1906.01378")
have("1906.01378")

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

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

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

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

Connect an agent — have() is free.