Dataset Viewer
Auto-converted to Parquet Duplicate
sample_id
stringlengths
11
11
manuscript_license
stringclasses
6 values
manuscript
dict
relevant_papers
stringlengths
5.13k
5.05M
gold_discussion
stringlengths
585
27.1k
gold_discussion_content_id
listlengths
1
1
content_ids_referenced_in_gold_discussion
listlengths
0
7
bibliography_entry_ids_referenced_in_gold_discussion
listlengths
1
12
PMC13006927
CC BY
{ "paper_id": "PMC13006927", "paper_id_type": "pmc", "all_known_paper_ids": "{\"pmc\": \"PMC13006927\", \"pmid\": \"41878182\", \"doi\": \"10.7759/cureus.104011\"}", "publication_date": { "year": 2026, "month": 2, "day": 21 }, "subjects": [ "Public Health", "Preventive Medicine" ], "...
{"REF1": {"paper_id": "REF1", "paper_id_type": "custom", "all_known_paper_ids": {"custom": "REF1"}, "publication_date": {"year": null, "month": null, "day": null}, "subjects": [], "license": "", "title": "1 World Health Organization: Leprosy 2 2026 2025 20 2026 https://www.who.int/news-room/fact-sheets/detail/leprosy",...
{"content_id": [2], "content_type": "section", "header": "Discussion", "contents": [{"content_id": [2, 0], "content_type": "paragraph", "text": "This case illustrates how leprosy-related stigma and diminished programmatic intensity in the post-elimination era can contribute to delayed diagnosis and preventable disabili...
[ 2 ]
[]
[ "REF4", "REF7", "REF5", "REF6" ]
PMC12942928
CC BY
{"paper_id":"PMC12942928","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC12942928\", \"(...TRUNCATED)
"{\"B1-micromachines-17-00151\": {\"paper_id\": \"251720114\", \"paper_id_type\": \"s2cid\", \"all_k(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"4. Discussion\", \"contents\": [(...TRUNCATED)
[ 3 ]
[]
[ "B28-micromachines-17-00151", "B29-micromachines-17-00151" ]
PMC13021657
CC BY
{"paper_id":"PMC13021657","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC13021657\", \"(...TRUNCATED)
"{\"B1\": {\"paper_id\": \"146784402\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"do(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "B6" ]
PMC12840421
CC BY
{"paper_id":"PMC12840421","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC12840421\", \"(...TRUNCATED)
"{\"B1-children-13-00111\": {\"paper_id\": \"210849009\", \"paper_id_type\": \"s2cid\", \"all_known_(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"4. Discussion\", \"contents\": [(...TRUNCATED)
[ 3 ]
[]
[ "B20-children-13-00111", "B19-children-13-00111" ]
PMC12934666
CC BY-NC
{"paper_id":"PMC12934666","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC12934666\", \"(...TRUNCATED)
"{\"R1\": {\"paper_id\": \"R1\", \"paper_id_type\": \"custom\", \"all_known_paper_ids\": {\"custom\"(...TRUNCATED)
"{\"content_id\": [7], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 7 ]
[]
[ "R43" ]
PMC12786493
CC BY
{"paper_id":"PMC12786493","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC12786493\", \"(...TRUNCATED)
"{\"B1-jcm-15-00319\": {\"paper_id\": \"B1-jcm-15-00319\", \"paper_id_type\": \"custom\", \"all_know(...TRUNCATED)
"{\"content_id\": [2], \"content_type\": \"section\", \"header\": \"3. Discussion\", \"contents\": [(...TRUNCATED)
[ 2 ]
[]
[ "B21-jcm-15-00319" ]
PMC13012715
CC BY
{"paper_id":"PMC13012715","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC13012715\", \"(...TRUNCATED)
"{\"REF1\": {\"paper_id\": \"49267344\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"d(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[ [ 1, 2 ] ]
[ "REF13", "REF16", "REF12", "REF14", "REF15" ]
PMC13075416
CC BY-NC
{"paper_id":"PMC13075416","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC13075416\", \"(...TRUNCATED)
"{\"cit0001\": {\"paper_id\": \"26624825\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "cit0038" ]
PMC13025705
CC BY-NC
{"paper_id":"PMC13025705","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC13025705\", \"(...TRUNCATED)
"{\"cit0001\": {\"paper_id\": \"23234858\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "cit0014", "cit0019", "cit0018", "cit0009", "cit0017", "cit0016", "cit0020" ]
PMC12867510
CC BY
{"paper_id":"PMC12867510","paper_id_type":"pmc","all_known_paper_ids":"{\"pmc\": \"PMC12867510\", \"(...TRUNCATED)
"{\"R1\": {\"paper_id\": \"8547662\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"doi\(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "R31" ]
End of preview. Expand in Data Studio

PMCOA Discussion Generation Dataset

A dataset of 627 biomedical papers from PubMed Central Open Access, built for the task of discussion section generation: given a manuscript (with its Discussion section removed) and the full text of its cited papers, generate the Discussion section.

Each sample contains:

  • manuscript — the paper with its Discussion section removed
  • relevant_papers — full text of the papers cited in the gold discussion
  • gold_discussion — the ground-truth Discussion section

The canonical schema is defined in src/discussion_generation/data/schemas.py and documented in detail in src/discussion_generation/data/README.md.


Why some fields are JSON strings

Apache Arrow (which backs HuggingFace datasets) requires every column to have a fixed, uniform schema. Two patterns in the native schema are incompatible with that:

Pattern Arrow's problem
dict[PaperIdType, ...] — keys are an open str enum Arrow infers column types from the first record; unseen key names in later records break the schema
list[Content] where Content = Paragraph | Section — recursive, polymorphic Arrow cannot represent recursive or union-typed nested structs

The following fields are serialized to JSON strings before upload:

HF column Native type Reason
manuscript.all_known_paper_ids dict[PaperIdType, PaperId] dynamic dict keys
manuscript.contents list[Content] recursive / polymorphic
manuscript.bibliography dict[BibliographyEntryId, BibliographyEntry] dynamic dict keys
relevant_papers dict[BibliographyEntryId, Paper] dynamic dict keys at top level
gold_discussion Section recursive / polymorphic

Additionally, ContentId (tuple[int, ...]) is stored as list[int] because Arrow has no tuple type. This affects gold_discussion_content_id and each element of content_ids_referenced_in_gold_discussion.

All other fields keep their original structure.


Restoring the original structure

Parse JSON strings back and validate with the Sample Pydantic model. Pydantic handles list[int]tuple[int, ...] coercion for ContentId fields automatically.

import json
from datasets import load_dataset
from discussion_generation.data.schemas import Sample

ds = load_dataset("jessicalamjh/discussion-generation", split="train")

def restore(record: dict) -> Sample:
    record = dict(record)

    m = dict(record["manuscript"])
    m["all_known_paper_ids"] = json.loads(m["all_known_paper_ids"])
    m["contents"]            = json.loads(m["contents"])
    m["bibliography"]        = json.loads(m["bibliography"])
    record["manuscript"] = m

    record["relevant_papers"] = json.loads(record["relevant_papers"])
    record["gold_discussion"]  = json.loads(record["gold_discussion"])

    return Sample.model_validate(record)

samples: list[Sample] = [restore(r) for r in ds]
Downloads last month
80