SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1408.5882 · EMNLP · 2014

Convolutional Neural Networks for Sentence Classification

arXiv · PDF · Open in the Atlas

Code that ran

53 of 77 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; 6 honoured the contract we drafted, 1 violated it and 30 have no contract verdict; 16 failures of our instrument; 24 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-24; 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/1408.5882.json · badge: /api/ran/1408.5882.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
yschoi-nisp/AI-Grand-Challenge-2020 community (classifier label)
classifier basis not recorded on the link
12 ran · 2 no recorded run
piyush2896/CNN-Text-Classifier community (classifier label)
classifier basis not recorded on the link
7 ran · 7 no recorded run
usama6832/attention_model extension (classifier label)
classifier basis: classifier_2025
4 ran · 2 no recorded run
rainorangelemon/TextCNN-with-Attention community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
Nirvanabc/sentence_classification reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
delldu/TextCNN community (classifier label)
classifier basis not recorded on the link
2 ran · 3 no recorded run
wy-ei/Text-CNN community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
ddajing/multilayer-cnn-text-classification community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
chiemenz/AzureML-Sentiment-Classification-and-Model-Deployment community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
ShindongLee/Sentence_Classifier_CNN community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
alexander-rakhlin/CNN-for-Sentence-Classification-in-Keras community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
audqhsid/-Review-CNN-for-Sentence-Classification reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
Shawn1993/cnn-text-classification-pytorch community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
svjan5/CNN-for-text-classification reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
shagunsodhani/CNN-Sentence-Classifier community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
inspirehep/magpie community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
gaussic/text-classification-cnn-rnn reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
SeonbeomKim/TensorFlow-TextCNN reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
kh-kim/simple-ntc reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
TobiasLee/Text-Classification reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/modeling.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
assert_and_compile_args Ran
ran on a synthesized input
piyush2896/CNN-Text-Classifier/util.py
code served (permissive licence) · get_code("e46bdc997c311e22")
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
import os
import tempfile

# Create temporary directory and files
temp_dir = tempfile.mkdtemp()
embedding_dir = tempfile.mkdtemp()

# Create a minimal embedding file
embedding_file = os.path.join(embedding_dir, "embeddings.txt")
with open(embedding_file, 'w', encoding='utf-8') as f:
    f.write("word1 " + " ".join(str(x) for x in np.random.randn(100).astype(np.float32)) + "\n")
    f.write("word2 " + " ".join(str(x) for x in np.random.randn(100).astype(np.float32)) + "\n")
    f.write("word3 " + " ".join(str(x) for x in np.random.randn(100).astype(np.float32)) + "\n")

# Create text and label files in temp directory
text_file = os.path.join(temp_dir, "texts.txt")
with open(text_file, 'w') as f:
    f.write("sample text")

label_file = os.path.join(temp_dir, "labels.txt")
with open(label_file, 'w') as f:
    f.write("0")

# Create hyperparameter file
h_file = os.path.join(temp_dir, "hyperparams.txt")
with open(h_file, 'w') as f:
    f.write("0.001\n")
    f.write("10\n")
    f.write("32\n")
    f.write("cpu\n")

# Create args object
class Args:
    def __init__(self):
        self.src = temp_dir
        self.e_src = embedding_file
        self.model_type = 'rand'
        self.s_len = 50
        self.dim = 100
        self.nb_words = 1000
        self.ckpt_path = os.path.join(temp_dir, "checkpoint.pt")
        self.h_file = h_file

ARGS = {
    'args': Args()
}
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
batches_generator Ran
ran on a synthesized input
piyush2896/CNN-Text-Classifier/nn/preprocessor.py
code served (permissive licence) · get_code("c62648a11b00a100")
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 generator. 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 numpy as np

np.random.seed(0)

# Create small numpy arrays for X_train and Y_train
X_train = np.random.randn(10, 4).astype(np.float32)
Y_train = np.random.randint(0, 2, size=(10,)).astype(np.int32)

ARGS = {
    "X_train": X_train,
    "Y_train": Y_train,
    "batch_size": 3,
    "shuffle": True,
}
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 generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
build_dict Ran
ran on a synthesized input
wy-ei/Text-CNN/data.py
code served (permissive licence) · get_code("31bacc027a1637a7")
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 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 os

# Create temporary files with sample text data
temp_dir = tempfile.mkdtemp()
file1 = os.path.join(temp_dir, "file1.txt")
file2 = os.path.join(temp_dir, "file2.txt")

with open(file1, 'w', encoding='utf-8') as f:
    f.write("hello world hello\n")
    f.write("foo bar baz\n")

with open(file2, 'w', encoding='utf-8') as f:
    f.write("hello there world\n")
    f.write("foo foo bar\n")

files = [file1, file2]
num_words = 5000

