-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
62 lines (52 loc) · 2.23 KB
/
README
File metadata and controls
62 lines (52 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
INSTALL IN THIS DIRECTORY:
1> git clone git@github.com:Georgetown-IR-Lab/QuickUMLS.git
Guide: https://github.com/Georgetown-IR-Lab/QuickUMLS?tab=readme-ov-file
2> cd QuickUMLS
3. Get a license from NLM at https://uts.nlm.nih.gov/license.html
4. Download all UMLS files from
https://www.nlm.nih.gov/research/umls/licensedcontent/umlsknowledgesources.html
5. Install UMLS using the MetamorphoSys tool:
https://www.nlm.nih.gov/pubs/factsheets/umlsmetamorph.html
Guide:
https://www.nlm.nih.gov/research/umls/implementation_resources/metamorphosys/help.html
6> conda activate 3.11
7> conda install anaconda::medspacy_quickumls
8> python -m spacy download en_core_web_sm
9. Install leveldb on your system, which has different installation requirements
for each OS. I had success on MacOS by installing it via Homebrew and then running:
> pip install leveldb-py
10> pip install quickumls-simstring
11> python -m quickumls.install 2025AA/META QuickUMLS.db
12> cd ..
INITIALIZE SERVER:
1> cd QuickUMLS
2> python -m quickumls.server QuickUMLS.db &
3> cd ..
4> python server.py &
The server will be started on port 8081.
USING THE SERVER:
1. Change your localhost to your IP/server in the following JavaScript.
2. Change $('#text').val() to your input string.
3. Change // PROCESS YOUR DATA HERE to use the JSON.
function fetchJSON() {
$('#result').html('');
const json = JSON.stringify({ text: $('#text').val() });
console.log(json);
fetch("http://localhost:8081", {method:'POST', headers:{
'content-type': 'application/json',
'Content-Length': json.length
},
'body': json
})
.then(response => response.json())
.then(data => {
console.log(JSON.stringify(data));
// PROCESS YOUR DATA HERE
})
.catch(error => console.error(error));
}
NOTES:
- Need to convert curly quotes into normal quotes!
- To get rid of acronyms, use OpenAI with the following phrase as a pre-screen:
Please expand the medical acronyms in the following text without any commentary: XXXXXXXX
E.g., Please expand the medical acronyms in the following text without any commentary: To support young investigators conducting clinical research studies in ALS.