Skip to content

Commit

Permalink
✨ implement working dataframe framework
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-schmitt committed Jan 10, 2024
1 parent 894962e commit e6b815d
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 234 deletions.
5 changes: 4 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
from tracex.extraction.prototype import function_calls as fc
from tracex.extraction.prototype import prompts as p

text = open(u.input_path / "journey_synth_covid_1.txt").read()
text = open(u.input_path / "journey_synth_covid_2.txt").read()
df = ih.convert_text_to_bulletpoints(text)
print(df)
df = ih.add_start_dates(text, df)
df = ih.add_end_dates(text, df)
# df = ih.add_durations(text, df)
df = ih.add_event_types(df)
df = ih.add_locations(df)

print(df)

Expand Down
7 changes: 3 additions & 4 deletions tracex/extraction/content/inputs/journey_synth_covid_0.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
In June 2022, I began experiencing the first symptoms of Covid-19. It started with a mild cough and fatigue, which I initially brushed off as a common cold. However, as the days went by, my symptoms worsened, and I developed a high fever and difficulty breathing. Concerned, I decided to get tested for Covid-19.

On June 17th, I went to a local testing center and underwent a PCR test. The waiting period for the results felt agonizingly long, and during that time, I isolated myself from my family to prevent any potential spread. Finally, on June 20th, I received the confirmation that I had indeed contracted the virus.

In June 2022, I began experiencing the first symptoms of Covid-19. It started with a mild cough and fatigue, which I initially brushed off as a common cold.
However, as the days went by, my symptoms worsened, and I developed a high fever and difficulty breathing. Concerned, I decided to get tested for Covid-19.
On June 17th, I went to a local testing center and underwent a PCR test.
6 changes: 3 additions & 3 deletions tracex/extraction/prototype/function_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"type": "array",
"items": {
"type": "string",
"description": "a duration",
"description": "a duration in the format HHH:MM:SS or HH:MM:SS",
},
},
},
Expand All @@ -71,7 +71,7 @@
"type": "array",
"items": {
"type": "string",
"description": "an event type",
"description": "an event type (one of 'Symptom Onset', 'Symptom Offset', 'Diagnosis', 'Doctor visit', 'Treatment', 'Hospital stay', 'Medication', 'Lifestyle Change' and 'Feelings')",
},
},
},
Expand All @@ -91,7 +91,7 @@
"type": "array",
"items": {
"type": "string",
"description": "a location",
"description": "a location (one of 'Home', 'Hospital', 'Doctors' and 'Other')",
},
},
},
Expand Down
Loading

0 comments on commit e6b815d

Please sign in to comment.