-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathwrapper_for_parsing.sh
executable file
·31 lines (26 loc) · 1.09 KB
/
wrapper_for_parsing.sh
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
#!/bin/bash
# author: Tian Kang ([email protected])
# Simple wrapper for the eligibility criteria parser.
# Before running the parser, please change the @arguements to your personal dir and files
#
# NOTE: this script assumes MetaMap is installed and requires that
# the MetaMap support services are running. If you have
# MetaMap installed in $MM, these can be started as
#
# $MM/bin/skrmedpostctl start
# $MM/bin/wsdserverctl start
#
# Required python pacakage:
# nltk suites
# networkx
# codecs
# libsvm (https://www.csie.ntu.edu.tw/~cjlin/libsvm , https://github.com/cjlin1/libsvm/tree/master/python)
# practnlptools (https://pypi.python.org/pypi/practnlptools/1.0)
#!!!! Personalize your parameters before parsing !!!!#
INPUT_DIR='Tempfile' # change to your input dir
INPUT_TEXT='test.txt' # change to your input .txt file name
OUTPUT_DIR='Tempfile' # change to your output dir
python NamedEntityRecognition.py $INPUT_DIR $INPUT_TEXT $OUTPUT_DIR
echo "Named Entity Recognition Finished!"
python Relation.py $OUTPUT_DIR $INPUT_TEXT
echo "Parsing Finished!"