SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1812.11760 · 2018

Multilingual Constituency Parsing with Self-Attention and Pre-Training

arXiv · PDF · Open in the Atlas

Code that ran

22 of 28 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 19 have no contract verdict; 3 failures of our instrument; 6 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/1812.11760.json · badge: /api/ran/1812.11760.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
nikitakit/self-attentive-parser canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
ghazalkhalighinejad/approximating-cky community (classifier label)
classifier basis not recorded on the link
8 ran · 4 no recorded run
thomaslu2000/incremental-parsing-representations community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
FunctionStatusWhere it lives
UniversalTransformerRandomLayerEncoderWithLayer Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/models/ndr.py
code served (permissive licence) · get_code("5304ef0f453a56ad")
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 function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a minimal layer that can be called with (data, *args, **kwargs)
class SimpleLayer(nn.Module):
    def __init__(self, input_dim=4, output_dim=4):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, data, *args, **kwargs):
        return self.linear(data)

# Create the layer class to pass to the wrapper
layer_class = SimpleLayer

# Define arguments for UniversalTransformerRandomLayerEncoderWithLayer
# The function returns a lambda that creates UniversalTransformerRandomLayerEncoder
# So we need to call it with a layer class

ARGS = {
    "layer": layer_class,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
arabic Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/transliterate.py
code served (permissive licence) · get_code("c6fbc9f36f128a4d")
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.

# Setup code for arabic() function

ARGS = {
    'inp': 'bism'
}

# Test with a Buckwalter escape sequence
ARGS_ESCAPED = {
    'inp': '-LRB-test-RRB-'
}

# Test with mixed content
ARGS_MIXED = {
    'inp': "b'Asoma"
}

# Primary test case
ARGS = {
    'inp': 'bism'
}
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
chartscores_from_2hids Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/models/all_models.py
code served (permissive licence) · get_code("1248ec1004d55757")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a minimal decoder that takes chartrep and outputs scores
class MinimalDecoder(nn.Module):
    def __init__(self, input_dim, output_dim=1):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        # x is bsz x T x T x dim
        # We need to output bsz x T x T x output_dim
        bsz, T, T2, dim = x.size()
        x_flat = x.view(-1, dim)
        out_flat = self.linear(x_flat)
        out = out_flat.view(bsz, T, T2, -1)
        return out

# Set up parameters
bsz = 2
T = 3
dim = 4
output_dim = 1

# Create hids1 and hids2: bsz x T x dim
hids1 = torch.randn(bsz, T, dim)
hids2 = torch.randn(bsz, T, dim)

# Create decoder
decoder = MinimalDecoder(input_dim=dim * 2, output_dim=output_dim)

ARGS = {
    "hids1": hids1,
    "hids2": hids2,
    "decoder": decoder,
    "cat": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 3, 1) — shape (2, 3, 3, 1) 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
chartscores_from_hids Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/models/all_models.py
code served (permissive licence) · get_code("6707b9653e35add5")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleDecoder(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        # x is bsz x T x T x (2*halfsz)
        # We need to output bsz x T x T x output_dim
        bsz, T1, T2, dim = x.size()
        x_flat = x.view(bsz * T1 * T2, dim)
        out = self.linear(x_flat)
        out = out.view(bsz, T1, T2, -1)
        return out

# Create small tensors and decoder
bsz = 2
T = 3
dim = 4
halfsz = dim // 2

# hids: bsz x T x dim
hids = torch.randn(bsz, T, dim)

# decoder: takes bsz x T x T x dim and outputs bsz x T x T x output_dim
decoder = SimpleDecoder(input_dim=dim, output_dim=2)

ARGS = {
    'hids': hids,
    'decoder': decoder
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 3, 2) — shape (2, 3, 3, 2) 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
collapse_unary_strip_pos Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/benepar/decode_chart.py
code served (permissive licence) · get_code("bd029ebdc4c2a411")
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 Tree. 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 nltk

# Create a simple tree structure for testing
# The function expects an nltk.tree.Tree object
tree = nltk.tree.Tree('TOP', [
    nltk.tree.Tree('S', [
        nltk.tree.Tree('NP', [
            nltk.tree.Tree('DET', ['the']),
            nltk.tree.Tree('NN', ['cat'])
        ]),
        nltk.tree.Tree('VP', [
            nltk.tree.Tree('VBZ', ['sat'])
        ])
    ])
])

ARGS = {
    'tree': tree,
    'strip_top': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tree — a Tree 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
collapse_unlabel_binarize Ran
ran on a synthesized input
thomaslu2000/incremental-parsing-representations/src/tree_transforms.py
code served (permissive licence) · get_code("ad00821962c48d10")
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 Tree. 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 nltk.tree import Tree

# Create test trees for the collapse_unlabel_binarize function
# The function expects Tree objects from nltk.tree

# Test case 1: A simple tree with a single child string
tree1 = Tree('NP', ['dog'])

# Test case 2: A more complex tree structure
tree2 = Tree('S', [
    Tree('NP', ['the', 'cat']),
    Tree('VP', ['runs'])
])

# Test case 3: A tree with multiple children that need binarization
tree3 = Tree('S', [
    Tree('NP', ['John']),
    Tree('VP', ['ate']),
    Tree('NP', ['pizza'])
])

# Test case 4: Deeply nested tree
tree4 = Tree('S', [
    Tree('NP', [
        Tree('Det', ['the']),
        Tree('N', ['dog'])
    ]),
    Tree('VP', [
        Tree('V', ['barks'])
    ])
])

ARGS = {
    'tree': tree2,
    'default_label': 'S'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tree — a Tree 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
cub_traverse Ran
ran on a synthesized input
thomaslu2000/incremental-parsing-representations/src/tree_transforms.py
code served (permissive licence) · get_code("29605c9c3042ed16")
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 Tree. 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 nltk.tree import Tree

# Construct a valid parse tree argument
# The function performs recursive traversal of tree structures,
# checking if items are strings or Tree objects with length

# Build a simple tree structure with multiple levels
leaf1 = "cat"
leaf2 = "sat"
leaf3 = "mat"
leaf4 = "on"

# Create a tree: (S (NP cat) (VP (V sat) (PP (P on) (NP mat))))
subtree1 = Tree('NP', [leaf1])
subtree2 = Tree('P', [leaf4])
subtree3 = Tree('NP', [leaf3])
subtree4 = Tree('PP', [subtree2, subtree3])
subtree5 = Tree('V', [leaf2])
subtree6 = Tree('VP', [subtree5, subtree4])
main_tree = Tree('S', [subtree1, subtree6])

ARGS = {
    'tree': main_tree,
    'default_label': 'S'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tree — a Tree 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
extract_parse Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/my_utils.py
code served (permissive licence) · get_code("1e2e209296c87494")
How it ran

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

import torch

torch.manual_seed(0)

# Analyze the function:
# - span: either a tuple of tensors or a tensor
# - length: an integer
# - The function expects cover to be a tensor with shape (N, 3) where each row has [w, r, A]
# - tree is a dict mapping indices to strings/parse trees

# Case 1: span is a tuple - torch.stack(span).t() should produce (N, 3) tensor
# Case 2: span is a tensor - (span > 0).float().nonzero() should produce (N, 3) tensor

# Let's construct a valid argument set using Case 2 (simpler):
# We need a tensor where nonzero() gives us coordinates in (N, 3) format
# For a 3D tensor, nonzero() returns (N, 3) shaped indices

# Create a sparse 3D tensor so nonzero gives us a few points
span = torch.zeros(3, 4, 5)  # 3D tensor
span[0, 1, 2] = 1
span[1, 0, 3] = 1
span[2, 2, 1] = 1

# When span > 0 and we call nonzero(), we get indices of non-zero elements
# This will give us shape (3, 3) - three non-zero entries with 3 coordinates each

length = 10

ARGS = {
    "span": span,
    "length": length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
format_elapsed Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/export.py
code served (permissive licence) · get_code("d568621c7cfd96cc")
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 time

# format_elapsed takes a start_time parameter
# Looking at the function body, it uses time.time() - start_time
# so start_time should be a float representing seconds since epoch

# Create a start_time from a few seconds ago
start_time = time.time() - 3665  # This is 1 hour, 1 minute, 5 seconds ago

ARGS = {
    "start_time": start_time
}
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_graph Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from dpfried/rnng-bert
pointer only; the stored copy get_code serves, from dpfried/rnng-bert, is pointer only (licence: NONE) · get_code("4289934e599d98d1")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_labeled_spans Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/benepar/decode_chart.py
code served (permissive licence) · get_code("3f9e76811bf1f815")
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 nltk
from nltk.tree import Tree

# Create a simple parse tree to use as test input
# Tree structure: (S (NP (DT the) (NN dog)) (VP (VBZ runs)))
tree = Tree('S', [
    Tree('NP', [
        Tree('DT', ['the']),
        Tree('NN', ['dog'])
    ]),
    Tree('VP', [
        Tree('VBZ', ['runs'])
    ])
])

ARGS = {
    'tree': tree
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — 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
guess_space_after Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/benepar/ptb_unescape.py
code served (permissive licence) · get_code("9c0f1355ed00c9d1")
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

# Test data for guess_space_after function
escaped_words_english = ["Hello", "n't", "can", "not", "'s", "world", "."]
escaped_words_non_english = ["Hola", "-", "mundo", ",", "``", "test"]

ARGS = {
    "escaped_words": escaped_words_english,
    "for_english": True
}
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
guess_space_after_non_english Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/benepar/ptb_unescape.py
code served (permissive licence) · get_code("2da31f9e8d6c6497")
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.

# Analyze the function to understand what it needs
# The function takes a list of words (escaped_words) and returns a list of booleans
# It iterates through the words and checks for specific string patterns

ARGS = {
    "escaped_words": [
        "hello",
        "-LRB-",
        "world",
        ",",
        "test",
        "--",
        "end",
        ".",
        "-RRB-",
        "word-prefix",
        "$value"
    ]
}
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
hebrew Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/transliterate.py
code served (permissive licence) · get_code("98db1b220dd2ecb7")
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.

# Setup code for the hebrew function

ARGS = {
    'inp': 'ABGH'
}
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
inner_score2 Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/models/all_models.py
code served (permissive licence) · get_code("321467c6959866dd")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# Stand-in config class
class Config:
    def __init__(self):
        self.pad_token_id = 0
        self.hidden_size = 4
        self.num_hidden_layers = 2
        self.vocab_size = 10
        self.num_attention_heads = 2
        self.intermediate_size = 8

# Stand-in encoder that mimics BERT behavior
class StandInEncoder(nn.Module):
    def __init__(self, config):
        super().__init__()
        self.config = config
        self.embedding = nn.Embedding(config.vocab_size, config.hidden_size)
        self.layers = nn.ModuleList([
            nn.TransformerEncoderLayer(
                d_model=config.hidden_size,
                nhead=config.num_attention_heads,
                dim_feedforward=config.intermediate_size,
                batch_first=True
            )
            for _ in range(config.num_hidden_layers)
        ])
    
    def forward(self, inputs_embeds, output_hidden_states=False, attention_mask=None):
        hidden_states = [inputs_embeds]
        x = inputs_embeds
        for layer in self.layers:
            x = layer(x, src_key_padding_mask=~attention_mask if attention_mask is not None else None)
            if output_hidden_states:
                hidden_states.append(x)
        
        return type('EncoderOutput', (), {'hidden_states': hidden_states})()

# Stand-in classification head
class IClsHead(nn.Module):
    def __init__(self, hidden_size, output_size=1):
        super().__init__()
        self.linear = nn.Linear(hidden_size, output_size)
    
    def forward(self, x):
        return self.linear(x)

# Build the model
class StandInModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = Config()
        self.encoder = StandInEncoder(self.config)
        self.icls = IClsHead(self.config.hidden_size)

# Create model
model = StandInModel()

# Create arguments
bsz = 2
T = 3
hidden_size = 4

# inp: token IDs (bsz, T) - used to create attention mask
inp = torch.tensor([[1, 2, 3], [4, 5, 0]], dtype=torch.long)

# inputs_embeds: (bsz, T, hidden_size) - embedded input
inputs_embeds = torch.randn(bsz, T, hidden_size)

# firsts: used only for unpacking size, so shape (bsz, T)
firsts = torch.zeros(bsz, T, dtype=torch.long)

# lengths: not actually used in the function body
lengths = torch.tensor([3, 2], dtype=torch.long)

ARGS = {
    'model': model,
    'inp': inp,
    'inputs_embeds': inputs_embeds,
    'firsts': firsts,
    'lengths': lengths
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 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
make_command Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from dpfried/rnng-bert
pointer only; the stored copy get_code serves, from dpfried/rnng-bert, is pointer only (licence: NONE) · get_code("bf01d3fec3465c34")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

make_voc Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/get_data/get_pcfg.py
code served (permissive licence) · get_code("782a5dffeb3d6b35")
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.

from collections import Counter

# Create a small counter with various word frequencies
cntr = Counter({
    'hello': 100,
    'world': 75,
    'the': 200,
    'a': 45,
    'test': 60,
    'rare': 5,
    'uncommon': 10,
})

ARGS = {
    'cntr': cntr,
    'thresh': 50,
    'add_pad': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
make_voc Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/get_data/make_data.py
code served (permissive licence) · get_code("d501ca5164d5e1b1")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - make_voc takes 'types' parameter
# - It iterates over 'types' and creates a list and dict from it
# - 'types' should be iterable with hashable elements

# Create a simple iterable of types/things
types = ['cat', 'dog', 'bird', 'fish']

ARGS = {
    'types': types
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — 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
pad_charts Ran
ran on a synthesized input
nikitakit/self-attentive-parser/src/benepar/decode_chart.py
code served (permissive licence) · get_code("5fa1c233f4e619bb")
How it ran

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

import torch

torch.manual_seed(0)

# Create a list of variable-length 2D charts (square matrices)
# Each chart is a 2D tensor with different sizes
chart1 = torch.randn(3, 3, dtype=torch.float32)
chart2 = torch.randn(4, 4, dtype=torch.float32)

# List of charts with variable lengths
charts = [chart1, chart2]

# Define ARGS dict with all parameters
ARGS = {
    "charts": charts,
    "padding_value": -100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 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
parse Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from dpfried/rnng-bert
pointer only; the stored copy get_code serves, from dpfried/rnng-bert, is pointer only (licence: NONE) · get_code("d73ae4737d0072dc")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

random_subspan Ran
ran on a synthesized input
thomaslu2000/incremental-parsing-representations/src/tree_transforms.py
code served (permissive licence) · get_code("8ec94d08b3904eba")
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 numpy as np

def random_subspan(tree):
    if tree is None or isinstance(tree, str) or isinstance(tree[0], str) or (np.random.random() < 0.3):
        return tree
    return random_subspan(tree[np.random.choice(len(tree))])

# Set seed for reproducibility
np.random.seed(0)

# The function expects a tree structure that can be:
# 1. None
# 2. A string
# 3. A list/sequence where tree[0] is a string
# 4. A list/sequence of other tree structures (nested lists)

# Create a valid tree structure - nested lists of sublists
tree = [
    [
        ["leaf1"],
        ["leaf2"]
    ],
    [
        ["leaf3"],
        ["leaf4"]
    ],
    [
        ["leaf5"],
        ["leaf6"]
    ]
]

ARGS = {
    "tree": tree
}
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 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
sinusoidal_pos_embedding Ran
ran on a synthesized input
ghazalkhalighinejad/approximating-cky/models/ndr.py
code served (permissive licence) · get_code("1189a8b722298cac")
How it ran

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

import torch
import math

torch.manual_seed(0)

ARGS = {
    "d_model": 64,
    "max_len": 128,
    "pos_offset": 0,
    "device": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (128, 64) — shape (128, 64) 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
evalb Not yet run
unverified (harvested, no recorded run)
nikitakit/self-attentive-parser/src/evaluate.py
code served (permissive licence) · get_code("f800c1f3fd0d012a")
How it ran

no invocation recorded.

get_potentials_and_trees Not yet run
unverified (harvested, no recorded run)
ghazalkhalighinejad/approximating-cky/get_data/get_pcfg.py
code served (permissive licence) · get_code("ec1bd125cee0d5c8")
How it ran

no invocation recorded.

get_trees_and_vocs Not yet run
unverified (harvested, no recorded run)
ghazalkhalighinejad/approximating-cky/get_data/get_pcfg.py
code served (permissive licence) · get_code("aa0d9a3ff9c7e9c0")
How it ran

no invocation recorded.

ptb_unescape Not yet run
unverified (harvested, no recorded run)
nikitakit/self-attentive-parser/src/benepar/ptb_unescape.py
code served (permissive licence) · get_code("8aedd0d17836b284")
How it ran

no invocation recorded.

stupid_extract_parse2 Not yet run
unverified (harvested, no recorded run)
ghazalkhalighinejad/approximating-cky/my_utils.py
code served (permissive licence) · get_code("801802f2f39d3775")
How it ran

no invocation recorded.

tree_from_span Not yet run
unverified (harvested, no recorded run)
ghazalkhalighinejad/approximating-cky/my_utils.py
code served (permissive licence) · get_code("a7368615fa47e4fe")
How it ran

no invocation recorded.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 10 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 7 later) and 18 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
arabic 3 other papers
1 dated earlier, 2 later
1805.01052 (2018-05)
Constituency Parsing with a Self-Attentive Encoder
1907.02684 (2019-07)
Head-Driven Phrase Structure Grammar Parsing on Penn Treebank
2021.acl-long.205 (2021 (year only))
N -ary Constituent Tree Parsing with Recursive Semi-Markov Model
hebrew 3 other papers
1 dated earlier, 2 later
1805.01052 (2018-05)
Constituency Parsing with a Self-Attentive Encoder
1907.02684 (2019-07)
Head-Driven Phrase Structure Grammar Parsing on Penn Treebank
2021.acl-long.205 (2021 (year only))
N -ary Constituent Tree Parsing with Recursive Semi-Markov Model
get_graph 2 other papers
1 dated earlier, 1 later
1602.07776 (2016-02)
Recurrent Neural Network Grammars
1907.04347 (2019-07)
Cross-Domain Generalization of Neural Constituency Parsers
make_command 2 other papers
1 dated earlier, 1 later
1602.07776 (2016-02)
Recurrent Neural Network Grammars
1907.04347 (2019-07)
Cross-Domain Generalization of Neural Constituency Parsers
parse 2 other papers
1 dated earlier, 1 later
1602.07776 (2016-02)
Recurrent Neural Network Grammars
1907.04347 (2019-07)
Cross-Domain Generalization of Neural Constituency Parsers
UniversalTransformerRandomLayerEncoderWithLayer 1 other paper
1 later
2110.07732 (2021-10)
The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalization
collapse_unary_strip_pos 1 other paper
1 dated earlier
1805.01052 (2018-05)
Constituency Parsing with a Self-Attentive Encoder
format_elapsed 1 other paper
1 dated earlier
1805.01052 (2018-05)
Constituency Parsing with a Self-Attentive Encoder
pad_charts 1 other paper
1 dated earlier
1805.01052 (2018-05)
Constituency Parsing with a Self-Attentive Encoder
sinusoidal_pos_embedding 1 other paper
1 later
2310.19089 (2023-10)
Pushdown Layers: Encoding Recursive Structure in Transformer Language Models

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 show that constituency parsing benefits from unsupervised pre-training across a variety of languages and a range of pre-training conditions. We first compare the benefits of no pre-training, fastText, ELMo, and BERT for English and find that BERT outperforms ELMo, in large part due to increased model capacity, whereas ELMo in turn outperforms the non-contextual fastText embeddings. We also find that pre-training is beneficial across all 11 languages tested; however, large model sizes (more than 100 million parameters) make it computationally expensive to train separate models for each language. To address this shortcoming, we show that joint multilingual pre-training and fine-tuning allows sharing all but a small number of parameters between ten languages in the final model. The 10x reduction in model size compared to fine-tuning one model per language causes only a 3.2% relative error increase in aggregate. We further explore the idea of joint fine-tuning and show that it gives low-resource languages a way to benefit from the larger datasets of other languages. Finally, we demonstrate new state-of-the-art results for 11 languages, including English (95.8 F1) and Chinese (91.8 F1).

For agents

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

get_harvested_code_for_paper("1812.11760")
get_code_for_paper("1812.11760")
have("1812.11760")

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

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

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

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

Connect an agent — have() is free.