SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1804.08771 · 2018

A Call for Clarity in Reporting BLEU Scores

Matt Post

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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; 2 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1804.08771.json · badge: /api/ran/1804.08771.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
mjpost/sacreBLEU canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
jchenghu/sacreeos community (classifier label)
classifier basis not recorded on the link
7 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_doc_freq Ran
ran on a synthesized input
jchenghu/sacreeos/sacreeos/metric/py_core/py_cider_scorer.py
code served (permissive licence) · get_code("9ac2d70f97a531f2")
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.

from collections import defaultdict, Counter

# Construct a small stand-in for count_refss
# Looking at the function:
# - It iterates over count_refss: for refs in count_refss
# - For each refs, it iterates: for ref in refs
# - For each ref, it accesses items(): for ngram, count in ref.items()
# - It collects ngrams into a set and counts them

# So count_refss should be a list of lists of dicts
# Each dict maps ngram (string) to count (int)

count_refss = [
    # First reference set with 2 references
    [
        {"the": 1, "cat": 2, "sat": 1},
        {"the": 2, "dog": 1}
    ],
    # Second reference set with 2 references
    [
        {"the": 1, "bird": 1, "flew": 1},
        {"cat": 1, "sat": 1}
    ]
]

ARGS = {
    "count_refss": count_refss
}
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
compute_penalty_by_length Ran
ran on a synthesized input
jchenghu/sacreeos/sacreeos/metric/py_core/py_cider_scorer.py
code served (permissive licence) · get_code("b1a46356ad1589f8")
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 numpy as np

ARGS = {
    "candidate_len": 95,
    "reference_len": 100,
    "alpha": 1.0,
}
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 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
compute_penalty_by_repetition Ran
ran on a synthesized input
jchenghu/sacreeos/sacreeos/metric/py_core/py_cider_scorer.py
code served (permissive licence) · get_code("993ef917c2a9a9de")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from collections import defaultdict, Counter
from nltk.tokenize import RegexpTokenizer
from scipy.stats.mstats import gmean

ARGS = {
    "candidate_sent": "the cat is on the mat and the cat is happy",
    "reference_sent": "the cat is on the mat",
    "penalty_func": lambda x: np.exp(-x)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
cook_refss Ran
ran on a synthesized input
jchenghu/sacreeos/sacreeos/metric/py_core/ngram_utils.py
code served (permissive licence) · get_code("b56d6d3f3ce198f0")
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
from collections import defaultdict

torch.manual_seed(0)

# Based on the function signature and body analysis:
# cook_refss takes:
# - refss: list of string (reference sentences)
# - n: int (number of ngrams)
#
# The function iterates over refss and calls precook on each item
# precook expects a string and returns a defaultdict of ngram counts

ARGS = {
    "refss": [
        "the quick brown fox jumps",
        "a fast brown fox is jumping",
        "the brown fox jumps quickly"
    ],
    "n": 4
}
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
cook_tests Ran
ran on a synthesized input
jchenghu/sacreeos/sacreeos/metric/py_core/ngram_utils.py
code served (permissive licence) · get_code("da4769829a3a7e22")
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 torch
import numpy as np
from collections import defaultdict

# Call cook_tests function to understand its parameters
# cook_tests(tests, n=4)
# - tests: list of string or a string (based on the function body, it calls precook on tests directly)
# - n: int for ngrams

# Looking at the function body:
# cook_tests calls precook(tests, n)
# precook expects a string s and int n
# So tests should be a string

ARGS = {
    "tests": "the quick brown fox jumps over the lazy dog",
    "n": 4
}
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 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
estimate_ci Ran
ran; our contract draft was wrong, not the code
mjpost/sacreBLEU/sacrebleu/significance.py
code served (permissive licence) · get_code("e8aa5f602ca91360")
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

# The function takes a numpy array of scores and computes statistics on it
# We need to provide a numpy array of floating point scores

np.random.seed(0)
scores = np.random.randn(100).astype(np.float32)

ARGS = {
    "scores": scores
}
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
invoke_bleu_computer Ran
ran on a synthesized input
jchenghu/sacreeos/sacreeos/metric/c_core/invoker.py
code served (permissive licence) · get_code("d744bcac482b9dbe")
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 ctypes
from unittest.mock import Mock

# Create a mock C library with a compute_bleu_score function
c_lib = Mock()
c_lib.compute_bleu_score = Mock()

# Define parameters for invoke_bleu_computer
num_images = 2

# Create predictions - list of byte strings
preds = [b"the quick brown fox", b"jumps over the lazy dog"]

# Create ground truths - list of lists of byte strings (multiple references per image)
# First image has 2 references, second image has 3 references
gts = [
    [b"the quick brown fox jumps", b"quick brown fox"],
    [b"jumps over the lazy dog", b"over the lazy dog", b"the lazy dog"]
]

# Reference lengths - number of references for each image
ref_lens = [2, 3]

ARGS = {
    "c_lib": c_lib,
    "preds": preds,
    "gts": gts,
    "num_images": num_images,
    "ref_lens": ref_lens
}
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
my_log Ran
ran, honoured the contract we drafted
mjpost/sacreBLEU/sacrebleu/utils.py
code served (permissive licence) · get_code("a37d553ae5141065")
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 math

ARGS = {
    "num": 0.5
}
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 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
precook Ran
ran; our contract draft was wrong, not the code
jchenghu/sacreeos/sacreeos/metric/py_core/ngram_utils.py
code served (permissive licence) · get_code("ca007f4b8a45fbdc")
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. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:14:48Z. 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.

from collections import defaultdict

ARGS = {
    "s": "The quick brown fox jumps over the lazy dog",
    "n": 4
}
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
smart_open Ran
ran; our contract draft was wrong, not the code
mjpost/sacreBLEU/sacrebleu/utils.py
code served (permissive licence) · get_code("09bfbf9dc612b494")
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 and files for testing
temp_dir = tempfile.mkdtemp()

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

# Create a gzipped 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 arguments for the function
ARGS = {
    'file': plain_file,
    'mode': 'rt',
    'encoding': 'utf-8'
}
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
sum_of_lists Ran
ran, honoured the contract we drafted
mjpost/sacreBLEU/sacrebleu/utils.py
code served (permissive licence) · get_code("67d5f0d11404b388")
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)