ARGS = {
    'files': files,
    'num_words': num_words
}
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 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
build_vocab Ran
ran on a synthesized input
alexander-rakhlin/CNN-for-Sentence-Classification-in-Keras/data_helpers.py
code served (permissive licence) · get_code("b32b5833493d607a")
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 itertools
from collections import Counter

# The function takes sentences as input
# sentences should be an iterable of iterables of words (strings)
# The function chains all words together and counts them

# Create a small example with distinct word frequencies
sentences = [
    ['hello', 'world', 'hello'],
    ['foo', 'bar', 'world'],
    ['baz', 'hello', 'foo']
]

ARGS = {
    'sentences': sentences
}
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
cached_path Ran
ran; our contract draft was wrong, not the code
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/file_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from sejong-rcv/TAME, is pointer only (licence: NONE) · get_code("349d780dd4a89a37")
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 sejong-rcv/TAME, 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.

clean_review Ran
ran on a synthesized input
rainorangelemon/TextCNN-with-Attention/clean.py
code served (permissive licence) · get_code("6e49b503ffe317d7")
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 string

punctuation = set(string.punctuation)

def clean_review(review):
    return ''.join([c if c not in punctuation else ' ' + c + ' ' for c in review.lower()])

# Construct arguments for clean_review
review_text = "Hello, World! This is a test review. It has punctuation!!!"

ARGS = {
    "review": review_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 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
clean_str Ran
ran; our contract draft was wrong, not the code
audqhsid/-Review-CNN-for-Sentence-Classification/CNNforSentence/data_helpers.py
pointer only (licence: NONE) · get_code("efe1a86fd9a2468e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, audqhsid/-Review-CNN-for-Sentence-Classification 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.

clean_str Ran
ran on a synthesized input
Shawn1993/cnn-text-classification-pytorch/mydatasets.py
code served (permissive licence) · get_code("8ebb1beb61837fb1")
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

def clean_str(string):
    """
    Tokenization/string cleaning for all datasets except for SST.
    Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py
    """
    string = re.sub("[^A-Za-z0-9(),!?\\'\\`]", ' ', string)
    string = re.sub("\\'s", " 's", string)
    string = re.sub("\\'ve", " 've", string)
    string = re.sub("n\\'t", " n't", string)
    string = re.sub("\\'re", " 're", string)
    string = re.sub("\\'d", " 'd", string)
    string = re.sub("\\'ll", " 'll", string)
    string = re.sub(',', ' , ', string)
    string = re.sub('!', ' ! ', string)
    string = re.sub('\\(', ' \\( ', string)
    string = re.sub('\\)', ' \\) ', string)
    string = re.sub('\\?', ' \\? ', string)
    string = re.sub('\\s{2,}', ' ', string)
    return string.strip()


ARGS = {
    "string": "Hello, world! This is a test (with special chars) and it's great? Don't worry."
}
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
clean_str Ran
ran on a synthesized input
ddajing/multilayer-cnn-text-classification/data_helpers.py
code served (permissive licence) · get_code("efc3a77905da7a9d")
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

def clean_str(string, TREC=False):
    """
    Tokenization/string cleaning for all datasets except for SST.
    Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py
    """
    string = re.sub("[^A-Za-z0-9(),!?\\'\\`]", ' ', string)
    string = re.sub("\\'s", " 's", string)
    string = re.sub("\\'ve", " 've", string)
    string = re.sub("n\\'t", " n't", string)
    string = re.sub("\\'re", " 're", string)
    string = re.sub("\\'d", " 'd", string)
    string = re.sub("\\'ll", " 'll", string)
    string = re.sub(',', ' , ', string)
    string = re.sub('!', ' ! ', string)
    string = re.sub('\\(', ' \\( ', string)
    string = re.sub('\\)', ' \\) ', string)
    string = re.sub('\\?', ' \\? ', string)
    string = re.sub('\\s{2,}', ' ', string)
    return string.strip().lower()

ARGS = {
    'string': "Hello, world! This is a test. Can't you see? (Yes)",
    'TREC': False
}
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
collate_fn Ran
ran on a synthesized input
Shawn1993/cnn-text-classification-pytorch/mydatasets.py
code served (permissive licence) · get_code("dfd16b852a1f08c1")
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

torch.manual_seed(0)

# The function expects batch to be an iterable of (text, label) tuples
# where text is a tensor and label is a tensor
# It will unzip them, pad the texts, and stack the labels

batch = [
    (torch.tensor([1, 2, 3], dtype=torch.long), torch.tensor(0, dtype=torch.long)),
    (torch.tensor([4, 5], dtype=torch.long), torch.tensor(1, dtype=torch.long)),
]

ARGS = {
    "batch": batch,
    "min_len": 5,
}
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 — 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
compute_ratio Ran
ran; our contract draft was wrong, not the code
svjan5/CNN-for-text-classification/SVM/SVM-1ofVEncoding.py
pointer only (licence: NONE) · get_code("1f0857ef07d36305")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, svjan5/CNN-for-text-classification 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.

concat Ran
ran on a synthesized input
piyush2896/CNN-Text-Classifier/nn/layers.py
code served (permissive licence) · get_code("4df1c013c4cd5872")
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 EagerTensor, ndim 2, dtype family float, shape (2, 12) 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 tensorflow as tf
import numpy as np

# Create small TensorFlow tensors with distinct sizes
tensor1 = tf.constant(np.random.randn(2, 3), dtype=tf.float32)
tensor2 = tf.constant(np.random.randn(2, 4), dtype=tf.float32)
tensor3 = tf.constant(np.random.randn(2, 5), dtype=tf.float32)

tensor_list = [tensor1, tensor2, tensor3]

ARGS = {
    "tensor_list": tensor_list,
    "axis": -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 12) — shape (2, 12) 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
convert_tokens_to_features Ran
ran on a synthesized input
yschoi-nisp/AI-Grand-Challenge-2020/BERT_total.py
code served (permissive licence) · get_code("728fbd506ea36d0d")
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.

import torch
import numpy as np

class MockTokenizer:
    def convert_tokens_to_ids(self, tokens):
        """Mock tokenizer that converts tokens to ids."""
        # Simple mock: assign each unique token a unique id
        token_to_id = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[PAD]': 0,
        }
        ids = []
        next_id = 1000
        for token in tokens:
            if token in token_to_id:
                ids.append(token_to_id[token])
            else:
                if token not in token_to_id:
                    token_to_id[token] = next_id
                    next_id += 1
                ids.append(token_to_id[token])
        return ids

# Create minimal valid inputs
tokenizer = MockTokenizer()

tokens_list = [
    {
        'tokens': ['hello', 'world', 'test'],
        'label': 0
    },
    {
        'tokens': ['foo', 'bar'],
        'label': 1
    }
]

max_seq_length = 8

ARGS = {
    'tokens_list': tokens_list,
    'max_seq_length': max_seq_length,
    'tokenizer': tokenizer
}
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 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_tokens_to_features_eval Ran
ran on a synthesized input
yschoi-nisp/AI-Grand-Challenge-2020/BERT_total.py
code served (permissive licence) · get_code("9cf15995db9f9f06")
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
import numpy as np

class SimpleTokenizer:
    """Minimal tokenizer that converts tokens to IDs."""
    def __init__(self):
        self.vocab = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[PAD]': 0,
            'hello': 7592,
            'world': 2088,
            'test': 3231,
            'sample': 4571,
            'token': 1858,
            'data': 1178,
        }
    
    def convert_tokens_to_ids(self, tokens):
        """Convert tokens to their corresponding IDs."""
        ids = []
        for token in tokens:
            ids.append(self.vocab.get(token, 100))  # 100 as unknown token ID
        return ids

