Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions bin/create_hugo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,135 @@ def export_events(anthology, builddir, dryrun):
else:
data["title"] = f"{anthology.venues[main_venue].name} ({data['year']})"

# Add talks data if available
talks_data = []
for idx, talk in enumerate(event.talks or [], 1):
# Generate talk ID from video filename if available, otherwise use default pattern
if "video" in talk.attachments and talk.attachments["video"].name:
# Extract talk ID from video filename like "2022.acl-keynote.2.mp4"
video_name = talk.attachments["video"].name
if video_name.endswith(".mp4"):
# Remove .mp4 extension to get the talk ID
talk_id = video_name[:-4]
else:
talk_id = video_name
else:
# Fallback to sequential numbering if no video
talk_id = f"{event.id}.talk-{idx}"

talk_data = {
"id": talk_id,
"title": talk.title.as_text(),
"title_html": remove_extra_whitespace(
talk.title.as_html(allow_url=False)
),
"speakers": [], # Process speakers differently
"type": talk.type,
}
# Process speakers - NameSpecification objects
for speaker in talk.speakers:
speaker_dict = person_to_dict(speaker.id if speaker.id else "", speaker)
talk_data["speakers"].append(speaker_dict)
# Add video URL if available
if "video" in talk.attachments:
talk_data["video_url"] = talk.attachments["video"].url
# Add other attachments
attachments = []
for att_type, attachment in talk.attachments.items():
if att_type != "video":
attachments.append(
{
"filename": attachment.name,
"type": att_type.capitalize(),
"url": attachment.url,
}
)
if attachments:
talk_data["attachments"] = attachments
talks_data.append(talk_data)
if talks_data:
data["talks"] = talks_data

all_events[event.id] = data

if not dryrun:
with open(f"{builddir}/data/events.json", "wb") as f:
f.write(ENCODER.encode(all_events))


def export_talks(anthology, builddir, dryrun):
# Export talks data
all_talks = {}
print("Exporting talks...")

for event in anthology.events.values():
if not event.talks:
continue

for idx, talk in enumerate(event.talks, 1):
# Generate talk ID from video filename if available, otherwise use default pattern
if "video" in talk.attachments and talk.attachments["video"].name:
# Extract talk ID from video filename like "2022.acl-keynote.2.mp4"
video_name = talk.attachments["video"].name
if video_name.endswith(".mp4"):
# Remove .mp4 extension to get the talk ID
talk_id = video_name[:-4]
else:
talk_id = video_name
else:
# Fallback to sequential numbering if no video
talk_id = f"{event.id}.talk-{idx}"

# Create talk data
talk_data = {
"id": talk_id,
"event_id": event.id,
"event_title": event.title.as_text() if event.title else f"{event.id}",
"title": talk.title.as_text(),
"title_html": remove_extra_whitespace(
talk.title.as_html(allow_url=False)
),
"speakers": [],
"type": talk.type,
}

# Process speakers
for speaker in talk.speakers:
speaker_data = person_to_dict(speaker.id if speaker.id else "", speaker)
talk_data["speakers"].append(speaker_data)

# Add video URL if available
if "video" in talk.attachments:
talk_data["video_url"] = talk.attachments["video"].url
talk_data["video_name"] = talk.attachments["video"].name

# Add other attachments
attachments = []
for att_type, attachment in talk.attachments.items():
if att_type != "video":
attachments.append(
{
"filename": attachment.name,
"type": att_type.capitalize(),
"url": attachment.url,
}
)
if attachments:
talk_data["attachments"] = attachments

# Add location and dates from event
if event.location:
talk_data["location"] = event.location
if event.dates:
talk_data["dates"] = event.dates

all_talks[talk_id] = talk_data

if not dryrun:
with open(f"{builddir}/data/talks.json", "wb") as f:
f.write(ENCODER.encode(all_talks))


def export_sigs(anthology, builddir, dryrun):
all_sigs = {}
print("Exporting SIGs...")
Expand Down Expand Up @@ -551,6 +673,7 @@ def export_anthology(anthology, builddir, clean=False, dryrun=False):
export_people(anthology, builddir, dryrun)
export_venues(anthology, builddir, dryrun)
export_events(anthology, builddir, dryrun)
export_talks(anthology, builddir, dryrun)
export_sigs(anthology, builddir, dryrun)


