-
Notifications
You must be signed in to change notification settings - Fork 2
/
parser_config.py
executable file
·41 lines (30 loc) · 1.35 KB
/
parser_config.py
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
import os,sys, re
# example command:
#python bluebert/run_bluebert_ner_predict.py --data_dir=test/txt --output_dir=test/json
#--------------------- MODIFY -------------------------------------#
# Please modifie the following parameters before parsing.
class Config():
# Base BERT config
max_seq_length=384
vocab_file="model/bluebert_config/vocab.txt"
bert_config_file="model/bluebert_config/bert_config.json"
pred_batch_size = 8
learning_rate = 0.01
# PICO NER config
init_checkpoint_pico = "model/pico_model_tian_check/model.ckpt-6045"
bluebert_pico_dir = "model/pico_model_tian_check"
#init_checkpoint_pico = "model/pico_model/model.ckpt"
#bluebert_pico_dir = "model/pico_model"
# Medical Evidence Dependency config
init_checkpoint_dependency = "model/dependency_model_tian_check/model.ckpt-20000"
bluebert_dependency_dir = "model/dependency_model_tian_check"
# Sentence Classification config
init_checkpoint_sent = ""
bluebert_sent_dir = ""
# UMLS config
use_UMLS = 0 # 0 represents not using UMLS
QuickUMLS_git_dir = "/home/tk2624/tools/QuickUMLS-master"
QuickUMLS_dir = "/home/tk2624/tools/QuickUMLS" # where your QuickUMLS data is intalled
if not os.path.exists("QuickUMLS"):
command = "ln -s "+ QuickUMLS_git_dir + " QuickUMLS"
os.system (command)