commit 2f3bd76c469fe2109bc8a35be9dedde53d5f7b2e
parent 9354b9e4efae4afebf03663b55b54b3fdefc5bf3
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Tue, 21 Nov 2023 17:09:23 -0800
fix stopword links
Diffstat:
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/make_talks_html.py b/make_talks_html.py
@@ -1,7 +1,7 @@
#!/usr/bin/python3
import os
-from parserec import parse, stz, getvenue, isurlrel, getyear, endswithpunct, authorname, talk_types
+from parserec import parse, stz, getvenue, isurlrel, getyear, endswithpunct, authorname, talk_types, stopwords
import datetime
import sys
@@ -408,18 +408,25 @@ if __name__ == '__main__':
if 'venue' in talk.keys() or ('venue' + lang) in talk.keys():
itmvenue = makevenue(talk, lang)
+ team = None
+ if 'team' in talk.keys():
+ team = mklink(talk['team'], talk, 'team')
if '>$TEAM' in itmvenue:
# at the beginning, avoid nested links
team = mklink(talk['team'], talk, 'team')
itmvenue = itmvenue.replace("$TEAM ", "")
itmvenue = team + " " + itmvenue
+ for stopword in stopwords:
+ teamsybm = ' ' + stopword + ' $TEAM'
+ if teamsybm + '<' in itmvenue:
+ # at the end, avoid nested links
+ itmvenue = itmvenue.replace(teamsybm, "")
+ itmvenue = itmvenue + " " + stopword + " " + team
if '$TEAM<' in itmvenue:
# at the end, avoid nested links
- team = mklink(talk['team'], talk, 'team')
itmvenue = itmvenue.replace(" $TEAM", "")
itmvenue = itmvenue + " " + team
if '$TEAM' in itmvenue:
- team = mklink(talk['team'], talk, 'team')
itmvenue = itmvenue.replace("$TEAM", team)
items.append(itmvenue)
diff --git a/parserec.py b/parserec.py
@@ -129,6 +129,8 @@ stz = {
},
}
+stopwords = ["at", "au", "du", "at the", "of the", "for project", "du projet"]
+
talk_types = ['poster', 'short', 'phddefenserehearsal']
def authorname(author, sepnames=False):
diff --git a/talks b/talks
@@ -9,7 +9,7 @@ PlaceUrl: https://www.centralesupelec.fr/
Title: Bounded-Delay Enumeration of Regular Languages
Date: 2023-11-27
-Venue: "Logic and Algorithms in Database Theory and AI" program at $TEAM
+Venue: "Logic and Algorithms in Database Theory and AI" program at the $TEAM
VenueFr: Programme "Logic and Algorithms in Database Theory and AI" program au $TEAM
VenueURL: https://simons.berkeley.edu/programs/logic-algorithms-database-theory-ai
Team: Simons Intitute for the Theory of Computing
@@ -314,7 +314,7 @@ Date: 2019-10-24
Team: DKM
TeamUrl: https://www.irisa.fr/fr/departements/d7-gestion-donnees-connaissance
Venue: $TEAM seminar
-VenueFr: séminaire du $TEAM
+VenueFr: séminaire $TEAM
Place: INRIA Rennes
PlaceUrl: https://www.inria.fr/centre/rennes
Url: dkm2019/amarilli2019enumerating_slides.pdf