This tool streamlines the manual review of synthetically generated Q&A's for medical records.
-
Navigate to a directory of your choice and clone a copy of this repo:
git clone git@github.com:bbj-lab/annotation-ui.git cd annotation-ui -
Place the supplied csv files of the form
1_chunk_###_to_###.csvinto a subfolderdatainsideannotation-ui. -
Create and activate a conda environment as specified in
environment.yml:conda env create -f environment.yml conda activate label_annotator
(Instructions for installing miniconda are available here if conda is not already available on your system.)
-
Depending on port availability, you may need to edit the port number in
app.pyto be something other than5000:app.run(debug=True, host='0.0.0.0', port=5000)
-
Run the app from your terminal:
python app.py
You should get some messages along the lines of:
* Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:5000 * Running on http://192.168.86.131:5000where
5000may be different, depending on the port number selected in step 4. -
Navigate your browser to the address given in the above step. You should encounter a screen that looks like this:
Select a file from the
datafolder. -
The screen should now look like this:
On the left hand side, you will find the file name at the top, followed by the text of the note.
On the right, there is a navigation tool to allow you to move between notes. Next is the answer (Yes/No/Not specified), followed by the Question, Question type, Section, Source, and Explanation. Modify as needed. If the question cannot be salvaged, select "Invalid Label". After modifications, click "Save" to navigate to the next question. If no modification is necessary, click "Next" at the top to proceed.
-
In the subfolder
annotated, you will now find the annotated version of your csv file.