SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.14142 · 2019

Discourse-Aware Neural Extractive Text Summarization

arXiv · PDF · Open in the Atlas

Code that ran

10 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; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 3 failures of our instrument; 1 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/1910.14142.json · badge: /api/ran/1910.14142.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
jiacheng-xu/DiscoBERT canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
clean Ran
ran; our contract draft was wrong, not the code
jiacheng-xu/DiscoBERT/model/model_util.py
code served (permissive licence) · get_code("bedeff473c33061f")
How it ran

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

import re

REMAP = {'-lrb-': '(', '-rrb-': ')', '-lcb-': '{', '-rcb-': '}', '-lsb-': '[', '-rsb-': ']', '``': '"', "''": '"'}

def clean(x):
    return re.sub("-lrb-|-rrb-|-lcb-|-rcb-|-lsb-|-rsb-|``|''", lambda m: REMAP.get(m.group()), x)

# The function takes a string x and applies regex substitution with REMAP dictionary
# We need to provide a string that contains some of the patterns that will be replaced

ARGS = {
    'x': "This is a test -lrb- with some -rrb- brackets and ``quotes'' and -lcb- braces -rcb- and -lsb- square -rsb- brackets"
}
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
dedup_cal_rouge Ran
ran on a synthesized input
jiacheng-xu/DiscoBERT/data_preparation/search_algo.py
code served (permissive licence) · get_code("e586754adbafb40f")
How it ran

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

import torch
import numpy as np

# Construct valid arguments for dedup_cal_rouge function
# The function takes two sets of ngrams and their lengths, then calculates ROUGE metrics

evaluated_ngrams = {'the cat', 'cat sat', 'sat on', 'on the', 'the mat'}
reference_ngrams = {'the cat', 'cat sat', 'sat on', 'the dog', 'dog ran'}
evaluated_len = 5
reference_len = 5

ARGS = {
    'evaluated_ngrams': evaluated_ngrams,
    'reference_ngrams': reference_ngrams,
    'evaluated_len': evaluated_len,
    'reference_len': reference_len
}
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 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
detect_nan Ran
ran on a synthesized input
jiacheng-xu/DiscoBERT/model/model_util.py
code served (permissive licence) · get_code("a509b3d17e06ff13")
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 bool, 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

torch.manual_seed(0)

# Construct a tensor with some NaN values for testing
input_tensor = torch.tensor([1.0, 2.0, float('nan'), 4.0])

ARGS = {
    "input_tensor": input_tensor
}
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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_n_grams Ran
ran on a synthesized input
jiacheng-xu/DiscoBERT/model/model_util.py
code served (permissive licence) · get_code("87b6ab194b248d41")
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 set. 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

ARGS = {
    'inp_str': 'the quick brown fox jumps over the lazy dog',
    'ngram': 3,
    'connect_punc': '_'
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
identify_partition_name Ran
ran on a synthesized input
jiacheng-xu/DiscoBERT/model/data_reader.py
code served (permissive licence) · get_code("7e86e870548f6b45")
How it ran

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

import torch

torch.manual_seed(0)

ARGS = {
    'full_name': 'train_dataset'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
label_filter Ran
ran on a synthesized input
jiacheng-xu/DiscoBERT/model/data_reader.py
code served (permissive licence) · get_code("fc2388651e7bf975")
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. 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: label_filter takes 'labs' parameter
# The function iterates through labs (labs is iterable)
# For each l in labs, it calls sum(l), so each element must be summable
# It uses insert(0, l) and append(l) on rt_list, so rt_list is a list
# Each l is compared numerically after sum(), so l should be a list/array of numbers

# Create sample label data - list of lists containing numeric values
labs = [
    [1, 2, 3],
    [5, 6, 7, 8],
    [2, 1],
    [10, 20, 30, 40, 50]
]

ARGS = {
    "labs": labs
}
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 list — a list 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
load_dataset Ran
ran on a synthesized input
jiacheng-xu/DiscoBERT/model/data_reader.py
code served (permissive licence) · get_code("da9f869393ee8366")
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 generator. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory for test data
tmpdir = tempfile.mkdtemp()

# Create minimal dummy datasets and save them as .pt files
# We'll create a few datasets for the 'train' corpus type
dummy_dataset_1 = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([1, 0])),
]
dummy_dataset_2 = [
    (torch.randn(2, 4), torch.tensor([1, 1])),
]

