-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathupdate-param-values.sh
86 lines (84 loc) · 5.31 KB
/
update-param-values.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
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
## This script set the default default-param-values file
## it use an hand-made existing file, if it exists
## else create a new file
d_f=default-param-values.xml
FILE=$1
PREFIX=fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules
if [ -e "$d_f" ]; then
echo "File exists";
cat $d_f > $FILE
else
echo "File does not exist, create one"
## params values setting
cat $FILE | \
## xmi import
xmlstarlet ed -d "//module[@class='$PREFIX.uima.XMIImport']/source" | \
## xmi export
xmlstarlet ed -u "//module[@class='$PREFIX.uima.XMIExport']/outDir" -v . | \
xmlstarlet ed -u "//module[@class='$PREFIX.uima.XMIExport']/typeSystemFile" -v typesystem.xml | \
## biolg ?not istalled
xmlstarlet ed -d "//module[@class='$PREFIX.biolg.BioLG']/parserPath" | \
xmlstarlet ed -d "//module[@class='$PREFIX.biolg.BioLG']/lp2lpExecutable" | \
xmlstarlet ed -d "//module[@class='$PREFIX.biolg.BioLG']/lp2lpConf" | \
## enju parser
xmlstarlet ed -d "//module[@class='$PREFIX.enju.EnjuParser']/enjuExecutable" | \
## enju parser 2
xmlstarlet ed -d "//module[@class='$PREFIX.enju.EnjuParser2']/enjuExecutable" | \
## ccg parser params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.ccg.CCGParser']/executable" -v /alvisnlp/psoft/candc-1.00/bin/parser | \
xmlstarlet ed -d "//module[@class='$PREFIX.ccg.CCGParser']/parserModel" | \
xmlstarlet ed -d "//module[@class='$PREFIX.ccg.CCGParser']/superModel" | \
## ccg postagger params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.ccg.CCGPosTagger']/executable" -v /alvisnlp/psoft/candc-1.00/bin/pos | \
xmlstarlet ed -d "//module[@class='$PREFIX.ccg.CCGPosTagger']/model" | \
## geniatagger params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.geniatagger.GeniaTagger']/geniaDir" -v /alvisnlp/psoft/geniatagger-3.0.2 | \
## species tagger param setting
xmlstarlet ed -u "//module[@class='$PREFIX.Species']/speciesDir" -v /alvisnlp/psoft/species_tagger/ | \
## Ab3P param settings ?not istalled
xmlstarlet ed -d "//module[@class='$PREFIX.ab3p.Ab3P']/installDir" | \
## ChemSpotA param settings ?not istalled
xmlstarlet ed -d "//module[@class='$PREFIX.chemspot.ChemSpotA']/cRFModel" | \
xmlstarlet ed -d "//module[@class='$PREFIX.chemspot.ChemSpotA']/dictionary" | \
## stanford param values setting
## xmlstarlet ed -d "//module[@class='$PREFIX.stanford.StanfordNER']/classifierFile" | \
## tees classify params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.tees.TEESClassify']/teesHome" -v /alvisnlp/psoft/tees/ | \
## tees train params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.tees.TEESTrain']/teesHome" -v /alvisnlp/psoft/tees/ | \
## wapiti label params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.wapiti.WapitiLabel']/wapitiExecutable" -v /usr/local/bin/wapiti | \
## wapiti train params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.wapiti.WapitiTrain']/wapitiExecutable" -v /usr/local/bin/wapiti | \
## treetagger
xmlstarlet ed -u "//module[@class='$PREFIX.treetagger.TreeTagger']/treeTaggerExecutable" -v /alvisnlp/psoft/treetagger/bin/tree-tagger | \
xmlstarlet ed -d "//module[@class='$PREFIX.treetagger.TreeTagger']/parFile" | \
## yatea params values setting
xmlstarlet ed -u "//module[@class='$PREFIX.yatea.YateaExtractor']/yateaExecutable" -v /usr/local/bin/yatea | \
xmlstarlet ed -u "//module[@class='$PREFIX.yatea.YateaExtractor']/rcFile" -v res://yatea.rc | \
#xmlstarlet ed -d //module[@class='$PREFIX.yatea.YateaExtractor']/rcFile" | \
xmlstarlet ed -d "//module[@class='$PREFIX.yatea.YateaExtractor']/configDir" | \
xmlstarlet ed -d "//module[@class='$PREFIX.yatea.YateaExtractor']/localeDir" | \
## tomap params
xmlstarlet ed -u "//module[@class='$PREFIX.tomap.TomapTrain']/yateaExecutable" -v /usr/local/bin/yatea | \
xmlstarlet ed -u "//module[@class='$PREFIX.tomap.TomapTrain']/rcFile" -v res://yatea.rc | \
xmlstarlet ed -d "//module[@class='$PREFIX.tomap.TomapTrain']/configDir" | \
xmlstarlet ed -d "//module[@class='$PREFIX.tomap.TomapTrain']/localeDir" | \
## chemspot ?not istalled
xmlstarlet ed -d "//module[@class='$PREFIX.chemspot.Chemspot']/chemspotDir" | \
## Word2Vec ?not istalled
xmlstarlet ed -u "//module[@class='$PREFIX.contes.Word2Vec']/contesDir" -v /alvisnlp/psoft/CONTES | \
xmlstarlet ed --subnode "//module[@class='$PREFIX.contes.Word2Vec']" --type elem -n python3Executable | \
xmlstarlet ed -u "//module[@class='$PREFIX.contes.Word2Vec']/python3Executable" -v /root/miniconda3/envs/contesenv/bin/python3.6 | \
xmlstarlet ed -d "//module[@class='$PREFIX.contes.Word2Vec']/workers" | \
## ContesTrain ?not istalled
xmlstarlet ed -u "//module[@class='$PREFIX.contes.ContesTrain']/contesDir" -v /alvisnlp/psoft/CONTES | \
xmlstarlet ed --subnode "//module[@class='$PREFIX.contes.Word2Vec']" --type elem -n python3Executable | \
xmlstarlet ed -u "//module[@class='$PREFIX.contes.ContesTrain']/python3Executable" -v /root/miniconda3/envs/contesenv/bin/python3.6 | \
## ContesPredict ?not istalled
xmlstarlet ed -u "//module[@class='$PREFIX.contes.ContesPredict']/contesDir" -v /alvisnlp/psoft/CONTES | \
xmlstarlet ed --subnode "//module[@class='$PREFIX.contes.Word2Vec']" --type elem -n python3Executable | \
xmlstarlet ed -u "//module[@class='$PREFIX.contes.ContesPredict']/python3Executable" -v /root/miniconda3/envs/contesenv/bin/python3.6 | \
tee $FILE
fi