SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.08041 · 2019

Revealing the Importance of Semantic Retrieval for Machine Reading at Scale

arXiv · PDF · Open in the Atlas

Code that ran

15 of 17 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; 4 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 3 failures of our instrument; 2 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-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/1909.08041.json · badge: /api/ran/1909.08041.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
easonnie/semanticRetrievalMRS canonical (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
dujiaxin/semanticRetrievalMRS community (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
dujiaxin/semanticRetrievalMRS/src/bert_model_variances/bert_maxout_clf.py
code served (permissive licence) · get_code("0f786c407fb1ee4c")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. 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:33:52Z). 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)

# The function swish takes a single parameter 'x' which is used with:
# - torch.sigmoid(x) - requires a tensor
# - x * ... - requires a tensor that supports multiplication
# So x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
compute_K Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/bm25.py
code served (permissive licence) · get_code("292d77ea319f82b8")
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 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

torch.manual_seed(0)

# Analyze compute_K function:
# - Takes two parameters: dl and avdl
# - Both are converted to float
# - Used in arithmetic: k1 * (1 - b + b * (float(dl) / float(avdl)))
# - dl is a document length (numeric)
# - avdl is an average document length (numeric)

dl = 150
avdl = 200

ARGS = {
    "dl": dl,
    "avdl": avdl
}
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 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
doc_macro_precision Ran
ran, honoured the contract we drafted
easonnie/semanticRetrievalMRS/src/evaluation/fever_scorer.py
code served (permissive licence) · get_code("5e7db7ffb7a92c64")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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.

instance = {
    'label': 'SUPPORTS',
    'evidence': [
        [
            ('entity_id_1', 0, 'doc1', 0),
            ('entity_id_2', 1, 'doc2', 1),
            ('entity_id_3', 2, 'doc3', 2)
        ],
        [
            ('entity_id_4', 3, 'doc4', 3),
            ('entity_id_5', 4, 'doc5', None)
        ]
    ],
    'predicted_docids': ['doc1', 'doc2', 'doc6', 'doc3']
}

max_evidence = 3

ARGS = {
    'instance': instance,
    'max_evidence': max_evidence
}
Setup block drafted by
a language model, Claude Sonnet 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 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
fever_doc_only Ran
ran, honoured the contract we drafted
easonnie/semanticRetrievalMRS/src/evaluation/fever_scorer.py
code served (permissive licence) · get_code("2781a9591cbfdb33")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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
from collections import Counter

# Create sample predictions and actual data
# Each instance needs: 'label', 'evidence', 'predicted_docids'
# Evidence format: list of evidence groups, where each group is a list of tuples (?,?,docid,line_num)

predictions = [
    {
        'label': 'SUPPORTS',
        'evidence': [
            [(None, None, 'doc1', 0), (None, None, 'doc2', 1)],
            [(None, None, 'doc3', 2)]
        ],
        'predicted_docids': ['doc1', 'doc2', 'doc4', 'doc5'],
        'predicted_evidence': [['doc1', 0], ['doc2', 1]]
    },
    {
        'label': 'REFUTES',
        'evidence': [
            [(None, None, 'doc6', 0)]
        ],
        'predicted_docids': ['doc6', 'doc7', 'doc8'],
        'predicted_evidence': [['doc6', 0]]
    },
    {
        'label': 'NOT ENOUGH INFO',
        'evidence': [],
        'predicted_docids': ['doc9', 'doc10'],
        'predicted_evidence': []
    },
    {
        'label': 'SUPPORTS',
        'evidence': [
            [(None, None, 'doc11', 0), (None, None, 'doc12', 1)]
        ],
        'predicted_docids': ['doc11', 'doc12', 'doc13'],
        'predicted_evidence': [['doc11', 0], ['doc12', 1]]
    }
]