# Save dummy datasets
bert_data_path = os.path.join(tmpdir, 'bert_data')
torch.save(dummy_dataset_1, bert_data_path + '.train.0.pt')
torch.save(dummy_dataset_2, bert_data_path + '.train.1.pt')

# Also create a valid dataset for completeness
dummy_valid_dataset = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
]
torch.save(dummy_valid_dataset, bert_data_path + '.valid.pt')

# Create a simple args object
class Args:
    def __init__(self, bert_data_path):
        self.bert_data_path = bert_data_path

args_obj = Args(bert_data_path)

ARGS = {
    'args': args_obj,
    'corpus_type': 'train',
    'shuffle': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
randomString Ran
ran; our contract draft was wrong, not the code
jiacheng-xu/DiscoBERT/model/pyrouge_metrics.py
code served (permissive licence) · get_code("0dcc75805f78b65a")
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 random
import string

# The function randomString takes one optional parameter: stringLength
# It generates a random string of lowercase letters with length stringLength
# The default value is 10

ARGS = {
    "stringLength": 10
}
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
resolve_dependency Ran
ran on a synthesized input
jiacheng-xu/DiscoBERT/model/decoding_util.py
code served (permissive licence) · get_code("0c3721704af8370e")
How it ran

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

import torch

torch.manual_seed(0)

# Analyze the function:
# - It takes 'dep' as parameter
# - It iterates over 'dep' with: for _d in dep
# - Each _d is unpacked as: source_node, tgt_node = _d
# - It uses integer operations: source_node - 1, tgt_node - 1
# - It builds a dictionary with integer keys and list values

# Construct valid test data
dep = [
    (1, 2),
    (1, 3),
    (2, 3),
    (2, 2),  # This will be skipped since source_node == tgt_node
    (3, 4),
]

ARGS = {
    "dep": dep,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rouge_results_to_str Ran
ran; our contract draft was wrong, not the code
jiacheng-xu/DiscoBERT/model/pyrouge_metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from gb-kgp/MEDVOC, is pointer only (licence: NONE) · get_code("14b39c4dc7a42e40")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from gb-kgp/MEDVOC, and GitHub detected no licence in that repository when it was checked. 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.

fill_upper_right_matrix Not yet run
unverified (harvested, no recorded run)
jiacheng-xu/DiscoBERT/model/decoding_util.py
code served (permissive licence) · get_code("1ddb576b2d27efd9")
How it ran

no invocation recorded.

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, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 later) and 8 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
rouge_results_to_str 5 other papers
2 dated earlier, 3 later
1905.13164 (2019-05)
Hierarchical Transformers for Multi-Document Summarization
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
2004.14135 (2020-04)
BERT Fine-tuning For Arabic Text Summarization
and 2 more not named here
clean 4 other papers
1 dated earlier, 3 later
1903.10318 (2019-03)
Fine-tune BERT for Extractive Summarization
aaai_21432 (2022 (year only))
DIALOGLM: Pre-trained Model for Long Dialogue Understanding and Summarization
2212.10218 (2022-12)
GanLM: Encoder-Decoder Pre-training with an Auxiliary Discriminator
and 1 more not named here
randomString 1 other paper
1 later
2023.findings-eacl.123 (2023 (year only))
EDU-level Extractive Summarization with Varying Summary Lengths

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

Recently BERT has been adopted for document encoding in state-of-the-art text summarization models. However, sentence-based extractive models often result in redundant or uninformative phrases in the extracted summaries. Also, long-range dependencies throughout a document are not well captured by BERT, which is pre-trained on sentence pairs instead of documents. To address these issues, we present a discourse-aware neural summarization model - DiscoBert. DiscoBert extracts sub-sentential discourse units (instead of sentences) as candidates for extractive selection on a finer granularity. To capture the long-range dependencies among discourse units, structural discourse graphs are constructed based on RST trees and coreference mentions, encoded with Graph Convolutional Networks. Experiments show that the proposed model outperforms state-of-the-art methods by a significant margin on popular summarization benchmarks compared to other BERT-base models.

For agents

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

get_harvested_code_for_paper("1910.14142")
get_code_for_paper("1910.14142")
have("1910.14142")

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

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

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

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

Connect an agent — have() is free.