# Construct valid arguments for sum_of_lists
# The function takes a list of numeric lists and sums them element-wise

# Create a list of lists with numeric values (floats)
list1 = [1.0, 2.0, 3.0, 4.0]
list2 = [5.0, 6.0, 7.0, 8.0]
list3 = [9.0, 10.0, 11.0, 12.0]

lists = [list1, list2, list3]

ARGS = {
    "lists": lists
}
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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 5 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
precook 4 other papers
1 dated earlier, 3 later
1611.09571 (2016-11)
Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model
1912.08226 (2019-12)
Meshed-Memory Transformer for Image Captioning
ijcai2022_0224 (2022 (year only))
S 2 Transformer for Image Captioning
and 1 more not named here
my_log 2 other papers
2 later
2212.02437 (2022-12)
In-context Examples Selection for Machine Translation
2605.31545 (2026-05)
Preference-Aware Rubric Learning for Personalized Evaluation PREFERENCE-AWARE RUBRIC LEARNING FOR PERSON-ALIZED EVALUATION
smart_open 2 other papers
2 later
2104.05700 (2021-04)
Macro-Average: Rare Types Are Important Too
2605.31545 (2026-05)
Preference-Aware Rubric Learning for Personalized Evaluation PREFERENCE-AWARE RUBRIC LEARNING FOR PERSON-ALIZED EVALUATION
estimate_ci 1 other paper
1 later
2605.31545 (2026-05)
Preference-Aware Rubric Learning for Personalized Evaluation PREFERENCE-AWARE RUBRIC LEARNING FOR PERSON-ALIZED EVALUATION
sum_of_lists 1 other paper
1 later
2605.31545 (2026-05)
Preference-Aware Rubric Learning for Personalized Evaluation PREFERENCE-AWARE RUBRIC LEARNING FOR PERSON-ALIZED EVALUATION

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

The field of machine translation faces an under-recognized problem because of inconsistency in the reporting of scores from its dominant metric. Although people refer to "the" BLEU score, BLEU is in fact a parameterized metric whose values can vary wildly with changes to these parameters. These parameters are often not reported or are hard to find, and consequently, BLEU scores between papers cannot be directly compared. I quantify this variation, finding differences as high as 1.8 between commonly used configurations. The main culprit is different tokenization and normalization schemes applied to the reference. Pointing to the success of the parsing community, I suggest machine translation researchers settle upon the BLEU scheme used by the annual Conference on Machine Translation (WMT), which does not allow for usersupplied reference processing, and provide a new tool, SACREBLEU, 1 to facilitate this.

For agents

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

get_harvested_code_for_paper("1804.08771")
get_code_for_paper("1804.08771")
have("1804.08771")

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

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

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

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

Connect an agent — have() is free.