Expand Down
50 changes: 25 additions & 25 deletions data/xml/2021.acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12778,108 +12778,108 @@ The source code has been made available at \url{https://github.com/liam0949/DCLO
<talk>
<title>Keynote 1: Advancing Technological Equity in Speech and Language Processing</title>
<speaker><first>Helen</first><last>Meng</last></speaker>
<url type="video">2021.acl.keynote1.mp4</url>
<url type="video">2021.acl-keynote.1.mp4</url>
</talk>
<talk>
<title>Keynote 2: Learning and Processing Language from Wearables: Opportunities and Challenges</title>
<speaker><first>Alejandrina</first><last>Cristia</last></speaker>
<url type="video">2021.acl.keynote2.mp4</url>
<url type="video">2021.acl-keynote.2.mp4</url>
</talk>
<talk>
<title>Keynote 3: Reliable Characterizations of <fixed-case>NLP</fixed-case> Systems as a Social Responsibility</title>
<speaker><first>Christopher</first><last>Potts</last></speaker>
<url type="video">2021.acl.keynote3.mp4</url>
<url type="video">2021.acl-keynote.3.mp4</url>
</talk>
<talk>
<title>Opening Session</title>
<speaker><first>Chengqing</first><last>Zong</last></speaker>
<speaker><first>Roberto</first><last>Navigli</last></speaker>
<speaker><first>Fei</first><last>Xia</last></speaker>
<speaker><first>Wenjie</first><last>Li</last></speaker>
<url type="video">2021.acl.opening-session.mp4</url>
<url type="video">2021.acl-opening.1.mp4</url>
</talk>
<talk>
<title>Presidential Address</title>
<speaker><first>Rada</first><last>Mihalcea</last></speaker>
<url type="video">2021.acl.presidential-address.mp4</url>
<url type="video">2021.acl-presidential.1.mp4</url>
</talk>
<talk>
<title>Business Meeting: Business Manager Report</title>
<speaker><first>Priscilla</first><last>Rasmussen</last></speaker>
<url type="video">2021.acl.business-meeting1.mp4</url>
<url type="video">2021.acl-business.1.mp4</url>
</talk>
<talk>
<title>Business Meeting: Conference Officer Report</title>
<speaker><first>Yusuke</first><last>Miyao</last></speaker>
<url type="video">2021.acl.business-meeting2.mp4</url>
<url type="video">2021.acl-business.2.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>EACL</fixed-case> Report</title>
<speaker><first>Shuly</first><last>Wintner</last></speaker>
<url type="video">2021.acl.business-meeting3.mp4</url>
<url type="video">2021.acl-business.3.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>NAACL</fixed-case> Report</title>
<speaker><first>Colin</first><last>Cherry</last></speaker>
<url type="video">2021.acl.business-meeting4.mp4</url>
<url type="video">2021.acl-business.4.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>CL</fixed-case> Report</title>
<speaker><first>Hwee Tou</first><last>Ng</last></speaker>
<url type="video">2021.acl.business-meeting5.mp4</url>
<url type="video">2021.acl-business.5.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>TACL</fixed-case> Report</title>
<speaker><first>Brian</first><last>Roark</last></speaker>
<url type="video">2021.acl.business-meeting6.mp4</url>
<url type="video">2021.acl-business.6.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>ACL</fixed-case> <fixed-case>R</fixed-case>olling <fixed-case>R</fixed-case>eview Report</title>
<speaker><first>Amanda</first><last>Stent</last></speaker>
<url type="video">2021.acl.business-meeting7.mp4</url>
<url type="video">2021.acl-business.7.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>ACL</fixed-case> <fixed-case>A</fixed-case>nthology Report</title>
<speaker><first>Matt</first><last>Post</last></speaker>
<url type="video">2021.acl.business-meeting8.mp4</url>
<url type="video">2021.acl-business.8.mp4</url>
</talk>
<talk>
<title>Business Meeting: Professional Conduct Committee Report</title>
<speaker><first>Graeme</first><last>Hirst</last></speaker>
<speaker><first>Emily M.</first><last>Bender</last></speaker>
<url type="video">2021.acl.business-meeting9.mp4</url>
<url type="video">2021.acl-business.9.mp4</url>
</talk>
<talk>
<title>Business Meeting: Publicity Director Report</title>
<speaker><first>Barbara</first><last>Plank</last></speaker>
<speaker><first>Sarvnaz</first><last>Karimi</last></speaker>
<speaker><first>Caroline</first><last>Lawrence</last></speaker>
<url type="video">2021.acl.business-meeting10.mp4</url>
<url type="video">2021.acl-business.10.mp4</url>
</talk>
<talk>
<title>Business Meeting: Secretary's Report</title>
<speaker><first>Shiqi</first><last>Zhao</last></speaker>
<url type="video">2021.acl.business-meeting11.mp4</url>
<url type="video">2021.acl-business.11.mp4</url>
</talk>
<talk>
<title>Business Meeting: Treasurer's Report</title>
<speaker><first>David</first><last>Yarowsky</last></speaker>
<url type="video">2021.acl.business-meeting12.mp4</url>
<url type="video">2021.acl-business.12.mp4</url>
</talk>
<talk>
<title>Business Meeting: Sponsorship Director Report</title>
<speaker><first>Chris</first><last>Callison-Burch</last></speaker>
<url type="video">2021.acl.business-meeting13.mp4</url>
<url type="video">2021.acl-business.13.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>ACL</fixed-case> 2023 Call for Bids</title>
<speaker><first>Timothy</first><last>Baldwin</last></speaker>
<url type="video">2021.acl.business-meeting111.mp4</url>
<url type="video">2021.acl-business.14.mp4</url>
</talk>
<talk>
<title>Business Meeting: <fixed-case>ACL</fixed-case> 2024 Call for Bids</title>
<speaker><first>Iryna</first><last>Gurevych</last></speaker>
<url type="video">2021.acl.business-meeting121.mp4</url>
<url type="video">2021.acl-business.15.mp4</url>
</talk>
<talk>
<title>Panel: Green <fixed-case>NLP</fixed-case></title>
Expand All @@ -12894,23 +12894,23 @@ The source code has been made available at \url{https://github.com/liam0949/DCLO
<speaker><first>Mona</first><last>Diab</last></speaker>
<speaker><first>Iryna</first><last>Gurevych</last></speaker>
<speaker><first>Yue</first><last>Zhang</last></speaker>
<url type="video">2021.acl.panel.mp4</url>
<url type="video">2021.acl-panel.1.mp4</url>
</talk>
<talk>
<title>Distinguished Service Awards and Test of Time Awards Session</title>
<speaker><first>Rada</first><last>Mihalcea</last></speaker>
<url type="video">2021.acl.test-of-time-award.mp4</url>
<url type="video">2021.acl-award.1.mp4</url>
</talk>
<talk>
<title>Lifetime Achievement Award Session</title>
<speaker><first>Rada</first><last>Mihalcea</last></speaker>
<speaker><first>Junichi</first><last>Tsujii</last></speaker>
<url type="video">2021.acl.lifetime-achievement-award.mp4</url>
<url type="video">2021.acl-award.2.mp4</url>
</talk>
<talk>
<title>Best Papers Awards Session</title>
<speaker><first>Timothy</first><last>Baldwin</last></speaker>
<url type="video">2021.acl.best-papers.mp4</url>
<url type="video">2021.acl-award.3.mp4</url>
</talk>
<talk>
<title>Closing Session</title>
Expand All @@ -12925,7 +12925,7 @@ The source code has been made available at \url{https://github.com/liam0949/DCLO
<speaker><first>Roberto</first><last>Navigli</last></speaker>
<speaker><first>Fei</first><last>Xia</last></speaker>
<speaker><first>Maggie</first><last>Li</last></speaker>
<url type="video">2021.acl.closing-session.mp4</url>
<url type="video">2021.acl-closing.1.mp4</url>
</talk>
<colocated>
<volume-id>2021.findings-acl</volume-id>
Expand Down
10 changes: 5 additions & 5 deletions data/xml/2021.emnlp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14122,25 +14122,25 @@
<talk>
<title>Keynote 1: Where next? Towards multi-text consumption via three inspired research lines</title>
<speaker><first>Ido</first><last>Dagan</last></speaker>
<url type="video">2021.emnlp.keynote1.mp4</url>
<url type="video">2021.emnlp-keynote.1.mp4</url>
</talk>
<talk>
<title>Keynote 2: The language system in the human brain</title>
<speaker><first>Evelina</first><last>Fedorenko</last></speaker>
<url type="video">2021.emnlp.keynote2.mp4</url>
<url type="video">2021.emnlp-keynote.2.mp4</url>
</talk>
<talk>
<title>Keynote 3: <fixed-case>LT4All</fixed-case>!? Rethinking the Agenda</title>
<speaker><first>Steven</first><last>Bird</last></speaker>
<url type="video">2021.emnlp.keynote3.mp4</url>
<url type="video">2021.emnlp-keynote.3.mp4</url>
</talk>
<talk>
<title>Opening Session</title>
<speaker><first>Sien</first><last>Moens</last></speaker>
<speaker><first>Xuanjing</first><last>Huang</last></speaker>
<speaker><first>Lucia</first><last>Specia</last></speaker>
<speaker><first>Scott</first><last>Yih</last></speaker>
<url type="video">2021.emnlp.opening-session.mp4</url>
<url type="video">2021.emnlp-opening.1.mp4</url>
</talk>
<talk>
<title>Best Papers Awards Session and Closing Session</title>
Expand All @@ -14151,7 +14151,7 @@
<speaker><first>Key-Sun</first><last>Choi</last></speaker>
<speaker><first>Noah A.</first><last>Smith</last></speaker>
<speaker><first>Chia-Hui</first><last>Chang</last></speaker>
<url type="video">2021.emnlp.closing-session.mp4</url>
<url type="video">2021.emnlp-closing.1.mp4</url>
</talk>
<colocated>
<volume-id>2021.findings-emnlp</volume-id>
Expand Down
Loading