Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more patterns for the annotator #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import connexion

from openapi_server.models.error import Error # noqa: E501
from openapi_server.models.text_covid_symptom_annotation_request import TextCovidSymptomAnnotationRequest # noqa: E501
from openapi_server.models.text_covid_symptom_annotation_response import TextCovidSymptomAnnotationResponse # noqa: E501
from openapi_server.models.text_covid_symptom_annotation import TextCovidSymptomAnnotation # noqa: E501
import re


patterns = {'cough': re.compile("cough"), 'fever': re.compile("fever")}
import re
patterns = dict()
condition_dict = {'abdominal pain':'abdominal_pain','chest pain':'chest_pain','chill':'chill','cough':'cough','cyanosis':'cyanosis','delirium':'delirium','diarrhea':'diarrhea','dyspnea':'dyspnea','fatigue':'fatigue','fever':'fever','headache':'headache','hypersomnia':'hypersomnia','loss of appetite':'loss_of_appetite','loss of smell':'loss_of_smell','loss of taste':'loss_of_taste','myalgia':'myalgia','nasal obstruction':'nasal_obstruction','nausea':'nausea','sore throat':'sore_throat','vomiting':'vomiting', 'shortness of breath':'nasal_obstruction', 'muscle ache':"chill"}
for i in condition_dict.keys():
patterns[condition_dict[i]] = re.compile(i,re.IGNORECASE)


def create_text_covid_symptom_annotations(text_covid_symptom_annotation_request=None): # noqa: E501
Expand Down
4 changes: 2 additions & 2 deletions server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
connexion[swagger-ui]==2.7.0
connexion[swagger-ui]==2.11.2
python_dateutil==2.8.1
swagger-ui-bundle==0.0.8
swagger-ui-bundle==0.0.8