SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.12019 · 2019

word2word: A Collection of Bilingual Lexicons for 3,564 Language Pairs

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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 7 have no contract verdict; 2 failures of our instrument; 3 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/1911.12019.json · badge: /api/ran/1911.12019.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
kakaobrain/word2word canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
Kyubyong/word2word community (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
FunctionStatusWhere it lives
convert_google_translate Ran
ran on a synthesized input
Kyubyong/word2word/google_grader.py
code served (permissive licence) · get_code("0d33bb20d13f72b5")
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 a valid item dict that matches what convert_google_translate expects
item = {
    'trans': [
        ('Common translation', 'Hello'),
        ('Uncommon translation', 'Greetings'),
        ('Rare translation', 'Hola'),
        ('Common translation', 'Hi'),
    ]
}

# level parameter - must be between 1 and 3 to select from ratings list
level = 2

ARGS = {
    'item': item,
    'level': level,
}
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
get_google_translate Ran
ran on a synthesized input
Kyubyong/word2word/google_grader.py
code served (permissive licence) · get_code("028299bfe6ab9a2c")
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 json
import tempfile
import os
from glob import glob

# Create a temporary directory and a mock Google Translate file
temp_dir = tempfile.mkdtemp()

# Create a mock translation file with the expected format
mock_file_path = os.path.join(temp_dir, "google_translate_en_fr.txt")

# Build mock data in the format expected by the function
mock_data = []

# First entry with valid translations
entry1 = {
    "main_trans": {"trans": "bonjour", "verified": True},
    "trans": [
        {"trans": [["Common translation", "hello"], ["Uncommon translation", "good morning"]]},
        {"trans": [["Common translation", "hi"]]}
    ]
}

# Second entry
entry2 = {
    "main_trans": {"trans": "chat", "verified": True},
    "trans": [
        {"trans": [["Common translation", "cat"], ["Rare translation", "feline"]]},
    ]
}

# Format the file as tab-separated: word \t json_object
line1 = "hello\t" + json.dumps([
    {"trans": "bonjour", "verified": True},
    {"trans": [["Common translation", "hello"], ["Uncommon translation", "good morning"]]},
    {"trans": [["Common translation", "hi"]]}
])

line2 = "cat\t" + json.dumps([
    {"trans": "chat", "verified": True},
    {"trans": [["Common translation", "chat"], ["Rare translation", "feline"]]}
])

with open(mock_file_path, 'w') as f:
    f.write(line1 + "\n")
    f.write(line2 + "\n")

# Create the template pattern that uses the directory
gt_template = os.path.join(temp_dir, "google_translate_{0}_{1}.txt")

ARGS = {
    "gt": gt_template,
    "l1": "en",
    "l2": "fr",
    "level": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_savedir Ran
ran on a synthesized input
Kyubyong/word2word/word2word/utils.py
code served (permissive licence) · get_code("cd493b05c9546aa3")
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 os
import tempfile
from pathlib import Path

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

ARGS = {
    'savedir': 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_survey_summary_reference Ran
ran on a synthesized input
Kyubyong/word2word/google_grader.py
code served (permissive licence) · get_code("0297c4a1fef5186d")
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 tempfile
import os

# Create a temporary directory and file for testing
temp_dir = tempfile.mkdtemp()

# Create a sample survey reference file
survey_file = os.path.join(temp_dir, "survey_ref_1_2.txt")
with open(survey_file, 'w') as f:
    f.write("item1\n")
    f.write("baseline_val1\tbaseline_val2\tbaseline_val3\n")
    f.write("cpe_val1\tcpe_val2\tcpe_val3\n")
    f.write("pmi_val1\tpmi_val2\tpmi_val3\n")
    f.write("item2\n")
    f.write("baseline_val4\tbaseline_val5\tbaseline_val6\n")
    f.write("cpe_val4\tcpe_val5\tcpe_val6\n")
    f.write("pmi_val4\tpmi_val5\tpmi_val6\n")

# Define the survey_reference_base pattern that will match the file
survey_reference_base = os.path.join(temp_dir, "survey_ref_{0}_{1}.txt")

ARGS = {
    "survey_reference_base": survey_reference_base,
    "l1": 1,
    "l2": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_trans_co Ran
ran; our contract draft was wrong, not the code
kakaobrain/word2word/word2word/methods.py
code served (permissive licence) · get_code("d9951e08e23cfb5e")
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 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 operator

# Construct valid arguments for get_trans_co
# The function expects:
# - x2ys: a dict where keys are x values and values are dicts of {y: count}
# - n_trans: an integer specifying how many top transitions to keep

ARGS = {
    "x2ys": {
        "state_a": {"outcome_1": 5, "outcome_2": 3, "outcome_3": 8, "outcome_4": 2},
        "state_b": {"outcome_1": 10, "outcome_2": 7, "outcome_3": 4},
        "state_c": {"outcome_2": 6, "outcome_3": 9, "outcome_4": 1, "outcome_5": 3},
    },
    "n_trans": 2,
}
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 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
load_tokenizer Ran
ran on a synthesized input
Kyubyong/word2word/word2word/tokenization.py
code served (permissive licence) · get_code("349ed3bbc388de65")
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 ToktokTokenizer. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function load_tokenizer takes a single parameter 'lang' which is a string
# It returns a tokenizer object based on the language code
# Since we can't import external libraries like konlpy, Mykytea, jieba, etc.,
# we'll test with a language that uses the default fallback (ToktokTokenizer)
# or we can use any language string and the function will attempt the imports

# Testing with a language that will hit the default case to avoid import errors
ARGS = {
    'lang': 'en'  # Using English which will trigger the default nltk.tokenize.ToktokTokenizer()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
Mykytea, jieba, konlpy, nltk, numpy, pyarabic, pythainlp, pyvi, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ToktokTokenizer — a ToktokTokenizer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ToktokTokenizer 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
process_line Ran
ran on a synthesized input
Kyubyong/word2word/word2word/tokenization.py
code served (permissive licence) · get_code("00f3aa78f7c4246f")
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 re

class KoreanTokenizer:
    def pos(self, sent):
        return [("word1", "NN"), ("word2", "VB")]

class JapaneseTokenizer:
    def getWS(self, sent):
        return ["word1", "word2"]

class ThaiTokenizer:
    def __call__(self, sent, engine='mm'):
        return ["word1", "word2"]

class VietnameseTokenizer:
    def tokenize(self, sent):
        return "word1 word2"

class ChineseTokenizer:
    def getWS(self, sent):
        return ["word1", "word2"]
    
    def cut(self, sent, cut_all=False):
        return ["word1", "word2"]

class ArabicTokenizer:
    def tokenize(self, sent):
        return ["word1", "word2"]

class DefaultTokenizer:
    def tokenize(self, sent):
        return ["word1", "word2"]

ARGS = {
    "line": "This is a test sentence.",
    "lang": "en",
    "tokenizer": DefaultTokenizer(),
    "cased": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 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
rerank Ran
ran; our contract draft was wrong, not the code
kakaobrain/word2word/word2word/methods.py
code served (permissive licence) · get_code("91ef2e84a38bc63c")
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 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 operator
from tqdm import tqdm

# Construct valid arguments for the rerank function

# x2ys: dict mapping words (x) to dicts of {translation (y): count}
x2ys = {
    "hello": {"bonjour": 15, "salut": 8, "allo": 3},
    "world": {"monde": 20, "univers": 5},
    "cat": {"chat": 25, "félin": 10, "minou": 2}
}

# x2cnt: dict mapping words (x) to their total counts
x2cnt = {
    "hello": 26,
    "world": 25,
    "cat": 37
}

# x2xs: dict mapping words (x) to dicts of {related_word (x2): co-occurrence_count}
x2xs = {
    "hello": {"world": 10, "there": 5},
    "world": {"hello": 10, "wide": 3},
    "cat": {"dog": 8, "animal": 4}
}

# width: maximum number of translations to consider per word
width = 3

# n_trans: number of final translations to return per word
n_trans = 2

ARGS = {
    "x2ys": x2ys,
    "x2cnt": x2cnt,
    "x2xs": x2xs,
    "width": width,
    "n_trans": n_trans
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
word_segment Ran
ran on a synthesized input
Kyubyong/word2word/word2word/tokenization.py
code served (permissive licence) · get_code("3fbb2428068ca79f")
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 re

class KoreanTokenizer:
    def pos(self, sent):
        return [("안녕", "NNG"), ("하세요", "XSV")]

class JapaneseTokenizer:
    def getWS(self, sent):
        return ["こんにちは", "世界"]

class ThaiTokenizer:
    def __call__(self, sent, engine=None):
        return ["สวัสดี", "ชาวโลก"]

class VietnameseTokenizer:
    def tokenize(self, sent):
        return "xin chào thế giới"

class ChineseTokenizer:
    def getWS(self, sent):
        return ["你好", "世界"]

class ChineseTWTokenizer:
    def cut(self, sent, cut_all=False):
        return ["你好", "世界"]

class ArabicTokenizer:
    def tokenize(self, sent):
        return ["مرحبا", "العالم"]

class DefaultTokenizer:
    def tokenize(self, sent):
        return ["hello", "world"]

ARGS = {
    "sent": "Hello world",
    "lang": "en",
    "tokenizer": DefaultTokenizer()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 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
exists Not yet run
unverified (harvested, no recorded run)
Kyubyong/word2word/word2word/utils.py
code served (permissive licence) · get_code("b4213b13fbb65ec1")
How it ran

no invocation recorded.

get_download_url Not yet run
unverified (harvested, no recorded run)
Kyubyong/word2word/word2word/utils.py
code served (permissive licence) · get_code("4b2978de4060aa1c")
How it ran

no invocation recorded.

rerank_mp Not yet run
unverified (harvested, no recorded run)
kakaobrain/word2word/word2word/methods.py
code served (permissive licence) · get_code("ffa747727408d325")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

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

We present word2word, a publicly available dataset and an open-source Python package for cross-lingual word translations extracted from sentence-level parallel corpora. Our dataset provides top-k word translations in 3,564 (directed) language pairs across 62 languages in OpenSubtitles2018 (Lison et al., 2018). To obtain this dataset, we use a count-based bilingual lexicon extraction model based on the observation that not only source and target words but also source words themselves can be highly correlated. We illustrate that the resulting bilingual lexicons have high coverage and attain competitive translation quality for several language pairs. We wrap our dataset and model in an easy-to-use Python library, which supports downloading and retrieving top-k word translations in any of the supported language pairs as well as computing top-k word translations for custom parallel corpora.

For agents

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

get_harvested_code_for_paper("1911.12019")
get_code_for_paper("1911.12019")
have("1911.12019")

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

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

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

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

Connect an agent — have() is free.