actual = [
    {
        'label': 'SUPPORTS',
        'evidence': [
            [(None, None, 'doc1', 0), (None, None, 'doc2', 1)],
            [(None, None, 'doc3', 2)]
        ]
    },
    {
        'label': 'REFUTES',
        'evidence': [
            [(None, None, 'doc6', 0)]
        ]
    },
    {
        'label': 'NOT ENOUGH INFO',
        'evidence': []
    },
    {
        'label': 'SUPPORTS',
        'evidence': [
            [(None, None, 'doc11', 0), (None, None, 'doc12', 1)]
        ]
    }
]

ARGS = {
    'predictions': predictions,
    'actual': actual,
    'max_evidence': 5
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, six — 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
fever_sent_only Ran
ran, honoured the contract we drafted
easonnie/semanticRetrievalMRS/src/evaluation/fever_scorer.py
code served (permissive licence) · get_code("bacc307a6797cb32")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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
from collections import Counter

# Create sample predictions and actual data
# Each instance needs:
# - 'label': string (SUPPORTS, REFUTES, or NOT ENOUGH INFO)
# - 'evidence': list of evidence groups, each group is a list of evidence items
#   where each item is [annotation_id, evidence_id, page, line_number]
# - 'predicted_evidence': list of [page, line_number] pairs

predictions = [
    {
        'label': 'SUPPORTS',
        'evidence': [
            [
                [None, None, 'Page1', 0],
                [None, None, 'Page1', 1]
            ]
        ],
        'predicted_evidence': [
            ['Page1', 0],
            ['Page1', 1],
            ['Page2', 5]
        ]
    },
    {
        'label': 'REFUTES',
        'evidence': [
            [
                [None, None, 'Page3', 2]
            ]
        ],
        'predicted_evidence': [
            ['Page3', 2],
            ['Page4', 3]
        ]
    },
    {
        'label': 'NOT ENOUGH INFO',
        'evidence': [],
        'predicted_evidence': [
            ['Page5', 1]
        ]
    },
    {
        'label': 'SUPPORTS',
        'evidence': [
            [
                [None, None, 'Page6', 0]
            ]
        ],
        'predicted_evidence': [
            ['Page7', 1],
            ['Page8', 2]
        ]
    }
]

actual = [
    {
        'label': 'SUPPORTS',
        'evidence': [
            [
                [None, None, 'Page1', 0],
                [None, None, 'Page1', 1]
            ]
        ]
    },
    {
        'label': 'REFUTES',
        'evidence': [
            [
                [None, None, 'Page3', 2]
            ]
        ]
    },
    {
        'label': 'NOT ENOUGH INFO',
        'evidence': []
    },
    {
        'label': 'SUPPORTS',
        'evidence': [
            [
                [None, None, 'Page6', 0]
            ]
        ]
    }
]

ARGS = {
    'predictions': predictions,
    'actual': actual,
    'max_evidence': 5
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, six — 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
filter_ngram Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/build_wiki_rindex.py
code served (permissive licence) · get_code("d8f74d3b75b19f79")
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 bool, 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 unicodedata
import regex

STOPWORDS = {'i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your', 'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', 'her', 'hers', 'herself', 'it', 'its', 'itself', 'they', 'them', 'their', 'theirs', 'themselves', 'what', 'which', 'who', 'whom', 'this', 'that', 'these', 'those', 'am', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had', 'having', 'do', 'does', 'did', 'doing', 'a', 'an', 'the', 'and', 'but', 'if', 'or', 'because', 'as', 'until', 'while', 'of', 'at', 'by', 'for', 'with', 'about', 'against', 'between', 'into', 'through', 'during', 'before', 'after', 'above', 'below', 'to', 'from', 'up', 'down', 'in', 'out', 'on', 'off', 'over', 'under', 'again', 'further', 'then', 'once', 'here', 'there', 'when', 'where', 'why', 'how', 'all', 'any', 'both', 'each', 'few', 'more', 'most', 'other', 'some', 'such', 'no', 'nor', 'not', 'only', 'own', 'same', 'so', 'than', 'too', 'very', 's', 't', 'can', 'will', 'just', 'don', 'should', 'now', 'd', 'll', 'm', 'o', 're', 've', 'y', 'ain', 'aren', 'couldn', 'didn', 'doesn', 'hadn', 'hasn', 'haven', 'isn', 'ma', 'mightn', 'mustn', 'needn', 'shan', 'shouldn', 'wasn', 'weren', 'won', 'wouldn', "'ll", "'re", "'ve", "n't", "'s", "'d", "'m", "''", '``'}

def normalize(text):
    """Resolve different type of unicode encodings."""
    return unicodedata.normalize('NFD', text)

def filter_word(text):
    """Take out english stopwords, punctuation, and compound endings."""
    text = normalize(text)
    if regex.match('^\\p{P}+$', text):
        return True
    if text.lower() in STOPWORDS:
        return True
    return False

def filter_ngram(gram, mode='any'):
    """Decide whether to keep or discard an n-gram.
    Args:
        gram: list of tokens (length N)
        mode: Option to throw out ngram if
          'any': any single token passes filter_word
          'all': all tokens pass filter_word
          'ends': book-ended by filterable tokens
    """
    filtered = [filter_word(w) for w in gram]
    if mode == 'any':
        return any(filtered)
    elif mode == 'all':
        return all(filtered)
    elif mode == 'ends':
        return filtered[0] or filtered[-1]
    else:
        raise ValueError('Invalid mode: %s' % mode)

# Setup test arguments
ARGS = {
    'gram': ['hello', 'world', 'python'],
    'mode': 'any'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
filter_word Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/build_wiki_rindex.py
code served (permissive licence) · get_code("019955faa9c53626")
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 bool, 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 unicodedata
import regex

STOPWORDS = {'i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your', 'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', 'her', 'hers', 'herself', 'it', 'its', 'itself', 'they', 'them', 'their', 'theirs', 'themselves', 'what', 'which', 'who', 'whom', 'this', 'that', 'these', 'those', 'am', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had', 'having', 'do', 'does', 'did', 'doing', 'a', 'an', 'the', 'and', 'but', 'if', 'or', 'because', 'as', 'until', 'while', 'of', 'at', 'by', 'for', 'with', 'about', 'against', 'between', 'into', 'through', 'during', 'before', 'after', 'above', 'below', 'to', 'from', 'up', 'down', 'in', 'out', 'on', 'off', 'over', 'under', 'again', 'further', 'then', 'once', 'here', 'there', 'when', 'where', 'why', 'how', 'all', 'any', 'both', 'each', 'few', 'more', 'most', 'other', 'some', 'such', 'no', 'nor', 'not', 'only', 'own', 'same', 'so', 'than', 'too', 'very', 's', 't', 'can', 'will', 'just', 'don', 'should', 'now', 'd', 'll', 'm', 'o', 're', 've', 'y', 'ain', 'aren', 'couldn', 'didn', 'doesn', 'hadn', 'hasn', 'haven', 'isn', 'ma', 'mightn', 'mustn', 'needn', 'shan', 'shouldn', 'wasn', 'weren', 'won', 'wouldn', "'ll", "'re", "'ve", "n't", "'s", "'d", "'m", "''", '``'}

def normalize(text):
    """Resolve different type of unicode encodings."""
    return unicodedata.normalize('NFD', text)

def filter_word(text):
    """Take out english stopwords, punctuation, and compound endings."""
    text = normalize(text)
    if regex.match('^\\p{P}+$', text):
        return True
    if text.lower() in STOPWORDS:
        return True
    return False

ARGS = {
    'text': 'hello'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
gelu Ran
ran, honoured the contract we drafted
dujiaxin/semanticRetrievalMRS/src/bert_model_variances/bert_maxout_clf.py
pointer only (licence: MIT); the stored copy get_code serves, from shmsw25/qa-hard-em, is pointer only (licence: NONE) · get_code("40e9fee2e0b7e278")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from shmsw25/qa-hard-em, 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_ngrams Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/document_analysis.py
code served (permissive licence) · get_code("7ba88a577b6a2d52")
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, 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.

from nltk import ngrams

ARGS = {
    'terms': ['hello', 'world', 'python', 'code'],
    'poss': ['NN', 'VB', 'NN', 'NN'],
    'n': 2,
    'included_tags': ['NN', 'VB'],
    'as_strings': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — 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
get_raw_text Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/iterative_building.py
code served (permissive licence) · get_code("6d9943f9b30c55eb")
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, 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 re

anchor_pattern = '<(?:a\\b[^>]*>|/a>)'

def remove_all_anchor(input_str):
    return re.sub(anchor_pattern, '', input_str)

def get_raw_text(item):
    article_list = []
    for paragraph in item['text']:
        paragraph_sent_list = []
        for sentence in paragraph:
            paragraph_sent_list.append(remove_all_anchor(sentence))
        article_list.append(paragraph_sent_list)
    return article_list

ARGS = {
    'item': {
        'text': [
            [
                'This is <a href="example.com">a link</a> in the first paragraph.',
                'Here is </a> another sentence with <a>anchor</a> tags.',
            ],
            [
                'Second paragraph <a href="#">first sentence</a> with links.',
                'And a <a>final</a> sentence here.',
            ],
        ]
    }
}
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, ndim 2, 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
get_sentence_tokens Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/rindex.py
code served (permissive licence) · get_code("1df66838eb1b9b17")
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. 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

torch.manual_seed(0)

# Analyze the function:
# - texts: joined with ''.join(), so it's an iterable of strings
# - charoffsets: iterable of lists, where each inner list contains (start, end) tuples
#   that index into whole_text to extract tokens

# Create sample texts
texts = ["hello ", "world"]

# Create character offsets
# whole_text will be "hello world"
# Let's create offsets that extract meaningful tokens
charoffsets = [
    [(0, 5), (6, 11)],  # "hello" and "world"
    [(0, 2)]             # "he" from a new sentence perspective
]

ARGS = {
    "texts": texts,
    "charoffsets": charoffsets
}
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 tuple — a tuple 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
load_from_file Ran
ran; our contract draft was wrong, not the code
easonnie/semanticRetrievalMRS/src/build_rindex/build_rvindex.py
code served (permissive licence) · get_code("ba1043dff5ce07b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 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 tempfile
import json
import os

# Create a temporary file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', encoding='utf-8', delete=False, suffix='.jsonl')

# Write some test data in the expected format
test_data = [
    {"t": "term1", "v": 10},
    {"t": "term2", "v": 20},
    {"t": "term3", "v": 30}
]

for item in test_data:
    temp_file.write(json.dumps(item) + '\n')

temp_file.close()

# Create an empty dictionary to be populated
dict_db = {}

ARGS = {
    'dict_db': dict_db,
    'file': temp_file.name,
    'with_int_type': False,
    'memory_efficient': False,
    'value_type': 'int'
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
tqdm — 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
normalize Ran
ran; our contract draft was wrong, not the code
dujiaxin/semanticRetrievalMRS/src/build_rindex/build_wiki_rindex.py
code served (permissive licence) · get_code("b1c91c9e3a3b88e4")
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 unicodedata

# The normalize function takes a single parameter 'text' which should be a string
# The function uses unicodedata.normalize('NFD', text) to resolve unicode encodings

ARGS = {
    'text': 'café'  # A simple string with unicode characters that can be normalized
}
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
query_raw_text Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/raw_text_db.py
code served (permissive licence) · get_code("0a343f931a447c8e")
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, 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 sqlite3
from unittest.mock import MagicMock

# Create an in-memory SQLite database
conn = sqlite3.connect(':memory:')
cursor = conn.cursor()

# Create a table with sample data
cursor.execute('''
    CREATE TABLE raw_text (
        id INTEGER PRIMARY KEY,
        article_title TEXT,
        p_num INTEGER,
        content TEXT
    )
''')

# Insert sample data
cursor.execute("INSERT INTO raw_text (article_title, p_num, content) VALUES (?, ?, ?)",
               ("Python Programming", 0, "Introduction to Python"))
cursor.execute("INSERT INTO raw_text (article_title, p_num, content) VALUES (?, ?, ?)",
               ("Python Programming", 1, "Advanced Python concepts"))
cursor.execute("INSERT INTO raw_text (article_title, p_num, content) VALUES (?, ?, ?)",
               ("Machine Learning", 0, "ML basics"))

conn.commit()

# Create a cursor for querying
query_cursor = cursor

ARGS = {
    'cursor': query_cursor,
    'article_title': 'Python Programming',
    'p_num': -1,
    'table_name': 'raw_text'
}
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, ndim 2, 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
remove_all_anchor Ran
ran on a synthesized input
dujiaxin/semanticRetrievalMRS/src/build_rindex/iterative_building.py
code served (permissive licence) · get_code("e157daea0cea1f36")
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 re

anchor_pattern = '<(?:a\\b[^>]*>|/a>)'

def remove_all_anchor(input_str):
    return re.sub(anchor_pattern, '', input_str)

ARGS = {
    'input_str': '<a href="https://example.com">Click here</a> and <a class="link">another link</a> some text </a>'
}
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
get_query_result Not yet run
unverified (harvested, no recorded run)
dujiaxin/semanticRetrievalMRS/src/build_rindex/bm25.py
code served (permissive licence) · get_code("41f0dc9c6108d5df")
How it ran

no invocation recorded.

score_BM25 Not yet run
unverified (harvested, no recorded run)
dujiaxin/semanticRetrievalMRS/src/build_rindex/bm25.py
code served (permissive licence) · get_code("d008fe75170fedde")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 5 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 5 later) and 12 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
swish 206 other papers
17 dated earlier, 4 the same month, 185 later · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
gelu 198 other papers
18 dated earlier, 7 the same month, 173 later · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
normalize 6 other papers
6 later
2021.acl-long.164 (2021 (year only))
BERTAC: Enhancing Transformer-based Language Models with Adversarially Pretrained Convolutional Neural Networks
2106.05707 (2021-06)
FEVEROUS: Fact Extraction and VERification Over Unstructured and Structured information
2109.08535 (2021-09)
Simple Entity-Centric Questions Challenge Dense Retrievers
and 3 more not named here
compute_K 1 other paper
1 later
2020.acl-demos.12 (2020 (year only))
Multilingual Universal Sentence Encoder for Semantic Retrieval
score_BM25 1 other paper
1 later
2020.acl-demos.12 (2020 (year only))
Multilingual Universal Sentence Encoder for Semantic Retrieval

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

Machine Reading at Scale (MRS) is a challenging task in which a system is given an input query and is asked to produce a precise output by "reading" information from a large knowledge base. The task has gained popularity with its natural combination of information retrieval (IR) and machine comprehension (MC). Advancements in representation learning have led to separated progress in both IR and MC; however, very few studies have examined the relationship and combined design of retrieval and comprehension at different levels of granularity, for development of MRS systems. In this work, we give general guidelines on system design for MRS by proposing a simple yet effective pipeline system with special consideration on hierarchical semantic retrieval at both paragraph and sentence level, and their potential effects on the downstream task. The system is evaluated on both fact verification and open-domain multihop QA, achieving state-of-the-art results on the leaderboard test sets of both FEVER and HOTPOTQA. To further demonstrate the importance of semantic retrieval, we present ablation and analysis studies to quantify the contribution of neural retrieval modules at both paragraph-level and sentence-level, and illustrate that intermediate semantic retrieval modules are vital for not only effectively filtering upstream information and thus saving downstream computation, but also for shaping upstream data distribution and providing better data for downstream modeling. Code/data made publicly available at: https://github.com/easonnie/semanticRetrievalMRS

For agents

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

get_harvested_code_for_paper("1909.08041")
get_code_for_paper("1909.08041")
have("1909.08041")

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

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

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

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

Connect an agent — have() is free.