Created
June 16, 2023 09:05
-
-
Save Bollegala/959ea0e1795479e8e7af3c7b76c4aa49 to your computer and use it in GitHub Desktop.
check whether demo/main-conf poster sessions have author conflicts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check whether for each demo paper, the authors of that paper has a poster to be presented in the same session | |
import collections | |
import pandas as pd | |
import numpy as np | |
def main(): | |
posters_df = pd.read_csv('posters.csv') | |
demos_df = pd.read_csv('demos.csv') | |
posters_selected = posters_df[["Session", "Author"]] | |
# session-id : list of authors | |
posters = collections.defaultdict(list) | |
for index, row in posters_selected.iterrows(): | |
session_id = int(row["Session"].split()[1]) | |
posters[session_id].extend(clean_authors(row["Author"])) | |
demos_selected = demos_df[["Submission ID", "Authors", "Session", "Title"]] | |
demos = collections.defaultdict(list) | |
for index, row in demos_selected.iterrows(): | |
submission_id = int(row["Submission ID"]) | |
print("**{0}**<br>_{1}_".format(row["Title"], row["Authors"])) | |
session_id = row["Session"] | |
if session_id != "virtual": | |
session_id = int(session_id) | |
authors = clean_authors(row["Authors"]) | |
for author in authors: | |
if author in posters[session_id]: | |
print("Conflict! ", submission_id, session_id, author) | |
#print(authors) | |
def clean_authors(s): | |
s = s.replace('and ', ',') | |
return [x.strip() for x in s.split(',')] | |
if __name__ == "__main__": | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment