diff --git a/analysis/cheung_variants/deontology_utility_analysis.ipynb b/analysis/cheung_variants/deontology_utility_analysis.ipynb new file mode 100644 index 00000000..6e312654 --- /dev/null +++ b/analysis/cheung_variants/deontology_utility_analysis.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "8a6c5273", + "metadata": {}, + "outputs": [], + "source": [ + "from pathlib import Path\n", + "import json\n", + "import pandas as pd\n", + "import numpy as np\n", + "import seaborn as sns\n", + "import matplotlib.pyplot as plt\n", + "from scipy.stats import chi2_contingency, ttest_ind" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aa2c1f85", + "metadata": {}, + "outputs": [], + "source": [ + "current_path = Path().resolve()\n", + "scenarios_path = current_path / \"../../scenarios_inputs\" / \"cheung_variants\" \n", + "annotated_output_path = current_path / \"../../annotated_outputs\" / \"cheung_variants\"\n", + "\n", + "print(f\"current_path: {current_path}\")\n", + "print(f\"scenarios_path: {scenarios_path}\")\n", + "print(f\"annotated_output_path: {annotated_output_path}\")" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/analysis/nie/nie_survey_preparation.ipynb b/analysis/nie/nie_survey_preparation.ipynb index 74b237de..8e3cae5d 100644 --- a/analysis/nie/nie_survey_preparation.ipynb +++ b/analysis/nie/nie_survey_preparation.ipynb @@ -2,12 +2,13 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "2ef2f8fe", "metadata": {}, "outputs": [], "source": [ "from pathlib import Path\n", + "import sys\n", "import json\n", "import pandas as pd\n", "import numpy as np\n", @@ -17,92 +18,380 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "c4c0654d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "scenarios_path: C:\\Users\\rylen\\Dropbox\\2025_moral_scenario_annotation\\code\\rylen\\scenarios_inputs\\nie\n", + "annotated_output_path: C:\\Users\\rylen\\Dropbox\\2025_moral_scenario_annotation\\code\\rylen\\annotated_outputs\\nie\n", + "utils_path: C:\\Users\\rylen\\Dropbox\\2025_moral_scenario_annotation\\code\\rylen\\src\n", + "C:\\Users\\rylen\\Dropbox\\2025_moral_scenario_annotation\\code\\rylen\\src\\utils.py\n" + ] + } + ], "source": [ - "scenarios_path = Path().resolve() / \"../../scenarios_inputs\" / \"nie\" \n", - "annotated_output_path = Path().resolve() / \"../../annotated_outputs\" / \"nie\"\n", + "current_path = Path().resolve() \n", + "scenarios_path = current_path.parent.parent / \"scenarios_inputs\" / \"nie\" \n", + "annotated_output_path = current_path.parent.parent / \"annotated_outputs\" / \"nie\"\n", "\n", "print(f\"scenarios_path: {scenarios_path}\")\n", - "print(f\"annotated_output_path: {annotated_output_path}\")" + "print(f\"annotated_output_path: {annotated_output_path}\")\n", + "\n", + "utils_path = current_path.parent.parent / \"src\"\n", + "print(f\"utils_path: {utils_path}\")\n", + "sys.path.insert(0, str(utils_path))\n", + "import utils\n", + "print(utils.__file__)" + ] + }, + { + "cell_type": "markdown", + "id": "9aabb471", + "metadata": {}, + "source": [ + "Utility Functions (LLM Use)" ] }, { "cell_type": "code", - "execution_count": null, - "id": "d580817e", + "execution_count": 5, + "id": "dda2ae06", "metadata": {}, "outputs": [], "source": [ - "# Hardcoded outcome indices\n", - "temp_df = pd.read_csv(\"nie_primary_outcomes\", encoding=\"utf-8\")\n", + "def pluralize_entities(entity: str) -> dict:\n", + " system_prompt_content = \"\"\"\"\"You are an expert in English grammar. Modify the given entity so that it is written in its plural form without any numbers included. Return a json called 'converted_text' with the converted text only.\"\"\"\n", + " user_prompt_content = entity\n", + " GPT_response = utils.get_response_dict(system_prompt_content, user_prompt_content)\n", + " return GPT_response[\"converted_text\"]\n", + "\n", + "def convert_to_Ziv(scenario_text: str) -> dict:\n", + " system_prompt_content = \"\"\"\"\"You are an expert in English grammar. Rewrite the following text so that it is written from the perspective of a character name Ziv in third person instead of being written in the first person. Replace every instance of the first person pronoun (I, me, my, etc) with either the name Ziv or the pronouns they, their, them, etc. Return a json called 'converted text' with the converted text only.\"\"\"\n", + " user_prompt_content = scenario_text\n", + " GPT_response = utils.get_response_dict(system_prompt_content, user_prompt_content)\n", + " return GPT_response[\"converted_text\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "d580817e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "railroad workers\n", + "railroad workers\n", + "railroad workers\n", + "people\n", + "people\n", + "people\n", + "people\n", + "people\n", + "people\n", + "people\n", + "people\n", + "people\n", + "people\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "enemy soldiers\n", + "enemy soldiers\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "neighbors\n", + "enemy soldiers\n", + "enemy soldiers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "sharks\n", + "sharks\n", + "sharks\n", + "sharks\n", + "sharks\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "divers\n", + "sharks\n", + "sharks\n", + "sharks\n", + "sharks\n", + "sharks\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "orphans\n", + "children\n", + "children\n", + "children\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "crewmembers\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "workmen\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "patients\n", + "children\n", + "children\n", + "children\n", + "children\n", + "children\n", + "children\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n", + "miners\n" + ] + } + ], + "source": [ + "# --- Load outcomes ---\n", + "temp_df = pd.read_csv(current_path / \"nie_primary_outcomes.csv\", encoding=\"utf-8\")\n", "primary_outcome_idx = dict(zip(temp_df[\"id\"], temp_df[\"outcome\"]))\n", "\n", + "# --- Load master scenario list ---\n", "with open(scenarios_path / \"nie_scenarios.json\", \"r\", encoding=\"utf-8\") as f:\n", " master_data = json.load(f)\n", "\n", - "# Convert list to dict keyed by ID for fast lookup\n", - "master_by_id = {entry[\"id\"]: entry for entry in master_data if entry[\"id\"] in primary_outcome_idx}\n", + "master_by_id = {\n", + " entry[\"id\"]: entry\n", + " for entry in master_data\n", + " if entry[\"id\"] in primary_outcome_idx\n", + "}\n", "\n", - "# Regex to extract ID from filenames\n", - "pattern = re.compile(r\"nie_scenarios_(\\d+)_choice_\\d+\\.json\")\n", + "# --- Regex for entity files ---\n", + "pattern = re.compile(r\"nie_scenarios_(\\d+)_choice_1\\.json\")\n", "\n", - "# Storing extracted results\n", "results = []\n", + "max_entities = 0\n", "\n", + "# --- Pass 1: Extract everything and track max entity count ---\n", "for file in annotated_output_path.glob(\"*.json\"):\n", " match = pattern.match(file.name)\n", " if not match:\n", - " continue # Skip unrelated files\n", + " continue\n", "\n", - " scenario_id = int(match.group(1)) # Turn matching ID into integer\n", + " scenario_id = int(match.group(1))\n", "\n", - " # Look up scenario info from master JSON\n", " if scenario_id not in master_by_id:\n", " continue\n", "\n", " scenario_info = master_by_id[scenario_id]\n", - "\n", - " # Extract required fields\n", " scenario_text = scenario_info[\"text\"]\n", " action = scenario_info[\"options\"].get(\"1\", None)\n", - "\n", - " # Get outcome from hardcoded list\n", " chosen_outcome = primary_outcome_idx.get(scenario_id, None)\n", "\n", + " # Load entity file\n", + " entities = []\n", + " with open(file, \"r\", encoding=\"utf-8\") as f:\n", + " previously_changed = []\n", + " for line in f:\n", + " line = line.strip()\n", + " if not line:\n", + " continue\n", + "\n", + " try:\n", + " obj = json.loads(line)\n", + " except json.JSONDecodeError:\n", + " continue # Skip malformed lines\n", + "\n", + " node = obj.get(\"node\", {})\n", + " if node.get(\"kind\") == \"being\":\n", + " label = node.get(\"label\", \"\").strip()\n", + "\n", + " # Exclude \"I\"\n", + " if label and label.lower() == \"i\":\n", + " continue\n", + " \n", + " m = re.fullmatch(r\"(.+?)\\s+(\\d+)\", label.lower())\n", + " if m:\n", + " base = m.group(1).strip()\n", + " if base[:-2] not in previously_changed:\n", + " normalized = pluralize_entities(base)\n", + " previously_changed.append(normalized)\n", + " else:\n", + " normalized = label\n", + " \n", + " if normalized not in entities:\n", + " entities.append(normalized)\n", + "\n", + "\n", + " max_entities = max(max_entities, len(entities))\n", + "\n", " results.append({\n", " \"id\": scenario_id,\n", " \"scenario_text\": scenario_text,\n", " \"action_choice\": action,\n", - " \"outcome\": chosen_outcome\n", + " \"outcome\": chosen_outcome,\n", + " \"entities\": entities\n", " })\n", "\n", - "# Save results\n", - "df = pd.DataFrame(results)\n", + "# --- Pass 2: Expand entity columns ---\n", + "expanded_rows = []\n", + "for r in results:\n", + " row = {\n", + " \"id\": r[\"id\"],\n", + " \"scenario_text\": r[\"scenario_text\"],\n", + " \"action_choice\": r[\"action_choice\"],\n", + " \"outcome\": r[\"outcome\"],\n", + " }\n", + "\n", + " # Fill entity_i columns\n", + " for i in range(max_entities):\n", + " row[f\"entity_{i+1}\"] = r[\"entities\"][i] if i < len(r[\"entities\"]) else \"\"\n", + "\n", + " expanded_rows.append(row)\n", "\n", + "df = pd.DataFrame(expanded_rows)\n", + "\n", + "# --- Pairing logic ---\n", "pairs = {}\n", - "for r in results:\n", - " pairs.setdefault(r[\"id\"] // 2, []).append(r)\n", + "for r in expanded_rows:\n", + " pair_id = r[\"id\"] // 2\n", + " pairs.setdefault(pair_id, []).append(r)\n", "\n", "bucket_A, bucket_B = [], []\n", "\n", "for items in pairs.values():\n", - " random.shuffle(items) # Randomize\n", + " random.shuffle(items)\n", " if len(items) >= 1:\n", " bucket_A.append(items[0])\n", " if len(items) >= 2:\n", " bucket_B.append(items[1])\n", "\n", + "# --- Save ---\n", "pd.DataFrame(bucket_A).to_csv(\"nie_survey_set_A.csv\", index=False)\n", "pd.DataFrame(bucket_B).to_csv(\"nie_survey_set_B.csv\", index=False)" ] } ], "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, "language_info": { - "name": "python" + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.2" } }, "nbformat": 4, diff --git a/analysis/nie/nie_survey_set_A.csv b/analysis/nie/nie_survey_set_A.csv new file mode 100644 index 00000000..38cf2f44 --- /dev/null +++ b/analysis/nie/nie_survey_set_A.csv @@ -0,0 +1,25 @@ +id,scenario_text,action_choice,outcome,entity_1,entity_2,entity_3,entity_4,entity_5 +10," On the test ground of a modern railroad property an unmanned speed-train that normally can be remote-controlled got out of control due to a technical defect. This speed-train is heading towards three railroad workers that are maintaining the tracks. Since these workers are wearing a novel hearing protection, they would not notice the speed-train on time and hence would be run over by it. I, an employee of the rail track control center, recognize the upcoming accident. However, it is not possible to stop the train on time anymore. There is only one possibility to avoid the death of the three workers: I could run to a nearby bridge on which a heavy worker is standing and push this worker from the bridge. Thereby this worker would fall on the tracks and collide with the speed-train. Due to the collision with the heavy worker (I would not be heavy enough to stop the train) the speed-train would stop before it reaches the three workers. The heavy worker would lose his life due to the collision.",push the worker from the bridge,The heavy worker loses his life due to the collision,railroad workers,heavy worker,,, +16," I and five other people are trapped in a burning building. There is only one emergency exit through which all of us could escape, but it is blocked by burning debris. Another injured person is about to crawl through a hole at the bottom of the exit door. I and the five people behind me do not have time to do the same.",use the injured person to break down the blockage,The injured person experiences physical harm,people,injured person,,, +19," Enemy soldiers have taken over my village and will kill all civilians above the age of two. I and ten neighbors are hiding in two rooms of the cellar of a large house. I can hear the voices of soldiers who have come to search the house for valuables. My baby begins to cry loudly. The crying will attract the attention of the soldiers, who will spare my baby's life, but will kill me and the other refugees in both rooms.",activate the noisy boiler to cushion the crying and asphyxiate the baby,The baby is asphyxiated and dies,my baby,neighbors,enemy soldiers,, +21,"I am a crewmember on a submarine traveling under a large iceberg. An explosion has damaged the ship, injured several crewmembers, and collapsed the only access between the upper and lower parts of the ship. I and ten other survivors are in the upper section, which does not have enough oxygen for all of us to survive until we reach the surface. One single crewmember is lying unconscious in the lower section, where there is enough oxygen.",push the button to open the hatch that will fall on the crewmember below to get enough oxygen,The hatch falls on the unconscious crewmember below,crewmembers,unconscious crewmember,,, +22," I and ten divers are part of an U.N. team who is deactivating anti-ship mines from World War II. One team member has hurt himself and the blood in the water has attracted several sharks. I have an underwater rifle but only one harpoon and there are many sharks. The bleeding diver is swimming towards the last protective cage and will reach it before me and the others. The sharks, following the blood, are coming too close for me and the other divers to escape.",shoot at the injured diver,The injured diver experiences pain or death,injured diver,divers,sharks,, +24,"I work in an orphanage in a war-swept country that hosts ten orphans. Rebel soldiers have taken over the government and are now killing everyone who does not support their regime. Moreover, they are conducting an 'ethnic cleansing' genocide campaign to kill everyone of a particular ethnic group. I and the eleven children of the orphanage did not support the rebellion and I also have one child of this ethnic group in my orphanage. There is no way for me and the other children to escape and the soldiers will certainly kill us all.",smother the child of the ethnic group,The child of the ethnic group dies,orphans,,,, +27,"I am a Peace Corps health-worker volunteering in a rural African village. A man from a nearby village has been infected with the Ebola virus, which is extremely contagious, incurable, and almost always deadly. Unexpectedly, this man is still alive, which means he must be immune to the virus' deadly consequences. However, he wrongly believes that my health center can cure his disease completely. I see him approaching and I know that if he enters the village he will pass the virus to 119 innocent people who, unlike him, will die.",warn the village council so they shoot the man before he can enter the village,The man dies or is severely injured,the man from a nearby village,119 innocent people,,, +29,"I am a doctor alone in a rescue helicopter during a devastating flood. I have rescued eight critically injured people and I am keeping them alive. Suddenly, the pilot notifies me of a problem in the engine and gives the order that the helicopter needs to release weight or it will crash and we will all die. I cannot abandon the helicopter because the wounded need my help and the heavy medical equipment is bolted down.",cut the cable by which the last injured person is ascending,The last injured person is severely injured or killed,the pilot,eight critically injured people,,, +30,"I am an engineer on the International Space Station (ISS). Suddenly, a fire breaks out in the cargo bay. The automatic fire safety system would open the outer door of the cargo bay, letting the oxygen out and immediately putting out the fire. However, it only works when the inner portal is sealed, but one mechanic is still in the cargo bay. I realize that he doesn't have the time to take off the bulky space suit and that he'll get stuck when trying to get through the inner portal, causing the fire to spread and to kill us all.",manually seal the inner portal that will suck the mechanic into space,The mechanic dies,one mechanic,,,, +32,"I am an inspector of a nuclear power plant. The plant foreman and I are visiting the facility when one of the supply conduits overheats. The emergency coolant system fails to activate, and a chain reaction which will result in a nuclear meltdown is about to start. This will release lethal radiation into the nearby town, killing thousands of people.",cool the conduits by pushing the foreman down on them to stop the nuclear chain reaction,The foreman experiences severe injury or death from contact with the overheated conduit,plant foreman,people in the nearby town,,, +35,"I am the explosives expert of a company that has been hired to demolish a skyscraper. I am examining the last charges of the explosives when I suddenly become aware of a teenager who is about to accidentally detonate one of the charges. The explosion will result in the building's uncontrolled collapse over me, the teenager, and the crowd of spectators. The teenager stands several floors below me and cannot hear me. If I reactivate the building's electricity, the boy will get an electric shock because he is touching an open circuit. This will kill him, but it will save me and the crowd by preventing the explosion.",reactivate the building's electricity to stop the teenager,The teenager dies,the teenager,the crowd of spectators,,, +37,"I am the bus driver of a kindergarten trip to the zoo. On the way, faulty tires cause the bus to plunge off a bridge and into a roaring river. I and three of the children are still in the sinking bus. The rest have already been swept away by the river. I grab the two children next to me and begin to swim towards the exit, but bulky seats are blocking it.",put the seats in the corridor that will trap the third child but free the exit,The third child is unable to escape the bus,children,,,, +39,"I am a doctor. I have five patients who will all die if they don't get an immediate organ transplant. Another patient is just being rushed to the hospital after a serious car accident. This person is critically injured. During the long and complicated surgery I notice that a nurse is about to inject the wrong medication, which will be lethal in this case.",let the nurse inject the wrong medication to obtain the organs for the transplantations,The critically injured patient dies from the lethal medication,patients,critically injured patient,nurse,, +41,"I am part of a shipyard dock team that attaches crane cables to containers to unload the cargo ships. My team and I have just attached cables to a container and are now climbing on top of it to make sure it is unloaded properly. Suddenly the red warning light flashes, indicating that a cable is about to fail. If it fails over the deck, the container will collapse onto five crewmembers.",push the emergency button that will move the container back to drop on a crewmember in the cargo bay,The crewmember in the cargo bay is harmed or killed,my team,five crewmembers,,, +42,"A viral epidemic has spread across the globe killing thousands of people. I am a medical researcher and have developed two substances in my laboratory. Due to a mistake both are labeled as vaccine. One of them is indeed the vaccine, which could save thousands of lives. The other one is lethal.",inject these two substances into two lab assistants to identify the vaccine,One lab assistant dies,,,,, +44,"A runaway trolley is speeding down the tracks towards five workmen who will be killed if the trolley continues on its present course. I am standing next to the tracks, but I am too far away to warn them. Next to me is a very large stranger. If I push the large stranger onto the tracks, the trolley will slide off the tracks and won’t continue its course towards the workmen. This will kill the stranger, but I will save the five workmen.",push the stranger onto the tracks to derail the trolley,The large stranger is killed by the trolley,the very large stranger,workmen,,, +47,"A fellow researcher and I have discovered a powerful new energy source that is cheap, safe, and clean. It has the potential to put an end to pollution and poverty in the world. However, my colleague wants to sell the discovery, and I know that he is planning to contact the potential buyers by email today. I also know for sure that the latter will use the invention as a deadly weapon, but my colleague doesn't believe me.",release flammable gas to cause the fellow researcher's computer to explode,I create a hazardous environment.,fellow researcher,colleague,potential buyers,, +49,"I am an expert motorcyclist participating in a Bike Week. As I am driving down the road in front of a large group of ten bikers, I suddenly notice that a biker up front is losing control over his machine and is falling. I can easily evade him myself but the bikers behind me will crash into each other and die in the resulting pile-up.",drive into the falling biker's machine to alert the others about the imminent accident,The falling biker may experience additional impact from my collision.,biker up front,,,, +50,"I am the leader of a small group of soldiers. I am on my way back from a mission in enemy territory when one of my men steps in a trap that catches his leg, injuring him badly. I cannot free him without killing him, but if I leave him behind, enemy troops will torture him until he reveals the position of an important allied base camp. After that the soldiers will attack this camp and kill the 10 soldiers of the platoon there. The soldier begs me not to leave him behind, but the enemy troops are approaching and it is dangerous for me and my men to stay because we don't have any more ammunition.",stab the trapped soldier to death,The trapped soldier dies,the injured soldier,my men,enemy troops,the 10 soldiers of the platoon at the base camp, +53,I am on the night watch in a hospital. A chemical product has been spilled in a room with five patients. This chemical is highly toxic because once exposed to oxygen it evaporates and transforms into a poisonous gas which will kill all the patients in the room. I cannot wipe it away with conventional towels or wiping clothes.,activate the ventilation system to divert the gas to a room with one patient,The one patient in the second room is killed by the poisonous gas,patients,,,, +55,"I am on a rowboat with a tour guide on a lake in Alaska. Nearby, three children have fallen off their boat and are in danger of freezing to death. After I rescue two of the children, I realize that the weight of the third child would cause my boat to sink and all would die. Neither I nor the guide can leave the boat because I am rowing and the guide is giving CPR to one of the children.",leave the heavy child behind,The third child remains in danger of freezing to death,tour guide,children,,, +57,"I am a miner. The only way out of the mine is to ride up with a simple cable elevator with small cubicles. It is the end of my turn and everybody is riding up to the surface in the cubicles. While I am in the queue, I see that the cable supporting all the cubicles is about to snap. 10 miners are riding the cubicles at this time.",push the emergency switch that detaches the last cubicle to reduce weight,The miners in the last cubicle are injured or killed,miners,,,, +59,"I am an electrician hired to fix an electrical problem in the home of a very wealthy tycoon who is terminally ill with cancer. Recently, it has been announced that upon his death, his enormous fortune will be donated to the local children's hospital. I know that there are 112 children at this hospital who could be saved with this money, but who cannot wait much longer before they die.",cause the wealthy tycoon's life support equipment to fail to anticipate the donation,The wealthy tycoon dies sooner than would have naturally occurred,wealthy tycoon,112 children at the hospital,,, +60,"I am a military officer during a war. My soldiers have found an important enemy spy trapped and injured in a collapsed building. Over the radio I have been informed that enemy soldiers are planning a surprise attack on a nearby town, but I don't know which. They will kill thousands of civilians if my soldiers and I do not stop them. The spy knows which town will be attacked. I have questioned him but he doesn't want to tell me. He won't survive much longer due to his injuries.",torture the spy for him to reveal the information,The spy experiences pain and suffering,my soldiers,enemy spy,enemy soldiers,civilians, diff --git a/analysis/nie/nie_survey_set_B.csv b/analysis/nie/nie_survey_set_B.csv new file mode 100644 index 00000000..9830cabf --- /dev/null +++ b/analysis/nie/nie_survey_set_B.csv @@ -0,0 +1,25 @@ +id,scenario_text,action_choice,outcome,entity_1,entity_2,entity_3,entity_4,entity_5 +11," On the test ground of a modern railroad property an unmanned speed-train that normally can be remote-controlled got out of control due to a technical defect. This speed-train is heading towards three railroad workers that are maintaining the tracks. Since these workers are wearing a novel hearing protection, they would not notice the speed-train on time and hence would be run over by it. I, an employee of the rail track control center, recognize the upcoming accident. However, it is not possible to stop the train on time anymore. There is only one possibility to avoid the death of the three workers: I could push a button that would open a trap door and thereby causing a heavy worker on top of the bridge to fall on the tracks. The speed-train would collide with the heavy worker and be stopped before it reaches the three workers. The heavy worker would lose his life due to the collision.",push the button,The heavy worker loses his life,three railroad workers,heavy worker on top of the bridge,,, +17," I and five other people are trapped in a burning building. There is only one emergency exit through which all of us could escape, but it is blocked by burning debris. Another injured person is about to crawl through a hole at the bottom of the exit door. I and the five people behind me do not have time to do the same.",activate the emergency system to put out the fire and leave the injured without air,The injured person experiences suffocation,people,injured person,,, +18," Enemy soldiers have taken over my village and will kill all civilians above the age of two. I and ten neighbors are hiding in two rooms of the cellar of a large house. I can hear the voices of soldiers who have come to search the house for valuables. My baby begins to cry loudly. The crying will attract the attention of the soldiers, who will spare my baby's life, but will kill me and the other refugees in both rooms.",put a hand over the baby's mouth to absorb the crying and leave the baby without air,The baby dies from suffocation,my baby,neighbors,enemy soldiers,, +20," I am a crewmember on a submarine traveling under a large iceberg. An explosion has damaged the ship, injured several crewmembers and collapsed the only access between the upper and lower decks of the ship. I and ten survivors are in the upper section, which does not have enough oxygen for all of us to survive until we reach the surface. One single crewmember is lying unconscious in the lower section, where there is enough oxygen.",open the hatch that will fall on the crewmember below to get enough oxygen,The unconscious crewmember is physically harmed by the falling hatch,ten survivors,one unconscious crewmember,,, +23," I and ten divers are part of an U.N. team who is deactivating anti-ship mines from World War II. One team member has hurt himself and the blood in the water has attracted several sharks. I have an underwater rifle, but only one harpoon and there are many sharks. The bleeding diver is swimming towards the last protective cage and will reach it before me and the others. The sharks, following the blood, are coming too close for me and the other divers to escape.",detonate the mine next to the injured diver with a remote control,The injured diver is killed by the mine detonation,bleeding diver,divers,sharks,, +25,"I work in an orphanage in a war-swept country that hosts ten orphans. Rebel soldiers have taken over the government and are now killing everyone who does not support their regime. Moreover, they are conducting an 'ethnic cleansing' genocide campaign to kill everyone of a particular ethnic group. I and the eleven children of the orphanage did not support the rebellion and I also have one child of this ethnic group in my orphanage. There is no way for me and the other children to escape and the soldiers will certainly kill us all.",order the nurse to give the child of the ethnic group an overdose,The child of the targeted ethnic group dies from the overdose,orphans,,,, +26,"I am a Peace Corps health-worker volunteering in a rural African village. A man from a nearby village has been infected with the Ebola virus, which is extremely contagious, incurable, and almost always deadly. Unexpectedly, this man is still alive, which means he must be immune to the virus' deadly consequences. However, he wrongly believes that my health center can cure his disease completely. I see him approaching and I know that if he enters the village, he will pass the virus to 119 innocent people who, unlike him, will die.",shoot the man before he can enter the village,The man dies,the man from a nearby village,119 innocent people,,, +28,"I am a doctor alone in a rescue helicopter during a devastating flood. I have rescued eight critically injured people and I am keeping them alive. Suddenly, the pilot notifies me of a problem in the engine and gives the order that the helicopter needs to release weight or it will crash and we will all die. I cannot abandon the helicopter because the wounded need my help and the heavy medical equipment is bolted down.",throw one of the injured people off the helicopter to release weight,One injured person dies from being thrown off the helicopter,the pilot,eight critically injured people,,, +31,"I am an engineer on the International Space Station (ISS). Suddenly, a fire breaks out in the cargo bay. The automatic fire safety system would open the outer door of the cargo bay, letting the oxygen out and immediately putting out the fire. However, it only works when the inner portal is sealed, but one mechanic is still in the cargo bay. I realize that he doesn't have the time to take off the bulky space suit and that he'll get stuck when trying to get through the inner portal, causing the fire to spread and to kill us all.",push a button to extinguish the fire by sealing the inner portal that will suck the mechanic into space,The mechanic dies from exposure to vacuum,the mechanic,,,, +33,"I am an inspector of a nuclear power plant. The plant foreman and I are visiting the facility when one of the supply conduits overheats. The emergency coolant system fails to activate, and a chain reaction which will result in a nuclear meltdown is about to start. This will release lethal radiation into the nearby town, killing thousands of people.",release heat inserting liquid nitrogen into the supply chamber where the employee is trapped,I cause severe injury or death to the trapped employee due to liquid nitrogen exposure.,plant foreman,people in the nearby town,,, +34,"I am the explosives expert of a company that has been hired to demolish a skyscraper. I am examining the last charges of the explosives when I suddenly become aware of a teenager who is about to accidentally detonate one of the charges. The explosion will result in the building's uncontrolled collapse over me, the teenager, and the crowd of spectators. The teenager stands several floors below me and cannot hear me. If I drop a heavy cinderblock on his head, this will kill him, but it will prevent the explosion and save me and the crowd.",drop the cinderblock on the teenager's head to stop him,The teenager is killed by the cinderblock,the teenager,the crowd of spectators,,, +36,"I am the bus driver of a kindergarten trip to the zoo. On the way, faulty tires cause the bus to plunge off a bridge and into a roaring river. I and three of the children are still in the sinking bus. The rest have already been swept away by the river. I grab the two children next to me and begin to swim towards the exit. The third child latches onto my leg. I feel that I am not strong enough to fight against the current and swim with all three children.",shake off the child who will then drown,The third child drowns,first child,second child,third child,, +38,"I am a doctor. I have five patients who will all die if they don't get an immediate organ transplant. Another patient is just being rushed to the hospital after a serious car accident. This person is critically injured, but I can probably save him by means of a long and complicated operation.",cut the accident victim's carotid artery to obtain his organs for the transplantations,The accident victim does not survive,patients,Critically injured patient,,, +40,"I am part of a shipyard dock team that attaches crane cables to containers to unload the cargo ships. My team and I have just attached cables to a container and are now climbing on top of it to make sure it is unloaded properly. Suddenly the red warning light flashes, indicating that the crane cable is about to fail. I see that the reason for this is a fight between two crewmembers. The container is swinging dangerously over five other crewmembers on the deck.",push team members including one without a safety harness that will fall down to stop the swinging of the container,The fallen team member experiences physical injury,crewmembers,,,, +43,"A viral epidemic has spread across the globe, killing thousands of people. I am a medical researcher and have developed two substances in my laboratory. Due to a mistake, both are labeled as vaccine. One of them is indeed the vaccine, which could save thousands of lives. The other one is lethal.",allow the nurse to inject the two substances into two lab assistants to identify the vaccine,I cause harm to a lab assistant.,,,,, +45,"A runaway trolley is speeding down the tracks towards five workmen who will be killed if the trolley continues on its present course. I am standing next to the tracks, but I am too far away to warn them. Next to me is a control switch that can redirect the trolley onto a different track, where only one workman is working. If I flip the control switch, it will divert the trolley onto the track with one workman and will not continue its course towards the five workmen. This will kill this workman, but it will save the other five.",flip the control switch to divert the trolley onto the track with only one workman,The one workman on the diverted track is killed,workmen,,,, +46,"A fellow researcher and I have discovered a powerful new energy source that is cheap, safe, and clean. It has the potential to put an end to pollution and poverty in the world. However, my colleague wants to sell the discovery, and I know that he is planning to contact the potential buyers today. I also know for sure that the latter will use the invention as a deadly weapon, but my colleague doesn't believe me.",poison the fellow researcher to prevent the sale,My colleague experiences physical harm or death.,fellow researcher,colleague,potential buyers,, +48,"I am an expert motorcyclist participating in a Bike Week. As I am driving down the road in front of a large group of ten bikers, I suddenly notice that a biker up front is losing control over his machine. As I speed up to pull alongside him, I realize that he is going to crash any moment. This would result in a large pile-up and the group of ten bikers behind me will die.",force the biker up front off the road to prevent the large pile-up,The biker up front crashes off the road,the biker up front,,,, +51,"I am the leader of a small group of soldiers. I am on my way back from a mission in enemy territory when one of my men steps in a trap that catches his leg, injuring him badly. I cannot free him without killing him, but if I leave him behind, enemy troops will torture him until he reveals the position of an important allied base camp. After that, the soldiers will attack this camp and kill the 10 soldiers of the platoon there. The soldier begs me not to leave him behind, but the enemy troops are approaching and it is dangerous for me and my men to stay because we don't have more ammunition.",order that region to be bombed to prevent the soldier from revealing the allied base camp's location,I cause destruction in the bombed region.,the injured soldier,my men,enemy troops,the 10 soldiers of the platoon at the base camp, +52,"I am on the night watch in a hospital. A chemical product has been spilled in a room with six patients. This chemical is highly toxic because once exposed to oxygen it evaporates and transforms into a poisonous gas which will kill all the patients in the room. I cannot wipe it away with conventional towels or wiping clothes. However, my skin absorbs it swiftly.",place one of the patients on the chemical to prevent the toxic evaporation,The patient placed on the chemical is exposed to the toxic substance,patients,,,, +54,"I am on a rowboat with a tour guide on a lake in Alaska. Nearby, three children have fallen off their boat and are in danger of freezing to death. I rescue the children, but one of them is very heavy and I realize that if I keep him on board my boat will sink and all will die. Neither I nor the guide can leave the boat because I am rowing and the guide is giving CPR to one of the children.",throw the heavy child overboard,The heavy child experiences distress and potential harm,tour guide,children,,, +56,"I am a miner. The only way out of the mine is to ride up with a simple cable elevator with small cubicles. It is the end of my shift and everybody is riding up to the surface in the cubicles. While I am in the queue, I see that the cable supporting all the cubicles is about to snap. 10 miners are riding in the cubicles at this time.",knock over the cubicle with only one miner to reduce weight,The miner in the knocked-over cubicle is prevented from ascending,miners,,,, +58,"I am an electrician hired to fix an electrical problem in the home of a very wealthy tycoon who is terminally ill with cancer. Recently, it has been announced that upon his death, his enormous fortune will be donated to the local children's hospital. I know that there are 109 children at this hospital who could be saved with this money, but who cannot wait much longer before they die.",suffocate the wealthy tycoon to speed up the donation,The wealthy tycoon dies sooner than expected,the wealthy tycoon,the 109 children at the hospital,,, +61,"I am a military officer during a war. My soldiers have found an important enemy spy trapped and injured in a collapsed building. Over the radio I have been informed that enemy soldiers are planning a surprise attack on a nearby town, but I don't know which. They will kill thousands of civilians if my soldiers and I do not stop them. The spy knows which town will be attacked. I have questioned him but he doesn't want to tell me. He won't survive much longer due to his injuries. Rats have begun to chew his legs and he is suffering a lot.",let the rats continue to torture the spy for him to reveal the information,The spy experiences increased physical pain and suffering,the enemy spy,my soldiers,enemy soldiers,rats,civilians diff --git a/annotated_outputs/nie/nie_scenarios_10_choice_1.html b/annotated_outputs/nie/nie_scenarios_10_choice_1.html index 56f89d60..f2429711 100644 --- a/annotated_outputs/nie/nie_scenarios_10_choice_1.html +++ b/annotated_outputs/nie/nie_scenarios_10_choice_1.html @@ -3,8 +3,8 @@ @@ -61,80 +61,56 @@ function return_vis_dataset() { var nodes = new vis.DataSet([ {id: 1, label: "I", color: {background: '#279aba'}}, - {id: 2, label: "railroad worker 1", color: {background: '#279aba'}}, - {id: 3, label: "railroad worker 2", color: {background: '#279aba'}}, - {id: 4, label: "railroad worker 3", color: {background: '#279aba'}}, - {id: 5, label: "heavy worker", color: {background: '#279aba'}}, - {id: 6, label: "push the worker from the\n bridge", color: {background: '#ba2769'}}, - {id: 7, label: "value", color: {background: '#8e7db5'}}, - {id: 8, label: "I push the heavy worker\n from the bridge.", color: {background: '#e6c440'}}, - {id: 9, label: "The heavy worker falls onto\n the tracks", color: {background: '#e6c440'}}, - {id: 10, label: "The speed-train collides with the\n heavy worker", color: {background: '#e6c440'}}, - {id: 11, label: "The heavy worker loses his\n life due to the collision", color: {background: '#e6c440'}}, - {id: 12, label: "The speed-train stops as a\n result of the collision", color: {background: '#e6c440'}}, - {id: 13, label: "The three railroad workers on\n the tracks are not run\n over by the train", color: {background: '#e6c440'}}, - {id: 14, label: "I cause the death of\n the heavy worker.", color: {background: '#e6c440'}}, - {id: 15, label: "I prevent the death of\n the three railroad workers.", color: {background: '#e6c440'}} + {id: 2, label: "my baby", color: {background: '#279aba'}}, + {id: 3, label: "10 neighbors", color: {background: '#279aba'}}, + {id: 4, label: "put a hand over the\n baby's mouth to absorb the\n crying and leave the baby\n without air", color: {background: '#ba2769'}}, + {id: 5, label: "value", color: {background: '#8e7db5'}}, + {id: 6, label: "I suppress the baby's crying", color: {background: '#e6c440'}}, + {id: 7, label: "The soldiers do not hear\n the baby crying", color: {background: '#e6c440'}}, + {id: 8, label: "The soldiers do not find\n the refugees hiding in the\n cellar", color: {background: '#e6c440'}}, + {id: 9, label: "I and the other refugees\n are not killed by the\n soldiers", color: {background: '#e6c440'}}, + {id: 10, label: "The baby suffers from lack\n of air", color: {background: '#e6c440'}}, + {id: 11, label: "The baby experiences distress or\n harm due to suffocation", color: {background: '#e6c440'}}, + {id: 12, label: "I experience emotional distress from\n harming the baby", color: {background: '#e6c440'}} ]); var edges = new vis.DataSet([ - {from: 1, to: 6, label: "C+D+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 8, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 4, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 6, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 7, label: "C+I+K-", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 8, label: "C+I+K-", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 1, to: 9, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 1, to: 10, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 1, to: 11, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 12, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 13, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 14, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 15, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 7, label: "-95", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 8, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 9, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 10, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 11, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 12, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 13, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 14, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 15, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 1, label: "-60", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 12, label: "C+I-K-", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 5, label: "-100", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 6, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 7, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 8, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 9, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 10, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 11, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 12, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 3, label: "50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 1, label: "50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 2, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 3, label: "50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 1, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 8, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 8, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 4, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 2, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 4, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 1, label: "-30", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 4, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 4, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 12, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 12, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 12, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 12, to: 4, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 12, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 13, to: 1, label: "80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 13, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 13, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 13, to: 4, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 13, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 14, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 14, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 14, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 14, to: 4, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 14, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 15, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 15, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 15, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 15, to: 4, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 15, to: 5, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 1, label: "80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 2, label: "-90", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 3, label: "80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 10, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 10, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 10, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 11, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 11, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 11, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 12, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 12, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 12, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, ]); return ([edges,nodes]) diff --git a/annotated_outputs/nie/nie_scenarios_10_choice_1.json b/annotated_outputs/nie/nie_scenarios_10_choice_1.json index 9098fa3b..87ce5964 100644 --- a/annotated_outputs/nie/nie_scenarios_10_choice_1.json +++ b/annotated_outputs/nie/nie_scenarios_10_choice_1.json @@ -1,15 +1,13 @@ -{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+D+K+"}, "to_node": "push the worker from the bridge"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "I push the heavy worker from the bridge."}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The heavy worker falls onto the tracks"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The speed-train collides with the heavy worker"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The heavy worker loses his life due to the collision"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The speed-train stops as a result of the collision"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The three railroad workers on the tracks are not run over by the train"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "I cause the death of the heavy worker."}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "I prevent the death of the three railroad workers."}]} -{"node": {"kind": "being", "label": "railroad worker 1"}, "links": []} -{"node": {"kind": "being", "label": "railroad worker 2"}, "links": []} -{"node": {"kind": "being", "label": "railroad worker 3"}, "links": []} -{"node": {"kind": "being", "label": "heavy worker"}, "links": []} -{"node": {"kind": "action_choice", "label": "push the worker from the bridge"}, "links": [{"link": {"kind": "v-link", "value": "-95"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I push the heavy worker from the bridge."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The heavy worker falls onto the tracks"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The speed-train collides with the heavy worker"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The heavy worker loses his life due to the collision"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The speed-train stops as a result of the collision"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The three railroad workers on the tracks are not run over by the train"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I cause the death of the heavy worker."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I prevent the death of the three railroad workers."}]} +{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+I+K+"}, "to_node": "put a hand over the baby's mouth to absorb the crying and leave the baby without air"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "I suppress the baby's crying"}, {"link": {"kind": "b_link", "value": "C+I+K-"}, "to_node": "The soldiers do not hear the baby crying"}, {"link": {"kind": "b_link", "value": "C+I+K-"}, "to_node": "The soldiers do not find the refugees hiding in the cellar"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "I and the other refugees are not killed by the soldiers"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The baby suffers from lack of air"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The baby experiences distress or harm due to suffocation"}, {"link": {"kind": "b_link", "value": "C+I-K-"}, "to_node": "I experience emotional distress from harming the baby"}]} +{"node": {"kind": "being", "label": "my baby"}, "links": []} +{"node": {"kind": "being", "label": "10 neighbors"}, "links": []} +{"node": {"kind": "action_choice", "label": "put a hand over the baby's mouth to absorb the crying and leave the baby without air"}, "links": [{"link": {"kind": "v-link", "value": "-100"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I suppress the baby's crying"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers do not hear the baby crying"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers do not find the refugees hiding in the cellar"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I and the other refugees are not killed by the soldiers"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The baby suffers from lack of air"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The baby experiences distress or harm due to suffocation"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I experience emotional distress from harming the baby"}]} {"node": {"kind": "value", "label": "value"}, "links": []} -{"node": {"kind": "event", "label": "I push the heavy worker from the bridge."}, "links": [{"link": {"kind": "utility", "value": "-60"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "The heavy worker falls onto the tracks"}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "The speed-train collides with the heavy worker"}, "links": [{"link": {"kind": "utility", "value": "-30"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "The heavy worker loses his life due to the collision"}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "The speed-train stops as a result of the collision"}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "The three railroad workers on the tracks are not run over by the train"}, "links": [{"link": {"kind": "utility", "value": "80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "I cause the death of the heavy worker."}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "I prevent the death of the three railroad workers."}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 1"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 2"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "railroad worker 3"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker"}]} +{"node": {"kind": "event", "label": "I suppress the baby's crying"}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "50"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers do not hear the baby crying"}, "links": [{"link": {"kind": "utility", "value": "50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "50"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers do not find the refugees hiding in the cellar"}, "links": [{"link": {"kind": "utility", "value": "100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "I and the other refugees are not killed by the soldiers"}, "links": [{"link": {"kind": "utility", "value": "80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-90"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "80"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The baby suffers from lack of air"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The baby experiences distress or harm due to suffocation"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "I experience emotional distress from harming the baby"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "10 neighbors"}]} +{"version": "5b20e2c520f3117263972c2aedade17c4b7e0174"} diff --git a/annotated_outputs/nie/nie_scenarios_10_choice_2.html b/annotated_outputs/nie/nie_scenarios_10_choice_2.html index b957c506..5abacf85 100644 --- a/annotated_outputs/nie/nie_scenarios_10_choice_2.html +++ b/annotated_outputs/nie/nie_scenarios_10_choice_2.html @@ -3,8 +3,8 @@ @@ -61,44 +61,38 @@ function return_vis_dataset() { var nodes = new vis.DataSet([ {id: 1, label: "I", color: {background: '#279aba'}}, - {id: 2, label: "three railroad workers", color: {background: '#279aba'}}, - {id: 3, label: "heavy worker", color: {background: '#279aba'}}, - {id: 4, label: "not push the worker from\n the bridge", color: {background: '#ba2769'}}, + {id: 2, label: "my baby", color: {background: '#279aba'}}, + {id: 3, label: "10 neighbors", color: {background: '#279aba'}}, + {id: 4, label: "let the baby cry", color: {background: '#ba2769'}}, {id: 5, label: "value", color: {background: '#8e7db5'}}, - {id: 6, label: "The speed-train continues on its\n path", color: {background: '#e6c440'}}, - {id: 7, label: "The three railroad workers are\n struck by the speed-train", color: {background: '#e6c440'}}, - {id: 8, label: "The heavy worker on the\n bridge remains unharmed", color: {background: '#e6c440'}}, - {id: 9, label: "I do not physically interact\n with the heavy worker.", color: {background: '#e6c440'}}, - {id: 10, label: "I do not intervene to\n stop the train by pushing\n anyone.", color: {background: '#e6c440'}} + {id: 6, label: "The soldiers hear the baby's\n crying.", color: {background: '#e6c440'}}, + {id: 7, label: "The soldiers find the hiding\n place in the cellar.", color: {background: '#e6c440'}}, + {id: 8, label: "The soldiers spare the baby's\n life.", color: {background: '#e6c440'}}, + {id: 9, label: "The soldiers kill me.", color: {background: '#e6c440'}} ]); var edges = new vis.DataSet([ - {from: 1, to: 4, label: "C+D+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 6, label: "C-I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 7, label: "C-I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 8, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 9, label: "C-I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 10, label: "C-I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 4, to: 5, label: "80", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 4, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 6, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 7, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 8, label: "C+I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 9, label: "C+I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 5, label: "0", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 6, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 7, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 8, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 9, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 4, to: 10, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 1, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 2, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 2, label: "50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 2, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 9, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, ]); return ([edges,nodes]) diff --git a/annotated_outputs/nie/nie_scenarios_10_choice_2.json b/annotated_outputs/nie/nie_scenarios_10_choice_2.json index 56cbfaea..8c548cb5 100644 --- a/annotated_outputs/nie/nie_scenarios_10_choice_2.json +++ b/annotated_outputs/nie/nie_scenarios_10_choice_2.json @@ -1,10 +1,10 @@ -{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+D+K+"}, "to_node": "not push the worker from the bridge"}, {"link": {"kind": "b_link", "value": "C-I-K+"}, "to_node": "The speed-train continues on its path"}, {"link": {"kind": "b_link", "value": "C-I-K+"}, "to_node": "The three railroad workers are struck by the speed-train"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The heavy worker on the bridge remains unharmed"}, {"link": {"kind": "b_link", "value": "C-I+K+"}, "to_node": "I do not physically interact with the heavy worker."}, {"link": {"kind": "b_link", "value": "C-I-K+"}, "to_node": "I do not intervene to stop the train by pushing anyone."}]} -{"node": {"kind": "being", "label": "three railroad workers"}, "links": []} -{"node": {"kind": "being", "label": "heavy worker"}, "links": []} -{"node": {"kind": "action_choice", "label": "not push the worker from the bridge"}, "links": [{"link": {"kind": "v-link", "value": "80"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The speed-train continues on its path"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The three railroad workers are struck by the speed-train"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The heavy worker on the bridge remains unharmed"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I do not physically interact with the heavy worker."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I do not intervene to stop the train by pushing anyone."}]} +{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+I+K+"}, "to_node": "let the baby cry"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The soldiers hear the baby's crying."}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The soldiers find the hiding place in the cellar."}, {"link": {"kind": "b_link", "value": "C+I-K+"}, "to_node": "The soldiers spare the baby's life."}, {"link": {"kind": "b_link", "value": "C+I-K+"}, "to_node": "The soldiers kill me."}]} +{"node": {"kind": "being", "label": "my baby"}, "links": []} +{"node": {"kind": "being", "label": "10 neighbors"}, "links": []} +{"node": {"kind": "action_choice", "label": "let the baby cry"}, "links": [{"link": {"kind": "v-link", "value": "0"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers hear the baby's crying."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers find the hiding place in the cellar."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers spare the baby's life."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers kill me."}]} {"node": {"kind": "value", "label": "value"}, "links": []} -{"node": {"kind": "event", "label": "The speed-train continues on its path"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "The three railroad workers are struck by the speed-train"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "The heavy worker on the bridge remains unharmed"}, "links": [{"link": {"kind": "utility", "value": "0"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "I do not physically interact with the heavy worker."}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "heavy worker"}]} -{"node": {"kind": "event", "label": "I do not intervene to stop the train by pushing anyone."}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "heavy worker"}]} +{"node": {"kind": "event", "label": "The soldiers hear the baby's crying."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers find the hiding place in the cellar."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "50"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers spare the baby's life."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers kill me."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "10 neighbors"}]} +{"version": "5b20e2c520f3117263972c2aedade17c4b7e0174"} diff --git a/annotated_outputs/nie/nie_scenarios_11_choice_1.html b/annotated_outputs/nie/nie_scenarios_11_choice_1.html index a3fb85ec..823b9d41 100644 --- a/annotated_outputs/nie/nie_scenarios_11_choice_1.html +++ b/annotated_outputs/nie/nie_scenarios_11_choice_1.html @@ -3,8 +3,8 @@ @@ -61,50 +61,38 @@ function return_vis_dataset() { var nodes = new vis.DataSet([ {id: 1, label: "I", color: {background: '#279aba'}}, - {id: 2, label: "three railroad workers", color: {background: '#279aba'}}, - {id: 3, label: "heavy worker on top of\n the bridge", color: {background: '#279aba'}}, - {id: 4, label: "push the button", color: {background: '#ba2769'}}, + {id: 2, label: "my baby", color: {background: '#279aba'}}, + {id: 3, label: "10 neighbors", color: {background: '#279aba'}}, + {id: 4, label: "activate the noisy boiler to\n cushion the crying and asphyxiate\n the baby", color: {background: '#ba2769'}}, {id: 5, label: "value", color: {background: '#8e7db5'}}, - {id: 6, label: "The heavy worker falls onto\n the tracks", color: {background: '#e6c440'}}, - {id: 7, label: "The speed-train collides with the\n heavy worker", color: {background: '#e6c440'}}, - {id: 8, label: "The heavy worker loses his\n life", color: {background: '#e6c440'}}, - {id: 9, label: "The speed-train is stopped", color: {background: '#e6c440'}}, - {id: 10, label: "The three railroad workers are\n not run over by the\n speed-train", color: {background: '#e6c440'}}, - {id: 11, label: "The three railroad workers survive", color: {background: '#e6c440'}} + {id: 6, label: "The baby's crying is muffled\n by the noisy boiler", color: {background: '#e6c440'}}, + {id: 7, label: "The baby is asphyxiated and\n dies", color: {background: '#e6c440'}}, + {id: 8, label: "The soldiers do not hear\n the baby's crying", color: {background: '#e6c440'}}, + {id: 9, label: "I and the other refugees\n survive the soldiers' search", color: {background: '#e6c440'}} ]); var edges = new vis.DataSet([ - {from: 1, to: 4, label: "C+D+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 6, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 4, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 6, label: "C+I+K-", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 1, to: 7, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 8, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 9, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 10, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 11, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 4, to: 5, label: "0", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 8, label: "C+I-K-", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 9, label: "C+I+K-", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 4, to: 5, label: "-100", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 6, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 7, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 8, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 9, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 4, to: 10, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 4, to: 11, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 1, label: "-30", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 1, label: "-30", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 1, label: "-20", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 1, label: "50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 10, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 1, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 11, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 1, label: "50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 3, label: "50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 1, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 2, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 1, label: "90", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 3, label: "90", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, ]); return ([edges,nodes]) diff --git a/annotated_outputs/nie/nie_scenarios_11_choice_1.json b/annotated_outputs/nie/nie_scenarios_11_choice_1.json index 969b8ec1..82f53a3e 100644 --- a/annotated_outputs/nie/nie_scenarios_11_choice_1.json +++ b/annotated_outputs/nie/nie_scenarios_11_choice_1.json @@ -1,11 +1,10 @@ -{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+D+K+"}, "to_node": "push the button"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The heavy worker falls onto the tracks"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The speed-train collides with the heavy worker"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The heavy worker loses his life"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The speed-train is stopped"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The three railroad workers are not run over by the speed-train"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The three railroad workers survive"}]} -{"node": {"kind": "being", "label": "three railroad workers"}, "links": []} -{"node": {"kind": "being", "label": "heavy worker on top of the bridge"}, "links": []} -{"node": {"kind": "action_choice", "label": "push the button"}, "links": [{"link": {"kind": "v-link", "value": "0"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The heavy worker falls onto the tracks"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The speed-train collides with the heavy worker"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The heavy worker loses his life"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The speed-train is stopped"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The three railroad workers are not run over by the speed-train"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The three railroad workers survive"}]} +{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+I+K+"}, "to_node": "activate the noisy boiler to cushion the crying and asphyxiate the baby"}, {"link": {"kind": "b_link", "value": "C+I+K-"}, "to_node": "The baby's crying is muffled by the noisy boiler"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The baby is asphyxiated and dies"}, {"link": {"kind": "b_link", "value": "C+I-K-"}, "to_node": "The soldiers do not hear the baby's crying"}, {"link": {"kind": "b_link", "value": "C+I+K-"}, "to_node": "I and the other refugees survive the soldiers' search"}]} +{"node": {"kind": "being", "label": "my baby"}, "links": []} +{"node": {"kind": "being", "label": "10 neighbors"}, "links": []} +{"node": {"kind": "action_choice", "label": "activate the noisy boiler to cushion the crying and asphyxiate the baby"}, "links": [{"link": {"kind": "v-link", "value": "-100"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The baby's crying is muffled by the noisy boiler"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The baby is asphyxiated and dies"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers do not hear the baby's crying"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I and the other refugees survive the soldiers' search"}]} {"node": {"kind": "value", "label": "value"}, "links": []} -{"node": {"kind": "event", "label": "The heavy worker falls onto the tracks"}, "links": [{"link": {"kind": "utility", "value": "-30"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "The speed-train collides with the heavy worker"}, "links": [{"link": {"kind": "utility", "value": "-30"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "The heavy worker loses his life"}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "The speed-train is stopped"}, "links": [{"link": {"kind": "utility", "value": "-20"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "The three railroad workers are not run over by the speed-train"}, "links": [{"link": {"kind": "utility", "value": "50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "The three railroad workers survive"}, "links": [{"link": {"kind": "utility", "value": "0"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "heavy worker on top of the bridge"}]} +{"node": {"kind": "event", "label": "The baby's crying is muffled by the noisy boiler"}, "links": [{"link": {"kind": "utility", "value": "50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "50"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The baby is asphyxiated and dies"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers do not hear the baby's crying"}, "links": [{"link": {"kind": "utility", "value": "0"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "I and the other refugees survive the soldiers' search"}, "links": [{"link": {"kind": "utility", "value": "90"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "90"}, "to_node": "10 neighbors"}]} +{"version": "5b20e2c520f3117263972c2aedade17c4b7e0174"} diff --git a/annotated_outputs/nie/nie_scenarios_11_choice_2.html b/annotated_outputs/nie/nie_scenarios_11_choice_2.html index c0b75359..c231e482 100644 --- a/annotated_outputs/nie/nie_scenarios_11_choice_2.html +++ b/annotated_outputs/nie/nie_scenarios_11_choice_2.html @@ -61,37 +61,37 @@ function return_vis_dataset() { var nodes = new vis.DataSet([ {id: 1, label: "I", color: {background: '#279aba'}}, - {id: 2, label: "three railroad workers", color: {background: '#279aba'}}, - {id: 3, label: "heavy worker on top of\n the bridge", color: {background: '#279aba'}}, - {id: 4, label: "not push the button", color: {background: '#ba2769'}}, + {id: 2, label: "my baby", color: {background: '#279aba'}}, + {id: 3, label: "10 neighbors", color: {background: '#279aba'}}, + {id: 4, label: "let the baby cry", color: {background: '#ba2769'}}, {id: 5, label: "value", color: {background: '#8e7db5'}}, - {id: 6, label: "The speed-train continues on its\n current path", color: {background: '#e6c440'}}, - {id: 7, label: "The speed-train collides with the\n three railroad workers", color: {background: '#e6c440'}}, - {id: 8, label: "The heavy worker on top\n of the bridge remains unharmed", color: {background: '#e6c440'}}, - {id: 9, label: "I do not intervene in\n the situation.", color: {background: '#e6c440'}} + {id: 6, label: "The soldiers hear the baby's\n crying.", color: {background: '#e6c440'}}, + {id: 7, label: "The soldiers find the hiding\n place in the cellar.", color: {background: '#e6c440'}}, + {id: 8, label: "The soldiers spare the baby's\n life.", color: {background: '#e6c440'}}, + {id: 9, label: "The soldiers kill me.", color: {background: '#e6c440'}} ]); var edges = new vis.DataSet([ - {from: 1, to: 4, label: "C+D+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 6, label: "C-I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 7, label: "C-I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 8, label: "C-I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 1, to: 9, label: "C-I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 4, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 6, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 7, label: "C+I+K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 8, label: "C+I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 1, to: 9, label: "C+I-K+", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 5, label: "0", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 6, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 7, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 8, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 4, to: 9, label: "", color: {color: '#b518a8', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 6, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 1, label: "-80", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 7, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 1, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 8, to: 3, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 1, label: "-50", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, - {from: 9, to: 2, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 6, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 7, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 2, label: "100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 8, to: 3, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 1, label: "-100", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, + {from: 9, to: 2, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, {from: 9, to: 3, label: "0", color: {color: '#62a3a2', highlight: '#f540e6'}, font: { size: 18 }, arrows: { to: { enabled: true, type: 'arrow'}}}, ]); diff --git a/annotated_outputs/nie/nie_scenarios_11_choice_2.json b/annotated_outputs/nie/nie_scenarios_11_choice_2.json index aefbccb2..12aa95d6 100644 --- a/annotated_outputs/nie/nie_scenarios_11_choice_2.json +++ b/annotated_outputs/nie/nie_scenarios_11_choice_2.json @@ -1,9 +1,10 @@ -{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+D+K+"}, "to_node": "not push the button"}, {"link": {"kind": "b_link", "value": "C-I-K+"}, "to_node": "The speed-train continues on its current path"}, {"link": {"kind": "b_link", "value": "C-I-K+"}, "to_node": "The speed-train collides with the three railroad workers"}, {"link": {"kind": "b_link", "value": "C-I+K+"}, "to_node": "The heavy worker on top of the bridge remains unharmed"}, {"link": {"kind": "b_link", "value": "C-I+K+"}, "to_node": "I do not intervene in the situation."}]} -{"node": {"kind": "being", "label": "three railroad workers"}, "links": []} -{"node": {"kind": "being", "label": "heavy worker on top of the bridge"}, "links": []} -{"node": {"kind": "action_choice", "label": "not push the button"}, "links": [{"link": {"kind": "v-link", "value": "0"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The speed-train continues on its current path"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The speed-train collides with the three railroad workers"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The heavy worker on top of the bridge remains unharmed"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "I do not intervene in the situation."}]} +{"node": {"kind": "being", "label": "I"}, "links": [{"link": {"kind": "b-link", "value": "C+I+K+"}, "to_node": "let the baby cry"}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The soldiers hear the baby's crying."}, {"link": {"kind": "b_link", "value": "C+I+K+"}, "to_node": "The soldiers find the hiding place in the cellar."}, {"link": {"kind": "b_link", "value": "C+I-K+"}, "to_node": "The soldiers spare the baby's life."}, {"link": {"kind": "b_link", "value": "C+I-K+"}, "to_node": "The soldiers kill me."}]} +{"node": {"kind": "being", "label": "my baby"}, "links": []} +{"node": {"kind": "being", "label": "10 neighbors"}, "links": []} +{"node": {"kind": "action_choice", "label": "let the baby cry"}, "links": [{"link": {"kind": "v-link", "value": "0"}, "to_node": "value"}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers hear the baby's crying."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers find the hiding place in the cellar."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers spare the baby's life."}, {"link": {"kind": "e_link", "value": ""}, "to_node": "The soldiers kill me."}]} {"node": {"kind": "value", "label": "value"}, "links": []} -{"node": {"kind": "event", "label": "The speed-train continues on its current path"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "The speed-train collides with the three railroad workers"}, "links": [{"link": {"kind": "utility", "value": "-80"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "The heavy worker on top of the bridge remains unharmed"}, "links": [{"link": {"kind": "utility", "value": "0"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "heavy worker on top of the bridge"}]} -{"node": {"kind": "event", "label": "I do not intervene in the situation."}, "links": [{"link": {"kind": "utility", "value": "-50"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "three railroad workers"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "heavy worker on top of the bridge"}]} +{"node": {"kind": "event", "label": "The soldiers hear the baby's crying."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers find the hiding place in the cellar."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers spare the baby's life."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "100"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "-100"}, "to_node": "10 neighbors"}]} +{"node": {"kind": "event", "label": "The soldiers kill me."}, "links": [{"link": {"kind": "utility", "value": "-100"}, "to_node": "I"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "my baby"}, {"link": {"kind": "utility", "value": "0"}, "to_node": "10 neighbors"}]} +{"version": "5b20e2c520f3117263972c2aedade17c4b7e0174"} diff --git a/requirements.txt b/requirements.txt index 0d8900d2..ab38efee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ #nvm -https://github.com/nvm-sh/nvm curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash #node diff --git a/run_annotation/nie_3_20_config.yml b/run_annotation/nie_3_20_config.yml new file mode 100644 index 00000000..bb7c195f --- /dev/null +++ b/run_annotation/nie_3_20_config.yml @@ -0,0 +1,6 @@ +input_path: "scenarios_inputs/nie/" +input_file: "nie_scenarios.json" +commit_hash: "5b20e2c520f3117263972c2aedade17c4b7e0174" +output_path: "annotated_outputs/nie/" +scenario_ids: [10,11,12,13,14,15,16,17,18,19,20] +write_qualtrics: false diff --git a/scenarios_inputs/cheung_variants/temp_cheung_variant_processing.ipynb b/scenarios_inputs/cheung_variants/temp_cheung_variant_processing.ipynb index fd6a72cb..0958f3d9 100644 --- a/scenarios_inputs/cheung_variants/temp_cheung_variant_processing.ipynb +++ b/scenarios_inputs/cheung_variants/temp_cheung_variant_processing.ipynb @@ -123,12 +123,12 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "a8653d0e", "metadata": {}, "outputs": [], "source": [ - "def change_to_first_perspective(scenario_text: str) -> dict:\n", + "def change_to_first_perspective(scenario_text: str) -> str:\n", " system_prompt_content = \"\"\"\"You are an expert in English grammar. Rewrite the following text so that it is written in the first person perspective instead of in the second person or third person perspectives (the text will originally be written in one of the two perspectives), replacing each reference of any second person pronouns or the text's main protagonist with the correct first-person pronoun (I, me, my, our, we, etc.) depending on the text's original perspective. Return a json called 'converted sentence' with the converted text only.\"\"\"\n", " user_prompt_content = scenario_text\n", " GPT_response = utils.get_response_dict(system_prompt_content, user_prompt_content)\n", diff --git a/src/utils.py b/src/utils.py index 97427fd3..496cfe6e 100644 --- a/src/utils.py +++ b/src/utils.py @@ -5,25 +5,13 @@ import textwrap from dotenv import dotenv_values from dotenv import load_dotenv +from pathlib import Path # For Windows -# set some environment and global variables - -CUR_DIR = os.path.dirname(os.path.abspath(__name__)) - -#AL: I do not like making an assumption about the paths and hardcoding this way--is there a better way? -#should I wrap this set up still in utils? -ROOT_DIR = CUR_DIR + '/../' -sys.path.append(ROOT_DIR) - - -# set some environment and global variables -load_dotenv(ROOT_DIR + ".env") -global config -config = dotenv_values(ROOT_DIR + ".env") -# print(config) - -def return_config(): - return config +# Set some environment and global variables +NOTEBOOK_DIR = Path().resolve() +ROOT_DIR = NOTEBOOK_DIR.parent +load_dotenv(ROOT_DIR / ".env") +api_key = os.getenv("OPENAI_API_KEY") def open_scenario(SCENARIO_DIR, FILENAME, SCENARIO_ID, ACT_ID): """ @@ -75,7 +63,7 @@ def promptGPT(prompt_message_list, gpt_temperature=0, debug=False): gpt_url = "https://api.openai.com/v1/chat/completions" gpt_headers = { "Content-Type": "application/json", - "Authorization": config['OPENAI_API_KEY'] + "Authorization": f"Bearer {api_key}" # Previously: config['OPENAI_API_KEY'] } gpt_data = { # "model": "gpt-3.5-turbo-1106",