Commit 70bd4b2df1678b492abe0ab8db9f9e86c182f58d

Authored by Jean-François Rey
1 parent fa23090792
Exists in master

update

Showing 2 changed files with 12 additions and 1 deletions Inline Diff

1 #!/bin/bash 1 #!/bin/bash
2 2
3 #-------------------# 3 #-------------------#
4 # OTMEDIA LIA # 4 # OTMEDIA LIA #
5 # Install script # 5 # Install script #
6 # version : 1.1.0 # 6 # version : 1.1.0 #
7 #-------------------# 7 #-------------------#
8 8
9 # nyx login name 9 # nyx login name
10 username=${LOGNAME} 10 username=${LOGNAME}
11 11
12 # Color variables 12 # Color variables
13 txtred=$(tput setaf 1) # red 13 txtred=$(tput setaf 1) # red
14 txtgrn=$(tput setaf 2) # Green 14 txtgrn=$(tput setaf 2) # Green
15 txtylw=$(tput setaf 3) # Yellow 15 txtylw=$(tput setaf 3) # Yellow
16 txtblu=$(tput setaf 4) # Blue 16 txtblu=$(tput setaf 4) # Blue
17 txtred=$(tput setaf 5) # Purple 17 txtred=$(tput setaf 5) # Purple
18 txtcyn=$(tput setaf 6) # Cyan 18 txtcyn=$(tput setaf 6) # Cyan
19 txtwht=$(tput setaf 7) # White 19 txtwht=$(tput setaf 7) # White
20 txtrst=$(tput sgr0) # Text reset. 20 txtrst=$(tput sgr0) # Text reset.
21 #/color 21 #/color
22 22
23 # 23 #
24 ### Global Variables 24 ### Global Variables
25 # 25 #
26 PWD=$(pwd) 26 PWD=$(pwd)
27 OTMEDIA_HOME=$PWD 27 OTMEDIA_HOME=$PWD
28 test=$(arch) 28 test=$(arch)
29 if [ "$test" == "x86_64" ]; then ARCH=".64"; else ARCH=""; fi 29 if [ "$test" == "x86_64" ]; then ARCH=".64"; else ARCH=""; fi
30 #/Global 30 #/Global
31 31
32 32
33 # 33 #
34 # Put to 0 to disable dependencies of a pass 34 # Put to 0 to disable dependencies of a pass
35 # and 1 to enable 35 # and 1 to enable
36 # 36 #
37 PASS1=1 # First Pass 37 PASS1=1 # First Pass
38 PASS2=1 # Second and Third Pass 38 PASS2=1 # Second and Third Pass
39 CONFPASS=1 # Confidence Pass 39 CONFPASS=1 # Confidence Pass
40 EXPLOITCONFPASS=1 # SOLR query and trigg 40 EXPLOITCONFPASS=1 # SOLR query and trigg
41 SCORING=1 # Compile scoring tools (crf++) 41 SCORING=1 # Compile scoring tools (crf++)
42 42
43 echo -e "\nWill do install for :" 43 echo -e "\nWill do install for :"
44 if [ $PASS1 -eq 1 ];then echo "- Pass 1";fi 44 if [ $PASS1 -eq 1 ];then echo "- Pass 1";fi
45 if [ $PASS2 -eq 1 ];then echo "- Pass 2";fi 45 if [ $PASS2 -eq 1 ];then echo "- Pass 2";fi
46 if [ $CONFPASS -eq 1 ];then echo "- Confidence Pass";fi 46 if [ $CONFPASS -eq 1 ];then echo "- Confidence Pass";fi
47 if [ $EXPLOITCONFPASS -eq 1 ];then echo "- Exploit Confidence Pass";fi 47 if [ $EXPLOITCONFPASS -eq 1 ];then echo "- Exploit Confidence Pass";fi
48 if [ $SCORING -eq 1 ];then echo "- Scoring Tools";fi 48 if [ $SCORING -eq 1 ];then echo "- Scoring Tools";fi
49 49
50 # 50 #
51 ### CHECK Dependencies ### 51 ### CHECK Dependencies ###
52 # 52 #
53 echo -e "\n\t${txtblu}Check Dependencies${txtrst}\n" 53 echo -e "\n\t${txtblu}Check Dependencies${txtrst}\n"
54 54
55 ## make 55 ## make
56 test=$(whereis make) 56 test=$(whereis make)
57 if [ "$test" == "make:" ] 57 if [ "$test" == "make:" ]
58 then 58 then
59 echo -e "${txtred}ERROR${txtrst} make not found\n You have to install make\n sudo apt-get install make" 59 echo -e "${txtred}ERROR${txtrst} make not found\n You have to install make\n sudo apt-get install make"
60 exit 1; 60 exit 1;
61 fi 61 fi
62 echo -e "make \t ${txtgrn}OK${txtrst}" 62 echo -e "make \t ${txtgrn}OK${txtrst}"
63 63
64 ## CC 64 ## CC
65 test=$(whereis cc) 65 test=$(whereis cc)
66 if [ "$test" == "cc:" ] 66 if [ "$test" == "cc:" ]
67 then 67 then
68 echo -e "${txtred}ERROR${txtrst} cc not found\n You have to install cc\n sudo apt-get install gcc" 68 echo -e "${txtred}ERROR${txtrst} cc not found\n You have to install cc\n sudo apt-get install gcc"
69 exit 1; 69 exit 1;
70 fi 70 fi
71 echo -e "cc \t ${txtgrn}OK${txtrst}" 71 echo -e "cc \t ${txtgrn}OK${txtrst}"
72 72
73 73
74 ## C++ 74 ## C++
75 if [ $SCORING -eq 1 ] 75 if [ $SCORING -eq 1 ]
76 then 76 then
77 test=$(whereis g++) 77 test=$(whereis g++)
78 if [ "$test" == "g++:" ] 78 if [ "$test" == "g++:" ]
79 then 79 then
80 echo -e "${txtred}ERROR${txtrst} g++ not found\n You have to install g++\n sudo apt-get install g++" 80 echo -e "${txtred}ERROR${txtrst} g++ not found\n You have to install g++\n sudo apt-get install g++"
81 exit 1; 81 exit 1;
82 fi 82 fi
83 echo -e "g++ \t ${txtgrn}OK${txtrst}" 83 echo -e "g++ \t ${txtgrn}OK${txtrst}"
84 fi 84 fi
85 85
86 ## AVCONV 86 ## AVCONV
87 test=$(whereis avconv) 87 test=$(whereis avconv)
88 if [ "$test" == "avconv:" ] 88 if [ "$test" == "avconv:" ]
89 then 89 then
90 echo -e "${txtred}ERROR${txtrst} avconv not found\n You have to install avconv\n sudo apt-get install libav-tools" 90 echo -e "${txtred}ERROR${txtrst} avconv not found\n You have to install avconv\n sudo apt-get install libav-tools"
91 exit 1; 91 exit 1;
92 fi 92 fi
93 echo -e "libav-tools : avconv \t ${txtgrn}OK${txtrst}" 93 echo -e "libav-tools : avconv \t ${txtgrn}OK${txtrst}"
94 94
95 ## JAVA 95 ## JAVA
96 test=$(whereis java) 96 test=$(whereis java)
97 if [ "$test" == "java:" ] 97 if [ "$test" == "java:" ]
98 then 98 then
99 echo -e "${txtred}ERROR${txtrst} java not found\n You have to install java JRE\n sudo apt-get install openjdk-7-jre" 99 echo -e "${txtred}ERROR${txtrst} java not found\n You have to install java JRE\n sudo apt-get install openjdk-7-jre"
100 exit 1; 100 exit 1;
101 fi 101 fi
102 echo -e "Java : JRE \t ${txtgrn}OK${txtrst}" 102 echo -e "Java : JRE \t ${txtgrn}OK${txtrst}"
103 test=$(whereis javac) 103 test=$(whereis javac)
104 if [ "$test" == "javac:" ] 104 if [ "$test" == "javac:" ]
105 then 105 then
106 echo -e "${txtred}ERROR${txtrst} javac not found\n You have to install java JDK\n sudo apt-get install openjdk-7-jdk" 106 echo -e "${txtred}ERROR${txtrst} javac not found\n You have to install java JDK\n sudo apt-get install openjdk-7-jdk"
107 exit 1; 107 exit 1;
108 fi 108 fi
109 echo -e "Java : JDK \t ${txtgrn}OK${txtrst}" 109 echo -e "Java : JDK \t ${txtgrn}OK${txtrst}"
110 110
111 if [ $EXPLOITCONFPASS -eq 1 ] 111 if [ $EXPLOITCONFPASS -eq 1 ]
112 then 112 then
113 ## Python 113 ## Python
114 test=$(whereis python) 114 test=$(whereis python)
115 if [ "$test" == "python:" ] 115 if [ "$test" == "python:" ]
116 then 116 then
117 echo -e "${txtred}ERROR${txtrst} python not found\n You have to install python\n sudo apt-get install python" 117 echo -e "${txtred}ERROR${txtrst} python not found\n You have to install python\n sudo apt-get install python"
118 exit 1; 118 exit 1;
119 fi 119 fi
120 echo -e "python : \t ${txtgrn}OK${txtrst}" 120 echo -e "python : \t ${txtgrn}OK${txtrst}"
121 121
122 ## csh shell 122 ## csh shell
123 test=$(whereis csh) 123 test=$(whereis csh)
124 if [ "$test" == "csh:" ] 124 if [ "$test" == "csh:" ]
125 then 125 then
126 echo -e "${txtred}ERROR${txtrst} csh shell not found\n You have to install csh shell\n sudo apt-get install csh" 126 echo -e "${txtred}ERROR${txtrst} csh shell not found\n You have to install csh shell\n sudo apt-get install csh"
127 exit 1; 127 exit 1;
128 fi 128 fi
129 echo -e "csh shell : \t ${txtgrn}OK${txtrst}" 129 echo -e "csh shell : \t ${txtgrn}OK${txtrst}"
130 fi 130 fi
131 131
132 ## Perl 132 ## Perl
133 test=$(whereis perl) 133 test=$(whereis perl)
134 if [ "$test" == "perl:" ] 134 if [ "$test" == "perl:" ]
135 then 135 then
136 echo -e "${txtred}ERROR${txtrst} perl not found\n You have to install perl\n sudo apt-get install perl" 136 echo -e "${txtred}ERROR${txtrst} perl not found\n You have to install perl\n sudo apt-get install perl"
137 exit 1; 137 exit 1;
138 fi 138 fi
139 echo -e "perl : \t ${txtgrn}OK${txtrst}" 139 echo -e "perl : \t ${txtgrn}OK${txtrst}"
140 140
141 ## iconv 141 ## iconv
142 test=$(whereis iconv) 142 test=$(whereis iconv)
143 if [ "$test" == "iconv:" ] 143 if [ "$test" == "iconv:" ]
144 then 144 then
145 echo -e "${txtred}ERROR${txtrst} iconv not found\n You have to install iconv\n sudo apt-cache search iconv" 145 echo -e "${txtred}ERROR${txtrst} iconv not found\n You have to install iconv\n sudo apt-cache search iconv"
146 exit 1; 146 exit 1;
147 fi 147 fi
148 echo -e "iconv : \t ${txtgrn}OK${txtrst}" 148 echo -e "iconv : \t ${txtgrn}OK${txtrst}"
149 149
150 ## SRI LM 150 ## SRI LM
151 if [ -z "$SRILM" ] || [ -z "$MACHINE_TYPE" ] 151 if [ -z "$SRILM" ] || [ -z "$MACHINE_TYPE" ]
152 then 152 then
153 echo -e "${txtred}ERROR${txtrst} SRILM toolkit variables are not defined (SRILM and MACHINE_TYPE)\n You have to install SRILM Toolkit\n" 153 echo -e "${txtred}ERROR${txtrst} SRILM toolkit variables are not defined (SRILM and MACHINE_TYPE)\n You have to install SRILM Toolkit\n"
154 exit 1; 154 exit 1;
155 fi 155 fi
156 export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE 156 export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE
157 echo -e "SRILM toolkit : \t ${txtgrn}OK${txtrst}" 157 echo -e "SRILM toolkit : \t ${txtgrn}OK${txtrst}"
158 158
159 ### Speeral Configuration ### 159 ### Speeral Configuration ###
160 160
161 echo -e "\n\t${txtblu}Speeral configuration${txtrst}\n" 161 echo -e "\n\t${txtblu}Speeral configuration${txtrst}\n"
162 read -e -p "Download Speeral bin and data ? (y/n) " speeral 162 read -e -p "Download Speeral bin and data ? (y/n) " speeral
163 if [ "$speeral" == "y" ] 163 if [ "$speeral" == "y" ]
164 then 164 then
165 echo -e "Download Speeral bin and data :" 165 echo -e "Download Speeral bin and data :"
166 scp -r ${username}@nyx:/local/OTMEDIA/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/ 166 scp -r ${username}@nyx:/local/OTMEDIA/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/
167 fi 167 fi
168 echo -e "\n\t${txtblu}Generating Speeral configuration files :${txtrst}\n" 168 echo -e "\n\t${txtblu}Generating Speeral configuration files :${txtrst}\n"
169 cat $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ 169 cat $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \
170 | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ 170 | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \
171 | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ 171 | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \
172 > $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml 172 > $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml
173 echo $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml 173 echo $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml
174 cat $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ 174 cat $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \
175 | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ 175 | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \
176 | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ 176 | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \
177 > $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml 177 > $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml
178 echo $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml 178 echo $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml
179 cat $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ 179 cat $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \
180 | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ 180 | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \
181 | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ 181 | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \
182 > $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml 182 > $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml
183 echo $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml 183 echo $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml
184 184
185 185
186 if [ $EXPLOITCONFPASS -eq 1 ] 186 if [ $EXPLOITCONFPASS -eq 1 ]
187 then 187 then
188 ### LIA ltbox ### 188 ### LIA ltbox ###
189 echo -e "\t${txtblu}Install lia_ltbox${txtrst}\n" 189 echo -e "\t${txtblu}Install lia_ltbox${txtrst}\n"
190 export LIA_TAGG_LANG="french" 190 export LIA_TAGG_LANG="french"
191 export LIA_TAGG="$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" 191 export LIA_TAGG="$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/"
192 export LIA_PHON_REP="$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/" 192 export LIA_PHON_REP="$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/"
193 export LIA_BIGLEX="$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/" 193 export LIA_BIGLEX="$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/"
194 194
195 ### config lia_phon 195 ### config lia_phon
196 cd $LIA_PHON_REP 196 cd $LIA_PHON_REP
197 make all > /dev/null 197 make all > /dev/null
198 make ressource > /dev/null 198 make ressource > /dev/null
199 ### config lia_tagg 199 ### config lia_tagg
200 cd $LIA_TAGG 200 cd $LIA_TAGG
201 make all > /dev/null 201 make all > /dev/null
202 make ressource.french > /dev/null 202 make ressource.french > /dev/null
203 ### config lia_biglex 203 ### config lia_biglex
204 cd $LIA_BIGLEX 204 cd $LIA_BIGLEX
205 make -f makefile.biglex > /dev/null 205 make -f makefile.biglex > /dev/null
206 cd $OTMEDIA_HOME 206 cd $OTMEDIA_HOME
207 207
208 if [ $SCORING -eq 1 ] 208 if [ $SCORING -eq 1 ]
209 then 209 then
210 echo -e "\t${txtblu}Install CRF++${txtrst}\n" 210 echo -e "\t${txtblu}Install CRF++${txtrst}\n"
211 tar -xvzf "$OTMEDIA_HOME/tools/CRF++-0.58.tar.gz" -C "$OTMEDIA_HOME/tools/" 211 tar -xvzf "$OTMEDIA_HOME/tools/CRF++-0.58.tar.gz" -C "$OTMEDIA_HOME/tools/"
212 cd $OTMEDIA_HOME/tools/CRF++-0.58 212 cd $OTMEDIA_HOME/tools/CRF++-0.58
213 ./configure --prefix="$OTMEDIA_HOME/tools/install" 213 ./configure --prefix="$OTMEDIA_HOME/tools/install"
214 make 214 make
215 make install 215 make install
216 echo -e "\t${txtblu}Install lia_ne${txtrst}\n" 216 echo -e "\t${txtblu}Install lia_ne${txtrst}\n"
217 export PATH=$PATH:$OTMEDIA_HOME/tools/install/bin 217 export PATH=$PATH:$OTMEDIA_HOME/tools/install/bin
218 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib 218 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib
219 export LIA_NE=$OTMEDIA_HOME/tools/lia_ltbox/lia_ne_v2.2 219 export LIA_NE=$OTMEDIA_HOME/tools/lia_ltbox/lia_ne_v2.2
220 cd $LIA_NE 220 cd $LIA_NE
221 mkdir $LIA_NE/bin 2> /dev/null 221 mkdir $LIA_NE/bin 2> /dev/null
222 make all 222 make all
223 cd $OTMEDIA_HOME 223 cd $OTMEDIA_HOME
224 fi 224 fi
225 225
226 ### SOLR DB ### 226 ### SOLR DB ###
227 # Tomcat fisrtly 227 # Tomcat fisrtly
228 test=$(dpkg -l | grep "^ii" | grep tomcat) 228 test=$(dpkg -l | grep "^ii" | grep tomcat)
229 if [ "$test" == "" ] 229 if [ "$test" == "" ]
230 then 230 then
231 echo -e "${txtred}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n" 231 echo -e "${txtred}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n"
232 #exit 1; 232 #exit 1;
233 echo -e "\nTOMCAT : \t ${txtred}NOT OK${txtrst}\n" 233 echo -e "\nTOMCAT : \t ${txtred}NOT OK${txtrst}\n"
234 else 234 else
235 echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n" 235 echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n"
236 fi 236 fi
237 # SOLR secondly 237 # SOLR secondly
238 echo -e "\t${txtblu}Install SOLR DB${txtrst}\n" 238 echo -e "\t${txtblu}Install SOLR DB${txtrst}\n"
239 echo -e "You will need 300 Go of free space to install SOLR DB" 239 echo -e "You will need 300 Go of free space to install SOLR DB"
240 read -p "Continue ? (y/n) " solr 240 read -p "Continue ? (y/n) " solr
241 if [ "$solr" == "y" ] 241 if [ "$solr" == "y" ]
242 then 242 then
243 243
244 echo -e "Download SOLR DB\r" 244 echo -e "Download SOLR DB\r"
245 mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null 245 mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null
246 scp -r ${username}@nyx:/local/OTMEDIA/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR 246 scp -r ${username}@nyx:/local/OTMEDIA/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR
247 echo -e "Unzip SOLR DB\r" 247 echo -e "Unzip SOLR DB\r"
248 tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" -C "$OTMEDIA_HOME/tools/SOLR/" 248 tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" -C "$OTMEDIA_HOME/tools/SOLR/"
249 else 249 else
250 echo "Skipping SOLR install" 250 echo "Skipping SOLR install"
251 fi 251 fi
252 read -e -p "Configure SOLR DB server ? (y/n) " solr 252 read -e -p "Configure SOLR DB server ? (y/n) " solr
253 if [ "$solr" == "y" ] 253 if [ "$solr" == "y" ]
254 then 254 then
255 read -p "Enter SOLR server IP :" ip 255 read -p "Enter SOLR server IP :" ip
256 if [ "${ip}" == "" ];then ip="localhost";fi 256 if [ "${ip}" == "" ];then ip="localhost";fi
257 echo "machine = \"${ip}\"" > $OTMEDIA_HOME/tools/scripts/solrinfo.py 257 echo "machine = \"${ip}\"" > $OTMEDIA_HOME/tools/scripts/solrinfo.py
258 read -p "Enter SOLR server port :" port 258 read -p "Enter SOLR server port :" port
259 if [ "${port}" == "" ]; then port="8080";fi 259 if [ "${port}" == "" ]; then port="8080";fi
260 echo -e "\n\tSOLR server IP ${ip}" 260 echo -e "\n\tSOLR server IP ${ip}"
261 echo -e "\tSOLR server port ${port}" 261 echo -e "\tSOLR server port ${port}"
262 echo "port = \"${port}\"" >> $OTMEDIA_HOME/tools/scripts/solrinfo.py 262 echo "port = \"${port}\"" >> $OTMEDIA_HOME/tools/scripts/solrinfo.py
263 else 263 else
264 echo "Skipping SOLR DB Configuration" 264 echo "Skipping SOLR DB Configuration"
265 fi 265 fi
266 echo -e "\nSee SOLR.INSTALL file for more information\n" 266 echo -e "\nSee SOLR.INSTALL file for more information\n"
267 fi 267 fi
268 268
269 ### Set Variables in bashrc ### 269 ### Set Variables in bashrc ###
270 cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" | grep -v "main_tools" > ~/.bashrc.org 270 cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" | grep -v "main_tools" | grep -v "/tools/install/" > ~/.bashrc.org
271 #cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" | grep -v "LIA_TAGG" | grep -v "LIA_PHON" | grep -v "LIA_BIGLEX" > ~/.bashrc.org 271 #cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" | grep -v "LIA_TAGG" | grep -v "LIA_PHON" | grep -v "LIA_BIGLEX" > ~/.bashrc.org
272 cp ~/.bashrc.org ~/.bashrc 272 cp ~/.bashrc.org ~/.bashrc
273 export OTMEDIA_HOME=$PWD 273 export OTMEDIA_HOME=$PWD
274 echo "export OTMEDIA_HOME=$PWD" >> ~/.bashrc 274 echo "export OTMEDIA_HOME=$PWD" >> ~/.bashrc
275 echo "export PATH=\$PATH:$PWD/main_tools" >> ~/.bashrc 275 echo "export PATH=\$PATH:$PWD/main_tools" >> ~/.bashrc
276 echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" >> ~/.bashrc 276 echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" >> ~/.bashrc
277 #echo "export LIA_TAGG_LANG=french" >> ~/.bashrc 277 #echo "export LIA_TAGG_LANG=french" >> ~/.bashrc
278 #echo "export LIA_TAGG=$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" >> ~/.bashrc 278 #echo "export LIA_TAGG=$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" >> ~/.bashrc
279 #echo "export LIA_PHON_REP=$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/" >> ~/.bashrc 279 #echo "export LIA_PHON_REP=$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/" >> ~/.bashrc
280 #echo "export LIA_BIGLEX=$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/" >> ~/.bashrc 280 #echo "export LIA_BIGLEX=$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/" >> ~/.bashrc
281 #echo "export LIA_NE=$OTMEDIA_HOME/tools/lia_ltbox/lia_ne_v2.2" >> ~/.bashrc 281 #echo "export LIA_NE=$OTMEDIA_HOME/tools/lia_ltbox/lia_ne_v2.2" >> ~/.bashrc
282 if [ $SCORING -eq 1 ]
283 then
284 echo "export PATH=\$PATH:$OTMEDIA_HOME/tools/install/bin" >> ~/.bashrc
285 echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib" >> ~/.bashrc
286 fi
282 287
283 # set global configuration file 288 # set global configuration file
284 echo "OTMEDIA_HOME=\"$PWD\"" > $OTMEDIA_HOME/cfg/main_cfg.cfg 289 echo "OTMEDIA_HOME=\"$PWD\"" > $OTMEDIA_HOME/cfg/main_cfg.cfg
285 echo "ARCH=\"$ARCH\"" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 290 echo "ARCH=\"$ARCH\"" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
286 echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 291 echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
287 echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 292 echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
288 echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 293 echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
289 echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 294 echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
290 295
291 echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n" 296 echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n"
292 echo -e "do : source ~/.bashrc" 297 echo -e "do : source ~/.bashrc"
293 echo -e "or set variable :\n" 298 echo -e "or set variable :\n"
294 echo "export OTMEDIA_HOME=$PWD" 299 echo "export OTMEDIA_HOME=$PWD"
295 echo "export PATH=\$PATH:$OTMEDIA_HOME/main_tools" 300 echo "export PATH=\$PATH:$OTMEDIA_HOME/main_tools"
296 echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" 301 echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE"
302 if [ $SCORING -eq 1 ]
303 then
304 echo "export PATH=\$PATH:$OTMEDIA_HOME/tools/install/bin"
305 echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib"
306 fi
307
297 308
298 309
299 echo "${txtwht} \\\\ " 310 echo "${txtwht} \\\\ "
300 echo " ,-~~~-\\\\_" 311 echo " ,-~~~-\\\\_"
301 echo " ( .\ " 312 echo " ( .\ "
302 echo " @\___(__--'${txtrst}" 313 echo " @\___(__--'${txtrst}"
303 314
304 echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}" 315 echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}"
305 316
tools/lia_ltbox/lia_ne_v2.2/.README.txt.swp
No preview for this file type