Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 0c31fa63 authored by KOVAC Grgur's avatar KOVAC Grgur
Browse files

adding utils.py file

parent 74014f27
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,9 @@ visualizations/
dummy_viz/
models/
data_*
logs/*
.idea
results/
personas/ANES/*
.cache/*
*__pycache__*
def simulated_participant_to_name(simulated_participant, simulated_population_type):
if simulated_population_type in ["tolkien_characters"]:
return simulated_participant
elif simulated_population_type == "famous_people":
# e.g. "Marilyn Monroe (1926 – 1962) American actress, singer, model."
return simulated_participant.split(" (")[0]
elif simulated_population_type == "permutations":
return "CHATBOT"
elif simulated_population_type == "anes":
raise NotImplementedError(f"Participant name not implemented for population {simulated_population_type}.")
elif simulated_population_type == "llm_personas":
raise NotImplementedError(f"Participant name not implemented for population {simulated_population_type}.")
elif simulated_population_type == "user_personas":
raise NotImplementedError(f"Participant name not implemented for population {simulated_population_type}.")
else:
raise NotImplementedError(f"Participant name not implemented for population {simulated_population_type}.")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment