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 legends to show Disease and Chemical as Annotation #54

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b09d8e8
regenerate ontology
Leolty Jul 21, 2022
4e5893a
Add Disease and Chemical in ontology
Leolty Jul 21, 2022
266d648
Add NER Label Processor
Leolty Jul 21, 2022
3c9865e
Add mimic iii reader
Leolty Jul 21, 2022
745d354
Add demo
Leolty Jul 21, 2022
c18184e
design clinical pipeline
Leolty Jul 21, 2022
451c488
Search engine and related utils
Leolty Jul 21, 2022
f201997
add stave config
Leolty Jul 21, 2022
4642690
add stave project ontology file
Leolty Jul 21, 2022
f6dea81
add some CRUD to temporally fix a bug
Leolty Jul 21, 2022
6232812
black and pylint
Leolty Jul 21, 2022
a8e8803
solve pylint issues
Leolty Jul 21, 2022
e541851
normalize the config
Leolty Jul 21, 2022
9c7d6e2
solve black issue
Leolty Jul 21, 2022
c7ea7e1
solve pylint issue
Leolty Jul 21, 2022
557b827
solve pylint issue: import itself
Leolty Jul 21, 2022
2e2dcd5
add a README file
Leolty Jul 21, 2022
8ba0d6f
add ner label test
Leolty Jul 21, 2022
555610b
solve black issue
Leolty Jul 21, 2022
94ae230
black check
Leolty Jul 21, 2022
e21b7a2
remove main
Leolty Jul 21, 2022
42b2b06
add set_up
Leolty Jul 21, 2022
7015b84
shorten the string
Leolty Jul 21, 2022
560631f
fix test bug
Leolty Jul 21, 2022
b83e4ae
remove unused import
Leolty Jul 21, 2022
3634a07
fix pytest issue
Leolty Jul 21, 2022
0ccdfa4
fix pytest bug
Leolty Jul 21, 2022
b9d08cf
black reformat
Leolty Jul 22, 2022
deefc84
remove unused comment
Leolty Jul 22, 2022
7625dd9
add json dumps and remove SQL statements
Leolty Jul 25, 2022
b9af6df
wrap search engine code in method
Leolty Aug 13, 2022
8ffa0fa
remove unnecessary comments
Leolty Aug 13, 2022
9532d13
remove extra empty lines
Leolty Aug 13, 2022
24dca3e
add lang model as config
Leolty Aug 13, 2022
9d98979
fix dependency
Leolty Aug 13, 2022
1b2263e
black reformat
Leolty Aug 13, 2022
2694aec
black reformat
Leolty Aug 13, 2022
a8494cf
black line len 80 format
Leolty Aug 13, 2022
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
Prev Previous commit
Next Next commit
add json dumps and remove SQL statements
Leolty committed Jul 25, 2022
commit 7625dd95f5deb5c38879945de1bafd4a128469ec
26 changes: 1 addition & 25 deletions examples/label_example/sqlite_utils.py
Original file line number Diff line number Diff line change
@@ -75,37 +75,13 @@ def update_stave_db(default_project_json, config):
][0]
return base_project["id"]

resp1 = session.create_project(default_project_json)
resp1 = session.create_project(json.dumps(default_project_json))
project_id_base = json.loads(resp1.text)["id"]

config = yaml.safe_load(open("stave_config.yml", "r"))
config = Config(config, default_hparams=None)
con = sqlite3.connect(config.Stave.stave_db_path)

cursorObj = con.cursor()
cursorObj.execute(
f"SELECT ontology, config FROM stave_backend_project WHERE id = {project_id_base}"
)
results = cursorObj.fetchall()
onto = results[0][0]
conf = results[0][1]

onto_new = onto.replace("'", '"')
conf_new = (
conf.replace("'", '"').replace("True", "true").replace("False", "false")
)

cursorObj.execute(
"UPDATE stave_backend_project SET ontology ='"
+ onto_new
+ f"' WHERE id = {project_id_base}"
)
cursorObj.execute(
"UPDATE stave_backend_project SET config ='"
+ conf_new
+ f"' WHERE id = {project_id_base}"
)

con.commit()

return project_id_base