# Create minimal tokenizer
tokenizer = SimpleTokenizer()

# Create tokens_list with sample data
tokens_list = [
    {
        'tokens': ['hello', 'world', 'test', 'sample'],
        'label': 0
    },
    {
        'tokens': ['token', 'data', 'hello', 'world', 'test'],
        'label': 1
    }
]

# Define ARGS
ARGS = {
    'tokens_list': tokens_list,
    'max_seq_length': 10,
    'tokenizer': tokenizer,
    'overlap_size_token': 2
}
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, 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
cost_weight_for_imbalanced_label Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SeonbeomKim/TensorFlow-TextCNN/SST_train.py
pointer only (licence: NONE) · get_code("1826f73b65b1976e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SeonbeomKim/TensorFlow-TextCNN 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.

create_mask Ran
ran on a synthesized input
rainorangelemon/TextCNN-with-Attention/model.py
code served (permissive licence) · get_code("3c77d69fa7310478")
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 3, dtype family float, shape (2, 1, 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)

# Create a small input tensor with shape (batch_size=2, seq_len=4)
# Values will be token IDs, with some padding tokens
input_tensor = torch.tensor([
    [1, 2, 3, 0],
    [5, 0, 7, 8]
], dtype=torch.long)

# Define pad_id
pad_id = 0

ARGS = {
    "input": input_tensor,
    "pad_id": pad_id
}
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 3, dtype family float, shape (2, 1, 4) — shape (2, 1, 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
dropout Ran
ran on a synthesized input
piyush2896/CNN-Text-Classifier/nn/layers.py
code served (permissive licence) · get_code("09cb65a28eb46830")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a small TensorFlow tensor for testing
tensor = tf.constant([[1.0, 2.0, 3.0, 4.0],
                      [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# Set keep_prob to 0.5 (standard dropout rate)
keep_prob = 0.5

# Set name parameter to None for one case
name = None

ARGS = {
    "tensor": tensor,
    "keep_prob": keep_prob,
    "name": name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
filename_to_url Ran
ran; our contract draft was wrong, not the code
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/file_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from sejong-rcv/TAME, is pointer only (licence: NONE) · get_code("db0ac56aaf6e35e6")
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 sejong-rcv/TAME, 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.

gelu Ran
ran, honoured the contract we drafted
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/modeling.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_W Ran
ran; our contract draft was wrong, not the code
usama6832/attention_model/process_sst1_data.py
pointer only (licence: NONE) · get_code("8e159fcba115372b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, usama6832/attention_model 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_all_answers Ran
ran on a synthesized input
inspirehep/magpie/magpie/utils.py
code served (permissive licence) · get_code("8dc8d3a14cde192f")
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 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 os
import io

# Create a temporary directory with test data
temp_dir = tempfile.mkdtemp()

# Create some test .lab files
lab_file_1 = os.path.join(temp_dir, "doc1.lab")
with io.open(lab_file_1, 'w') as f:
    f.write("answer1\n")
    f.write("answer2\n")
    f.write("answer3\n")

lab_file_2 = os.path.join(temp_dir, "doc2.lab")
with io.open(lab_file_2, 'w') as f:
    f.write("answer1\n")
    f.write("answer4\n")

lab_file_3 = os.path.join(temp_dir, "doc3.lab")
with io.open(lab_file_3, 'w') as f:
    f.write("answer2\n")
    f.write("answer5\n")

# Create the arguments dictionary
ARGS = {
    'data_dir': temp_dir,
    'filtered_by': None
}
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 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
get_clones Ran
ran on a synthesized input
rainorangelemon/TextCNN-with-Attention/model.py
code served (permissive licence) · get_code("5cb79ca7ceefc156")
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 ModuleList. 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 torch.nn as nn
import copy

torch.manual_seed(0)

# Create a simple module to clone
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

module = SimpleModule()
N = 5

ARGS = {
    "module": module,
    "N": N
}
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 ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 1 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_dict Ran
ran; our contract draft was wrong, not the code
Nirvanabc/sentence_classification/prepare_data.py
pointer only (licence: NONE) · get_code("74bca835aa136142")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Nirvanabc/sentence_classification 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_idx_from_sent Ran
ran, honoured the contract we drafted
usama6832/attention_model/mr_data.py
pointer only (licence: NONE) · get_code("2777a9ed50134acd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, usama6832/attention_model 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_polarity_dictionary Ran
ran on a synthesized input
chiemenz/AzureML-Sentiment-Classification-and-Model-Deployment/rating_ml_modules/featurization/word_sentiment_polarity/sentiment_polarity.py
code served (permissive licence) · get_code("99c0dc46fd15bb10")
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 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 os
import tempfile

# Create a temporary directory with TSV files for the polarity dictionary
temp_dir = tempfile.mkdtemp()

# Create a sample TSV file with sentiment polarity data
# Format: token\tpolarity (where polarity is 0 for negative, 1 for positive)
tsv_content_1 = "good\t1.0\nbad\t0.0\nexcellent\t1.0\nterrible\t0.0\n"
tsv_file_1 = os.path.join(temp_dir, "polarity_dict.tsv")
with open(tsv_file_1, 'w', encoding='utf-8') as f:
    f.write(tsv_content_1)

# Create another TSV file to test multiple file handling
tsv_content_2 = "wonderful\t1.0\nawful\t0.0\namazing\t1.0\n"
tsv_file_2 = os.path.join(temp_dir, "additional_polarity.tsv")
with open(tsv_file_2, 'w', encoding='utf-8') as f:
    f.write(tsv_content_2)

# Create a non-TSV file to ensure it's ignored
other_file = os.path.join(temp_dir, "readme.txt")
with open(other_file, 'w', encoding='utf-8') as f:
    f.write("This should be ignored")

ARGS = {
    "directory_path": temp_dir
}
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 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
get_time_dif Ran
ran; our contract draft was wrong, not the code
gaussic/text-classification-cnn-rnn/run_cnn.py
code served (permissive licence) · get_code("d9e00c99bc3b43d2")
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 timedelta. 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 time

# Simulate a start time from a few seconds ago
start_time = time.time() - 5.5

ARGS = {
    'start_time': start_time
}
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 timedelta — a timedelta output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a timedelta 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
label_token Ran
ran on a synthesized input
delldu/TextCNN/data.py
code served (permissive licence) · get_code("9e8508cb98e5104b")
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.

import torch

def label_token(x):
    return [x.replace('__label__', '')]

ARGS = {
    'x': '__label__example_text'
}
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 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
load_data Ran
ran on a synthesized input
ddajing/multilayer-cnn-text-classification/data_helpers.py
code served (permissive licence) · get_code("a59a82e26e9459f2")
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 tempfile
import os

# Create temporary files for testing
temp_dir = tempfile.mkdtemp()

# Create a negative examples file
neg_file = os.path.join(temp_dir, "neg.txt")
with open(neg_file, 'w', encoding='utf-8') as f:
    f.write("This movie is terrible and awful!\n")
    f.write("I hated this film, it was so bad.\n")

# Create a positive examples file
pos_file = os.path.join(temp_dir, "pos.txt")
with open(pos_file, 'w', encoding='utf-8') as f:
    f.write("This movie is amazing and wonderful!\n")
    f.write("I loved this film, it was so good.\n")

ARGS = {
    'neg_file': neg_file,
    'pos_file': pos_file
}
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 — 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_data_and_labels Ran
ran; our contract draft was wrong, not the code
audqhsid/-Review-CNN-for-Sentence-Classification/CNNforSentence/data_helpers.py
pointer only (licence: NONE) · get_code("24886408b62be99a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, audqhsid/-Review-CNN-for-Sentence-Classification 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.

load_dataset Ran
ran on a synthesized input
piyush2896/CNN-Text-Classifier/util.py
code served (permissive licence) · get_code("506f16da45fa7bd5")
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 os
import tempfile

# Create a temporary directory with test files
temp_dir = tempfile.mkdtemp()

# Create input.txt with some sample text
with open(os.path.join(temp_dir, 'input.txt'), 'w') as f:
    f.write("hello world\n")
    f.write("foo bar\n")
    f.write("test example\n")

# Create label.txt with some sample labels
with open(os.path.join(temp_dir, 'label.txt'), 'w') as f:
    f.write("positive\n")
    f.write("negative\n")
    f.write("positive\n")

ARGS = {
    'path': temp_dir,
    'text_file_name': 'input.txt',
    'label_file_name': 'label.txt'
}
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 — 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_vocab Ran
ran; our contract draft was wrong, not the code
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/tokenization.py
code served (permissive licence) · get_code("fb95c4b13cdf89a2")
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 OrderedDict. 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 collections
import tempfile
import os

# Create a temporary vocabulary file
temp_dir = tempfile.mkdtemp()
vocab_file = os.path.join(temp_dir, "vocab.txt")

# Write some sample tokens to the vocabulary file
with open(vocab_file, 'w', encoding='utf-8') as f:
    f.write("[PAD]\n")
    f.write("[UNK]\n")
    f.write("[CLS]\n")
    f.write("[SEP]\n")
    f.write("the\n")
    f.write("quick\n")
    f.write("brown\n")
    f.write("fox\n")

ARGS = {
    "vocab_file": vocab_file
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
load_vocab Ran
ran on a synthesized input
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/tokenization_morp.py
code served (permissive licence) · get_code("90d3ee4851872058")
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 OrderedDict. 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 vocab file
temp_dir = tempfile.mkdtemp()
vocab_file = os.path.join(temp_dir, 'vocab.txt')

# Write a sample vocab file with various tokens
with open(vocab_file, 'w', encoding='utf-8') as f:
    f.write('[PAD]\n')
    f.write('[UNK]\n')
    f.write('[CLS]\n')
    f.write('[SEP]\n')
    f.write('the\n')
    f.write('quick\n')
    f.write('brown\n')
    f.write('fox\n')
    f.write('n_iters=100\n')  # This line should be skipped
    f.write('max_length=512\n')  # This line should be skipped
    f.write('jumps\n')
    f.write('over\n')

ARGS = {
    'vocab_file': vocab_file
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
longest_sentence Ran
ran on a synthesized input
ShindongLee/Sentence_Classifier_CNN/preprocess.py
code served (permissive licence) · get_code("795300f6734869ed")
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 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 os
import tempfile

# Create a temporary directory with the required files
temp_dir = tempfile.mkdtemp()

# Create rt-polarity.pos file with sample positive sentences
pos_content = """this is a great movie
i really enjoyed it
absolutely fantastic performance
"""
pos_file = os.path.join(temp_dir, 'rt-polarity.pos')
with open(pos_file, 'w', encoding='latin-1') as f:
    f.write(pos_content)

# Create rt-polarity.neg file with sample negative sentences
neg_content = """this is terrible
i hated it so much
worst film ever made in the history of cinema
"""
neg_file = os.path.join(temp_dir, 'rt-polarity.neg')
with open(neg_file, 'w', encoding='latin-1') as f:
    f.write(neg_content)

ARGS = {
    'path': temp_dir
}
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 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
make_idx_data_cv Ran
ran, honoured the contract we drafted
usama6832/attention_model/mr_data.py
pointer only (licence: NONE) · get_code("c3873605307a3c77")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, usama6832/attention_model 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.

make_idx_data_cv_org_text Ran
ran; our contract draft was wrong, not the code
usama6832/attention_model/mr_data.py
pointer only (licence: NONE) · get_code("781a7c253f13fdb1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, usama6832/attention_model 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.

multiclass_accuracy Ran
ran on a synthesized input
piyush2896/CNN-Text-Classifier/nn/metrics.py
code served (permissive licence) · get_code("bdb736f7b92a0ad3")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small test tensors
batch_size = 2
num_classes = 4

# Create one-hot encoded labels (batch_size x num_classes)
labels_np = np.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0]
], dtype=np.float32)

# Create prediction logits (batch_size x num_classes)
# These should have the same argmax as labels for a correct prediction
preds_np = np.array([
    [2.1, 0.5, 0.3, 0.1],
    [0.1, 1.9, 0.5, 0.2]
], dtype=np.float32)

# Convert to TensorFlow tensors
labels = tf.constant(labels_np)
preds = tf.constant(preds_np)

ARGS = {
    'labels': labels,
    'preds': preds
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
normalize Ran
ran, violated the contract we drafted
Nirvanabc/sentence_classification/prepare_data.py
pointer only (licence: NONE) · get_code("e55c5e84d71ce43a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Nirvanabc/sentence_classification 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.

pad_sentences Ran
ran on a synthesized input
alexander-rakhlin/CNN-for-Sentence-Classification-in-Keras/data_helpers.py
code served (permissive licence) · get_code("8f5471ca03ed0239")
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 torch
import numpy as np

torch.manual_seed(0)

# Based on the function signature and body:
# - sentences: a list of sequences (each sequence is a list of strings/tokens)
# - padding_word: a string to use for padding (has default value)

# The function iterates through sentences, gets their lengths,
# finds the max length, and pads each sentence to that length.

# Create sample sentences (lists of tokens)
sentences = [
    ["hello", "world"],
    ["foo", "bar", "baz", "qux"],
    ["test"]
]

ARGS = {
    "sentences": sentences,
    "padding_word": "<PAD/>"
}
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 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
predict Ran
ran on a synthesized input
wy-ei/Text-CNN/trainer.py
code served (permissive licence) · get_code("c5beea5bfbce4121")
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 ndarray, ndim 1, dtype family int, shape (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
import torch.nn as nn

torch.manual_seed(0)

# Define a simple model that accepts input and returns scores for classification
class SimpleClassifier(nn.Module):
    def __init__(self, input_dim, num_classes):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

# Create model
model = SimpleClassifier(input_dim=4, num_classes=3)

# Create a simple data loader: list of (x, y) tuples
# Each batch: x is shape (2, 4), y is shape (2,)
dl = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([2, 0])),
]

# Device (CPU only)
device = torch.device('cpu')

ARGS = {
    'model': model,
    'dl': dl,
    'device': device,
}
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 ndarray, ndim 1, dtype family int, shape (4,) — shape (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
read_glove_vectors Ran
ran on a synthesized input
shagunsodhani/CNN-Sentence-Classifier/app/reader/filereader.py
code served (permissive licence) · get_code("8dc6cef357628e1b")
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 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 numpy as np
import tempfile
import os

# Create a temporary GloVe vector file
temp_dir = tempfile.mkdtemp()
glove_file = os.path.join(temp_dir, "glove_test.txt")

# Write sample GloVe vectors to the temporary file
with open(glove_file, 'w') as f:
    f.write("the 0.1 0.2 0.3 0.4\n")
    f.write("hello 0.5 0.6 0.7 0.8\n")
    f.write("world 0.9 1.0 1.1 1.2\n")

ARGS = {
    "glove_vector_path": glove_file
}
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 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
read_input_data Ran
ran on a synthesized input
shagunsodhani/CNN-Sentence-Classifier/app/reader/filereader.py
code served (permissive licence) · get_code("0402070ef0b2c2b3")
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 os
import tempfile
import shutil

# Create a temporary directory with test data
temp_dir = tempfile.mkdtemp()

# Create input.txt with sample texts
input_txt_path = os.path.join(temp_dir, 'input.txt')
with open(input_txt_path, 'w') as f:
    f.write("This is the first text\n")
    f.write("This is the second text\n")
    f.write("This is the third text\n")

# Create label.txt with sample labels
label_txt_path = os.path.join(temp_dir, 'label.txt')
with open(label_txt_path, 'w') as f:
    f.write("positive\n")
    f.write("negative\n")
    f.write("positive\n")

ARGS = {
    'input_data_path': temp_dir
}
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 — 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
read_text Ran
ran, honoured the contract we drafted
kh-kim/simple-ntc/classify.py
pointer only (licence: NONE) · get_code("aa2e11b6e900e44a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kh-kim/simple-ntc 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.

read_word_and_its_vec Ran
ran; our contract draft was wrong, not the code
Nirvanabc/sentence_classification/prepare_data.py
pointer only (licence: NONE) · get_code("81912d07d41ad566")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Nirvanabc/sentence_classification 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.

relabel_reviews Ran
ran on a synthesized input
chiemenz/AzureML-Sentiment-Classification-and-Model-Deployment/rating_ml_modules/featurization/preprocessing.py
code served (permissive licence) · get_code("4677d82ba2d19519")
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 DataFrame. 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 pandas as pd

# Create a sample review dataframe with Rating column
review_dataframe = pd.DataFrame({
    'Review': [
        'Great hotel, highly recommend!',
        'Average experience',
        'Terrible, would not return',
        'Excellent service and cleanliness'
    ],
    'Rating': [5, 3, 1, 4]
})

# Create the rating to sentiment mapping
# Maps ratings 1-5 to sentiment buckets: negative (0), neutral (1), positive (2)
rating_2_sentiment = {
    1: 0,  # negative
    2: 0,  # negative
    3: 1,  # neutral
    4: 2,  # positive
    5: 2   # positive
}

ARGS = {
    'review_dataframe': review_dataframe,
    'rating_2_sentiment': rating_2_sentiment
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
text_token Ran
ran on a synthesized input
delldu/TextCNN/data.py
code served (permissive licence) · get_code("55365320fd689119")
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.

import torch
import numpy as np

torch.manual_seed(0)

def text_token(x):
    return [w for w in x.split(' ') if len(w) > 0]

ARGS = {
    'x': 'hello world this is a test'
}
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 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
tokenize Ran
ran; our contract draft was wrong, not the code
svjan5/CNN-for-text-classification/SVM/SVM-1ofVEncoding.py
pointer only (licence: NONE) · get_code("79c1b7c0f8e87a6b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, svjan5/CNN-for-text-classification 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.

train_test_split Ran
ran on a synthesized input
piyush2896/CNN-Text-Classifier/nn/preprocessor.py
code served (permissive licence) · get_code("9239e6af1bbb6e07")
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 numpy as np

# Create small sample data for X and Y
np.random.seed(0)
X = np.random.randn(10, 4)  # 10 samples, 4 features
Y = np.random.randn(10, 3)  # 10 samples, 3 outputs

ARGS = {
    "X": X,
    "Y": Y,
    "shuffle": True,
    "val_size": 0.2,
}
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 — 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
url_to_filename Ran
ran; our contract draft was wrong, not the code
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/file_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from lonePatient/ERNIE-text-classification-pytorch, is pointer only (licence: NONE) · get_code("af64ec220e8bcdbc")
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 lonePatient/ERNIE-text-classification-pytorch, 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.

validate Ran
ran on a synthesized input
ShindongLee/Sentence_Classifier_CNN/validation.py
code served (permissive licence) · get_code("3327aa7527520a84")
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)

# The function expects:
# - classified: a tensor with shape[0] equal to len(answer), 
#   where each element can be indexed and torch.argmax() can be applied
# - answer: a list-like object with len() and indexable elements for comparison

# Create a small classified tensor (batch_size=2, num_classes=4)
# Each row represents logits for a sample, torch.argmax will pick the class
classified = torch.randn(2, 4)

# Create answer list with 2 elements (same as batch size)
# Each element should be a valid class index (0-3)
answer = [0, 2]

ARGS = {
    "classified": classified,
    "answer": answer
}
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
warmup_constant Ran
ran, honoured the contract we drafted
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/optimization.py
pointer only (licence: MIT); the stored copy get_code serves, from Yueeeeeeee/Self-Supervised-QA, is pointer only (licence: NONE) · get_code("e7d542062316094a")
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 Yueeeeeeee/Self-Supervised-QA, 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.

warmup_linear Ran
ran, honoured the contract we drafted
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/optimization.py
code served (permissive licence) · get_code("c58d57224530d17e")
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

torch.manual_seed(0)

# The function warmup_linear takes two parameters:
# - x: a numeric value (float) representing a position/step in training
# - warmup: a float representing the warmup threshold (default 0.002)
# 
# The function uses x and warmup in simple arithmetic comparisons and operations,
# so we just need numeric values.

ARGS = {
    "x": 0.001,
    "warmup": 0.002
}
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 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
whitespace_tokenize Ran
ran; our contract draft was wrong, not the code
yschoi-nisp/AI-Grand-Challenge-2020/pytorch_pretrained_bert/tokenization.py
code served (permissive licence) · get_code("da7295883cd7da14")
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.

import torch
import numpy as np

def whitespace_tokenize(text):
    """Runs basic whitespace cleaning and splitting on a peice of text."""
    text = text.strip()
    if not text:
        return []
    tokens = text.split()
    return tokens

# Setup code
torch.manual_seed(0)

# The function takes a single parameter: text (a string)
# It strips whitespace and splits on whitespace
# We need to provide a valid text string

ARGS = {
    "text": "  hello world this is a test  "
}
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 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
binary_accuracy Not yet run
unverified (harvested, no recorded run)
piyush2896/CNN-Text-Classifier/nn/metrics.py
code served (permissive licence) · get_code("d51abac955ff517c")
How it ran

no invocation recorded.

binary_entropy Not yet run
unverified (harvested, no recorded run)
piyush2896/CNN-Text-Classifier/nn/losses.py
code served (permissive licence) · get_code("d89fbd714915f9e7")
How it ran

no invocation recorded.

compute_word2vec_for_phrase Not yet run
unverified (harvested, no recorded run)
inspirehep/magpie/magpie/base/word2vec.py
code served (permissive licence) · get_code("7b9076aa00b98231")
How it ran

no invocation recorded.

convert_examples_to_tokens Not yet run
unverified (harvested, no recorded run)
yschoi-nisp/AI-Grand-Challenge-2020/BERT_total.py
code served (permissive licence) · get_code("e7ecdb123ea7ddd2")
How it ran

no invocation recorded.

create_embedding_index Not yet run
unverified (harvested, no recorded run)
piyush2896/CNN-Text-Classifier/util.py
code served (permissive licence) · get_code("26dfc0d2a5e7b9e7")
How it ran

no invocation recorded.

eval Not yet run
unverified (harvested, no recorded run)
delldu/TextCNN/model.py
code served (permissive licence) · get_code("dd22129a171b50fb")
How it ran

no invocation recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
wy-ei/Text-CNN/trainer.py
code served (permissive licence) · get_code("9a0485a6887c7747")
How it ran

no invocation recorded.

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("1408.5882").

Also present in other papers' code

Of 77 samples lifted from this paper's linked repositories, 77 carry a function identity and 0 do not. Of the 77 distinct functions with an identity, 15 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 15 later) and 62 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
206 later · 44 only as an assembly brick
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
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 203 more not named here
gelu 198 other papers
198 later · 32 only as an assembly brick
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
1902.00751 (2019-02)
Parameter-Efficient Transfer Learning for NLP
and 195 more not named here
whitespace_tokenize 43 other papers
43 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
and 40 more not named here
warmup_constant 28 other papers
28 later
1903.09588 (2019-03)
Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
1906.05807 (2019-06)
Real-Time Open-Domain Question Answering with Dense-Sparse Phrase Index
and 25 more not named here
url_to_filename 20 other papers
20 later · 3 only as an assembly brick
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
1909.11059 (2019-09)
Unified Vision-Language Pre-Training for Image Captioning and VQA
and 17 more not named here
warmup_linear 19 other papers
19 later
1803.03376 (2018-03)
Learning Approximate Inference Networks for Structured Prediction
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1903.09588 (2019-03)
Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence
and 16 more not named here
cached_path 17 other papers
17 later · 3 only as an assembly brick
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
1909.11059 (2019-09)
Unified Vision-Language Pre-Training for Image Captioning and VQA
and 14 more not named here
warmup_cosine 17 other papers
17 later
1903.09588 (2019-03)
Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
1906.05807 (2019-06)
Real-Time Open-Domain Question Answering with Dense-Sparse Phrase Index
and 14 more not named here
filename_to_url 13 other papers
13 later
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
1909.11059 (2019-09)
Unified Vision-Language Pre-Training for Image Captioning and VQA
2109.00590 (2021-09)
WebQA: Multihop and Multimodal QA
and 10 more not named here
load_vocab 11 other papers
11 later
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
2004.07453 (2020-04)
The Right Tool for the Job: Matching Model and Instance Complexities
2010.06138 (2020-10)
Incorporating BERT into Parallel Sequence Decoding with Adapters
and 8 more not named here
clean_str 9 other papers
9 later
1510.03820 (2015-10)
A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification
1608.06019 (2016-08)
Domain Separation Networks
1703.03130 (2017-03)
A Structured Self-attentive Sentence Embedding
and 6 more not named here
get_time_dif 3 other papers
3 later
1509.01626 (2015-09)
Character-level Convolutional Networks for Text Classification *
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
2205.15485 (2022-05)
FinBERT-MRC: financial named entity recognition using BERT under the machine reading comprehension paradigm
linear 2 other papers
2 later
1810.05334 (2018-10)
IndoSum: A New Benchmark Dataset for Indonesian Text Summarization
1908.07195 (2019-08)
ARAML: A Stable Adversarial Training Framework for Text Generation
feed_data 1 other paper
1 later
1509.01626 (2015-09)
Character-level Convolutional Networks for Text Classification *
load_data_and_labels 1 other paper
1 later
1510.03820 (2015-10)
A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification

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-24.

Repositories linked to this paper

More are linked than shown here.

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

Abstract

We report on a series of experiments with convolutional neural networks (CNN) trained on top of pre-trained word vectors for sentence-level classification tasks. We show that a simple CNN with little hyperparameter tuning and static vectors achieves excellent results on multiple benchmarks. Learning task-specific vectors through fine-tuning offers further gains in performance. We additionally propose a simple modification to the architecture to allow for the use of both task-specific and static vectors. The CNN models discussed herein improve upon the state of the art on 4 out of 7 tasks, which include sentiment analysis and question classification.

For agents

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

get_harvested_code_for_paper("1408.5882")
get_code_for_paper("1408.5882")
have("1408.5882")

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

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

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

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

Connect an agent — have() is free.