SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2022.findings-acl.203 · ACL Findings · 2022

Prompt-Driven Neural Machine Translation

Yue Zhang, Jing Li, Yafu Li, Yongjing Yin

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-24; 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/2022.findings-acl.203.json · badge: /api/ran/2022.findings-acl.203.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
yafuly/PromptNMT canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
import_params Ran
ran; our contract draft was wrong, not the code
yafuly/PromptNMT/thumt/bin/trainer.py
code served (permissive licence) · get_code("bb55d10bc8ee2bfa")
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 MockParams. 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 json

class MockParams:
    def __init__(self):
        self.data = {}
    
    def parse_json(self, json_str):
        parsed = json.loads(json_str)
        self.data.update(parsed)

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

# Create params.json
params_data = {"learning_rate": 0.001, "batch_size": 32}
params_path = os.path.join(temp_dir, "params.json")
with open(params_path, "w") as f:
    f.write(json.dumps(params_data))

# Create model.json (using "model" as model_name)
model_data = {"num_layers": 3, "hidden_size": 128}
model_path = os.path.join(temp_dir, "model.json")
with open(model_path, "w") as f:
    f.write(json.dumps(model_data))

params_obj = MockParams()

ARGS = {
    "model_dir": temp_dir,
    "model_name": "model",
    "params": params_obj
}
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 MockParams — a MockParams output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockParams 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
import_params Ran
ran on a synthesized input
yafuly/PromptNMT/thumt/bin/scorer.py
code served (permissive licence) · get_code("40ababf4a5b7509f")
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 MockParams. 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 json
import tempfile


class MockParams:
    """Stand-in params object with parse_json method."""
    def __init__(self):
        self.data = {}
    
    def parse_json(self, json_str):
        """Parse JSON string and store in data dict."""
        self.data = json.loads(json_str)


# Create a temporary directory and a test JSON file
temp_dir = tempfile.mkdtemp()
model_name = "test_model"
model_file = os.path.join(temp_dir, model_name + ".json")

# Write a test JSON file with some parameters
test_params = {"learning_rate": 0.001, "batch_size": 32, "layers": 3}
with open(model_file, "w") as f:
    json.dump(test_params, f)

# Create params object
params = MockParams()

ARGS = {
    "model_dir": temp_dir,
    "model_name": model_name,
    "params": params
}
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 MockParams — a MockParams output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockParams 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
import_params Ran
ran on a synthesized input
yafuly/PromptNMT/thumt/bin/translator.py
code served (permissive licence) · get_code("da8001b0f721ab57")
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 MockParams. 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 logging
import os
import tempfile
import json

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()

# Create a stand-in params object with a parse_json method
class MockParams:
    def __init__(self):
        self.data = {}
    
    def parse_json(self, json_str):
        self.data = json.loads(json_str)

# Create a temporary model JSON file
model_name = "test_model"
model_json_path = os.path.join(temp_dir, model_name + '.json')
test_params_dict = {"learning_rate": 0.001, "hidden_size": 128}
with open(model_json_path, 'w') as f:
    json.dump(test_params_dict, f)

# Create the params object
params = MockParams()

ARGS = {
    "model_dir": temp_dir,
    "model_name": model_name,
    "params": params
}
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 MockParams — a MockParams output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockParams 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_args Not yet run
unverified (harvested, no recorded run)
yafuly/PromptNMT/thumt/bin/trainer.py
code served (permissive licence) · get_code("ce1f3f7d878d9a68")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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
import_params 2 other papers
2 dated earlier
1409.0473 (2014-09)
Neural Machine Translation by Jointly Learning to Align and Translate
2110.06609 (2021-10)
MSP: Multi-Stage Prompting for Making Pre-trained Language Models Better Translators
import_params 2 other papers
1 dated earlier, 1 same year, order not determinable
2110.06609 (2021-10)
MSP: Multi-Stage Prompting for Making Pre-trained Language Models Better Translators
2212.09387 (2022-12)
An Extensible Plug-and-Play Method for Multi-Aspect Controllable Text Generation

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

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

Abstract

Neural machine translation (NMT) has obtained significant performance improvement over the recent years. However, NMT models still face various challenges including fragility and lack of style flexibility. Moreover, current methods for instance-level constraints are limited in that they are either constraint-specific or model-specific. To this end, we propose prompt-driven neural machine translation to incorporate prompts for enhancing translation control and enriching flexibility. Empirical results demonstrate the effectiveness of our method in both prompt responding and translation quality. Through human evaluation, we further show the flexibility of prompt control and the efficiency in human-in-the-loop translation.

For agents

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

get_harvested_code_for_paper("2022.findings-acl.203")
get_code_for_paper("2022.findings-acl.203")
have("2022.findings-acl.203")

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

curl https://syntology.ai/api/ran/2022.findings-acl.203.json

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

[![Syntology run record](https://syntology.ai/api/ran/2022.findings-acl.203.svg)](https://syntology.ai/paper/2022.findings-acl.203)

Connect an agent — have() is free.