SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.11462 · 2018

OpenNMT: Neural Machine Translation Toolkit

arXiv · PDF · Open in the Atlas

Code that ran

20 of 29 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; 1 honoured the contract we drafted, 1 violated it and 18 have no contract verdict; 0 failures of our instrument; 9 no recorded run), measured 2026-11-23; 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/1805.11462.json · badge: /api/ran/1805.11462.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
rsennrich/nematus canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
deep-spin/OpenNMT-entmax community (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
Helsinki-NLP/OpenNMT-py community (classifier label)
classifier basis not recorded on the link
4 ran · 4 no recorded run
Unbabel/OpenNMT-py community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
Henry-E/OpenNMT-py community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_dropout_mask Ran
ran on a synthesized input
rsennrich/nematus/nematus/layers.py
code served (permissive licence) · get_code("f16190b043ddad1d")
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

# Test case 1: 2D input without mask (mask is None)
x_2d = tf.constant(np.random.randn(2, 4).astype(np.float32))
mask_none = None
input_is_3d_false = False

# Test case 2: 2D input with mask
x_2d_with_mask = tf.constant(np.random.randn(2, 4).astype(np.float32))
mask_2d = tf.constant(np.random.randn(2, 4).astype(np.float32))
input_is_3d_false_with_mask = False

# Test case 3: 3D input with mask
x_3d = tf.constant(np.random.randn(2, 3, 4).astype(np.float32))
mask_3d_base = tf.constant(np.random.randn(3, 4).astype(np.float32))
input_is_3d_true = True

# Use the 2D case with mask as the primary test
ARGS = {
    "x": x_2d_with_mask,
    "mask": mask_2d,
    "input_is_3d": input_is_3d_false_with_mask,
}
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
attn Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/eval2table.py
code served (permissive licence) · get_code("1ba6eb69db2dce38")
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

func_names = {'so': '1', 'sp': '2', 'ts': '1.5'}

def attn(path):
    return func_names[next(re.finditer('(so|sp|ts)-(so|sp|ts)', path)).group(0).split('-')[0]]

# The function takes a 'path' parameter (a string)
# It searches for a pattern like "so-sp" or "ts-so" etc. using regex
# It extracts the first part (before the hyphen) and looks it up in func_names

# Valid path examples that match the regex pattern '(so|sp|ts)-(so|sp|ts)':
ARGS = {
    'path': 'so-sp'
}
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
average_models Ran
ran on a synthesized input
Helsinki-NLP/OpenNMT-py/onmt/bin/average_models.py
code served (permissive licence) · get_code("df1510f43e187231")
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 torch
import tempfile
import os

torch.manual_seed(0)

# Create temporary model files with the expected structure
temp_dir = tempfile.mkdtemp()

# Create first model checkpoint
model_file_1 = os.path.join(temp_dir, 'model_1.pt')
checkpoint_1 = {
    'vocab': {'word': 0, 'test': 1},
    'opt': {'learning_rate': 0.001, 'optimizer': 'adam'},
    'model': {
        'layer1.weight': torch.randn(4, 3),
        'layer1.bias': torch.randn(4),
        'layer2.weight': torch.randn(5, 4),
    },
    'generator': {
        'gen_layer1.weight': torch.randn(3, 4),
        'gen_layer1.bias': torch.randn(3),
    }
}
torch.save(checkpoint_1, model_file_1)

# Create second model checkpoint with same structure
model_file_2 = os.path.join(temp_dir, 'model_2.pt')
checkpoint_2 = {
    'vocab': {'word': 0, 'test': 1},
    'opt': {'learning_rate': 0.001, 'optimizer': 'adam'},
    'model': {
        'layer1.weight': torch.randn(4, 3),
        'layer1.bias': torch.randn(4),
        'layer2.weight': torch.randn(5, 4),
    },
    'generator': {
        'gen_layer1.weight': torch.randn(3, 4),
        'gen_layer1.bias': torch.randn(3),
    }
}
torch.save(checkpoint_2, model_file_2)

ARGS = {
    'model_files': [model_file_1, model_file_2],
    'fp32': False,
}
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 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
calc_vocab_load_stats Ran
ran on a synthesized input
Helsinki-NLP/OpenNMT-py/onmt/modules/embeddings.py
code served (permissive licence) · get_code("9fbd2e7a6babb8dc")
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 torch
import torch.nn as nn

# Create a stand-in Vocab class with stoi attribute
class Vocab:
    def __init__(self, stoi_dict):
        self.stoi = stoi_dict
    
    def __len__(self):
        return len(self.stoi)

# Create vocab with some tokens
vocab_stoi = {
    'the': 0,
    'a': 1,
    'and': 2,
    'of': 3,
    'to': 4,
    'in': 5,
}
vocab = Vocab(vocab_stoi)

# Create loaded_embed_dict with partial overlap
loaded_embed_dict = {
    'the': torch.randn(100),
    'a': torch.randn(100),
    'and': torch.randn(100),
    'hello': torch.randn(100),
    'world': torch.randn(100),
}

ARGS = {
    'vocab': vocab,
    'loaded_embed_dict': loaded_embed_dict,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 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
check_sru_requirement Ran
ran, violated the contract we drafted
Helsinki-NLP/OpenNMT-py/onmt/models/sru.py
code served (permissive licence) · get_code("0c93830510f645a3")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

ARGS = {
    'abort': False
}
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 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
config Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/plot_attn.py
code served (permissive licence) · get_code("6458cbed6ba5a0ae")
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 torch
from os.path import basename

torch.manual_seed(0)

# The function 'config' takes a path parameter
# It calls basename(path) to get the filename
# Then splits on '-' and takes the first 2 elements
# Returns them as a tuple

path = "/some/directory/model-checkpoint-weights.txt"

ARGS = {
    "path": path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 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
context_gate_factory Ran
ran on a synthesized input
Henry-E/OpenNMT-py/onmt/modules/gate.py
code served (permissive licence) · get_code("655c4a8978903a61")
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 BothContextGate. 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

torch.manual_seed(0)

# Define small, distinct dimensions for different meaning
embeddings_size = 4
decoder_size = 5
attention_size = 6
output_size = 7

ARGS = {
    'gate_type': 'both',
    'embeddings_size': embeddings_size,
    'decoder_size': decoder_size,
    'attention_size': attention_size,
    'output_size': output_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BothContextGate — a BothContextGate output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BothContextGate 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
count_features Ran
ran, honoured the contract we drafted
Unbabel/OpenNMT-py/preprocess.py
code served (permissive licence) · get_code("0c8cfd6442c243f1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import codecs
import tempfile
import os

# Create a temporary file with the expected format
# Format: whitespace-delimited tokens with │-delimited features within each token
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "corpus.txt")

# Write a sample corpus file
# First token has features separated by │
# Format: feature1│feature2│feature3 (which means 2 features, since we subtract 1)
with codecs.open(temp_file, 'w', 'utf-8') as f:
    f.write("word│pos│lemma other_token│tag\n")
    f.write("another│noun│base more_data\n")

ARGS = {
    "path": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fopen Ran
ran on a synthesized input
rsennrich/nematus/nematus/data_iterator.py
code served (permissive licence) · get_code("3552dcfdf6c80e3b")
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 TextIOWrapper. 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 directory for test files
temp_dir = tempfile.mkdtemp()

# Create a regular text file
regular_file = os.path.join(temp_dir, "test.txt")
with open(regular_file, 'w', encoding='UTF-8') as f:
    f.write("test content")

# Create a gzip compressed file
import gzip
gz_file = os.path.join(temp_dir, "test.txt.gz")
with gzip.open(gz_file, 'wt', encoding='UTF-8') as f:
    f.write("compressed test content")

# Define ARGS for the fopen function
ARGS = {
    'filename': regular_file,
    'mode': 'r'
}
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 TextIOWrapper — a TextIOWrapper 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
get_positional_signal Ran
ran on a synthesized input
rsennrich/nematus/nematus/transformer_layers.py
code served (permissive licence) · get_code("cdbd509895839103")
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 3, dtype family float, shape (1, 8, 16) 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

# Set up arguments for get_positional_signal
time_steps = 8
depth = 16
float_dtype = tf.float32
min_timescale = 1
max_timescale = 10000

ARGS = {
    "time_steps": time_steps,
    "depth": depth,
    "float_dtype": float_dtype,
    "min_timescale": min_timescale,
    "max_timescale": max_timescale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (1, 8, 16) — shape (1, 8, 16) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_right_context_mask Ran
ran on a synthesized input
rsennrich/nematus/nematus/transformer_layers.py
code served (permissive licence) · get_code("976704f0dc62c0c9")
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 4, dtype family float, shape (1, 1, 5, 5) 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

# The function takes time_steps as a parameter, which is used to create
# a square matrix of shape [time_steps, time_steps]
time_steps = 5

ARGS = {
    "time_steps": time_steps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (1, 1, 5, 5) — shape (1, 1, 5, 5) 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
kind_of_line Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/read_translation_log.py
code served (permissive licence) · get_code("f78794cd3b2e5781")
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 torch

def kind_of_line(line):
    if line.startswith('['):
        return 'beam'
    elif line.startswith('SENT'):
        return 'pred'
    else:
        return 'neither'

ARGS = {
    'line': '[some beam output]'
}
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 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
language Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/eval2table.py
code served (permissive licence) · get_code("cb1ed445ccd9c224")
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 torch
import numpy as np
from os.path import basename, split

torch.manual_seed(0)

# The function takes a path string and extracts the filename without extension
# It uses basename() to get the filename from a path, then splits on '.' to get the first part

path = "models/checkpoint.pt"

ARGS = {
    "path": path
}
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 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
load Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/plot_attn.py
code served (permissive licence) · get_code("b90741ad50bdcf08")
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 2, dtype family float, shape (3, 3) 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 numpy as np
import tempfile
import os

# Create a temporary file with sample data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("1.0 2.0 3.0\n")
temp_file.write("4.0 5.0 6.0\n")
temp_file.write("7.0 8.0 9.0\n")
temp_file.close()

ARGS = {
    "path": temp_file.name
}
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 ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 3) 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
matmul3d Ran
ran on a synthesized input
rsennrich/nematus/nematus/layers.py
code served (permissive licence) · get_code("d562fe373f169d72")
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 3, dtype family float, shape (2, 3, 5) 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

# Create small 3D tensor: [batch=2, seq_len=3, features=4]
x3d = tf.constant([
    [[1.0, 2.0, 3.0, 4.0],
     [5.0, 6.0, 7.0, 8.0],
     [9.0, 10.0, 11.0, 12.0]],
    [[13.0, 14.0, 15.0, 16.0],
     [17.0, 18.0, 19.0, 20.0],
     [21.0, 22.0, 23.0, 24.0]]
], dtype=tf.float32)

# Create 2D matrix for multiplication: [features=4, output_dim=5]
matrix = tf.constant([
    [1.0, 2.0, 3.0, 4.0, 5.0],
    [6.0, 7.0, 8.0, 9.0, 10.0],
    [11.0, 12.0, 13.0, 14.0, 15.0],
    [16.0, 17.0, 18.0, 19.0, 20.0]
], dtype=tf.float32)

ARGS = {
    "x3d": x3d,
    "matrix": matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) 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
out Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/eval2table.py
code served (permissive licence) · get_code("88de64a13c7bbf25")
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 out(path):
    func_names = {'so': '1', 'sp': '2', 'ts': '1.5'}
    return func_names[next(re.finditer('(so|sp|ts)-(so|sp|ts)', path)).group(0).split('-')[1]]

ARGS = {
    'path': 'so-sp'
}
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
parse_beam Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/read_translation_log.py
code served (permissive licence) · get_code("af167b4197ad73a2")
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

# Analyze the function: parse_beam expects beam_lines (an iterable of strings)
# Each string is split on whitespace, first element is sliced [1:-1] and converted to float
# So we need strings that have at least 1 character on each end, with a number in between

beam_lines = [
    "x3.14y",
    "z2.71w",
    "a1.41b",
    "m2.23n",
]

ARGS = {
    "beam_lines": beam_lines,
}
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
parse_log Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/read_translation_log.py
code served (permissive licence) · get_code("f00183431131cace")
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 defaultdict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with beam search log content
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_path = temp_file.name

log_content = """SENT en-de: test sentence
[0.95] beam 1 output
[0.87] beam 2 output
[0.76] beam 3 output
SENT fr-en: another test
[0.92] beam 1 output
[0.84] beam 2 output
SENT de-fr: yet another
[0.88] beam 1 output
[0.79] beam 2 output
[0.71] beam 3 output
"""

temp_file.write(log_content)
temp_file.close()

ARGS = {
    'path': temp_path
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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_embeddings Ran
ran on a synthesized input
Helsinki-NLP/OpenNMT-py/onmt/modules/embeddings.py
code served (permissive licence) · get_code("d855d16fdafaee22")
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 tempfile
import os

# Create a temporary embeddings file in GloVe format
temp_dir = tempfile.mkdtemp()
embeddings_path = os.path.join(temp_dir, "embeddings.txt")

# Write a sample GloVe format file
with open(embeddings_path, 'w') as f:
    f.write("word1 0.1 0.2 0.3 0.4\n")
    f.write("word2 0.5 0.6 0.7 0.8\n")
    f.write("word3 0.9 0.1 0.2 0.3\n")
    f.write("word4 0.4 0.5 0.6 0.7\n")

# Create a filter set for testing the filter_set parameter
filter_set = {"word1", "word3"}

ARGS = {
    "path": embeddings_path,
    "skip_lines": 0,
    "filter_set": filter_set
}
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, 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
split_predictions Ran
ran on a synthesized input
deep-spin/OpenNMT-entmax/postprocess_morph.py
code served (permissive licence) · get_code("a937f5e187e7a3ce")
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 for test_src and test_pred
temp_dir = tempfile.mkdtemp()
test_src_path = os.path.join(temp_dir, "test_src.txt")
test_pred_path = os.path.join(temp_dir, "test_pred.txt")

# Write test source file with language identifiers
with open(test_src_path, 'w') as f:
    f.write("en This is a test sentence\n")
    f.write("en Another English sentence\n")
    f.write("fr Ceci est une phrase de test\n")
    f.write("fr Une autre phrase française\n")
    f.write("en One more English example\n")

# Write test predictions file (should match order and have same number of lines as test_src)
with open(test_pred_path, 'w') as f:
    f.write("prediction 1\n")
    f.write("prediction 2\n")
    f.write("prediction 3\n")
    f.write("prediction 4\n")
    f.write("prediction 5\n")

ARGS = {
    "test_src": test_src_path,
    "test_pred": test_pred_path,
}
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
calc_scores Not yet run
unverified (harvested, no recorded run)
rsennrich/nematus/nematus/score.py
code served (permissive licence) · get_code("58b37cb5dba514c9")
How it ran

no invocation recorded.

collapse_copy_scores Not yet run
unverified (harvested, no recorded run)
Helsinki-NLP/OpenNMT-py/onmt/modules/copy_generator.py
code served (permissive licence) · get_code("b60aff23d14fc8ae")
How it ran

no invocation recorded.

collapse_copy_scores Not yet run
unverified (harvested, no recorded run)
Unbabel/OpenNMT-py/onmt/modules/copy_generator.py
code served (permissive licence) · get_code("83253c9435403627")
How it ran

no invocation recorded.

convert_to_torch_tensor Not yet run
unverified (harvested, no recorded run)
Helsinki-NLP/OpenNMT-py/onmt/modules/embeddings.py
code served (permissive licence) · get_code("f788edf70da4f11d")
How it ran

no invocation recorded.

get_ctranslate2_model_spec Not yet run
unverified (harvested, no recorded run)
Helsinki-NLP/OpenNMT-py/onmt/bin/release_model.py
code served (permissive licence) · get_code("a7400d7c2f3b1eea")
How it ran

no invocation recorded.

init_or_restore_variables Not yet run
unverified (harvested, no recorded run)
rsennrich/nematus/nematus/model_loader.py
code served (permissive licence) · get_code("fde438b7920353b3")
How it ran

no invocation recorded.

load_config_from_json_file Not yet run
unverified (harvested, no recorded run)
rsennrich/nematus/nematus/config.py
code served (permissive licence) · get_code("4ec52ddc5f16baa3")
How it ran

no invocation recorded.

matmul_nd Not yet run
unverified (harvested, no recorded run)
rsennrich/nematus/nematus/transformer_layers.py
code served (permissive licence) · get_code("b20fe50e75ebfea1")
How it ran

no invocation recorded.

seq_linear Not yet run
unverified (harvested, no recorded run)
Helsinki-NLP/OpenNMT-py/onmt/modules/conv_multi_step_attention.py
pointer only (licence: MIT); the stored copy get_code serves, from Alex-Fabbri/Multi-News, is pointer only (licence: NOASSERTION) · get_code("0c3bddd7d3eaba02")
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 Alex-Fabbri/Multi-News, and GitHub could not classify the licence of that repository (NOASSERTION). 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. No invocation recorded.

Also present in other papers' code

Of 29 samples lifted from this paper's linked repositories, 29 carry a function identity and 0 do not. Of the 29 distinct functions with an identity, 8 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 8 later) and 21 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
check_sru_requirement 8 other papers
1 dated earlier, 7 later
1709.02755 (2017-09)
Simple Recurrent Units for Highly Parallelizable Recurrence
1906.06253 (2019-06)
A Simple and Effective Approach to Automatic Post-Editing with Transfer Learning
1906.07651 (2019-06)
Scheduled Sampling for Transformers
and 5 more not named here
seq_linear 8 other papers
8 later
1906.06253 (2019-06)
A Simple and Effective Approach to Automatic Post-Editing with Transfer Learning
1906.07651 (2019-06)
Scheduled Sampling for Transformers
1910.02555 (2019-10)
Domain Differential Adaptation for Neural Machine Translation
and 5 more not named here
count_features 6 other papers
6 later
1809.07358 (2018-09)
A Dataset for Document Grounded Conversations
1906.06253 (2019-06)
A Simple and Effective Approach to Automatic Post-Editing with Transfer Learning
1906.07651 (2019-06)
Scheduled Sampling for Transformers
and 3 more not named here
average_models 3 other papers
3 later
1810.05241 (2018-10)
One Size Does Not Fit All: Generating and Evaluating Variable Number of Keyphrases
2004.00588 (2020-04)
Better Sign Language Translation with STMC-Transformer
2010.05465 (2020-10)
COGS: A Compositional Generalization Challenge Based on Semantic Interpretation
collapse_copy_scores 3 other papers
3 later
1912.05372 (2019-12)
FlauBERT: Unsupervised Language Model Pre-training for French
2020.acl-main.640 (2020 (year only))
Heterogeneous Graph Transformer for Graph-to-Sequence Learning
2004.00588 (2020-04)
Better Sign Language Translation with STMC-Transformer
get_ctranslate2_model_spec 2 other papers
2 later
1810.05241 (2018-10)
One Size Does Not Fit All: Generating and Evaluating Variable Number of Keyphrases
2010.05465 (2020-10)
COGS: A Compositional Generalization Challenge Based on Semantic Interpretation
collapse_copy_scores 1 other paper
1 later
1906.06253 (2019-06)
A Simple and Effective Approach to Automatic Post-Editing with Transfer Learning
context_gate_factory 1 other paper
1 later
1912.05372 (2019-12)
FlauBERT: Unsupervised Language Model Pre-training for French

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

Repositories linked to this paper

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

Abstract

OpenNMT is an open-source toolkit for neural machine translation (NMT). The system prioritizes efficiency, modularity, and extensibility with the goal of supporting NMT research into model architectures, feature representations, and source modalities, while maintaining competitive performance and reasonable training requirements. The toolkit consists of modeling and translation support, as well as detailed pedagogical documentation about the underlying techniques. OpenNMT has been used in several production MT systems, modified for numerous research papers, and is implemented across several deep learning frameworks.

For agents

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

get_harvested_code_for_paper("1805.11462")
get_code_for_paper("1805.11462")
have("1805.11462")

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

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

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

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

Connect an agent — have() is free.