Commit 06520e7fc1138ada9e514c3c7e7e3922264de519

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

update

Showing 2 changed files with 3 additions and 0 deletions Inline Diff

1 #---------------# 1 #---------------#
2 # OTMEDIA LIA # 2 # OTMEDIA LIA #
3 # INSTALL # 3 # INSTALL #
4 # version : 1.0 # 4 # version : 1.0 #
5 #---------------# 5 #---------------#
6 6
7 OTMEDIA LIA ready to use ? Really ? 7 OTMEDIA LIA ready to use ? Really ?
8 No ! You have to do manualy configuartion for some features. 8 No ! You have to do manualy configuartion for some features.
9 Let see... 9 Let see...
10 10
11 SUMMARY 11 SUMMARY
12 ------- 12 -------
13 13
14 1\ Before installation 14 1\ Before installation
15 2\ install.sh script 15 2\ install.sh script
16 3\ SOLR install 16 3\ SOLR install
17 4\ Install descriptions 17 4\ Install descriptions
18 18
19 19
20 1\ Before installation 20 1\ Before installation
21 ---------------------- 21 ----------------------
22 22
23 - Check and install dependencies. 23 - Check and install dependencies.
24 - In 64 bits architcture be sure you can run 32 bits programs. 24 - In 64 bits architcture be sure you can run 32 bits programs.
25 - Have 300 Go of free space. 25 - Have 300 Go of free space.
26 - Have acces to the network and the nyx server. 26 - Have acces to the network and the nyx server.
27 27
28 2\ install.sh script 28 2\ install.sh script
29 -------------------- 29 --------------------
30 30
31 install.sh script will do most of the work. 31 install.sh script will do most of the work.
32 It will check dependencies and configure pass tools. 32 It will check dependencies and configure pass tools.
33 By default it will do a complet install (300 Go). 33 By default it will do a complet install (300 Go).
34 34
35 You can modifiy behavior by editing install.sh : 35 You can modifiy behavior by editing install.sh :
36 36
37 To disable lexicon adaption using SOLR DB put EXPLOITCONFPASS to 0 (mainly the 290 Go). 37 To disable lexicon adaption using SOLR DB put EXPLOITCONFPASS to 0 (mainly the 290 Go).
38 To disable confidence measure put CONFPASS to 0. 38 To disable confidence measure put CONFPASS to 0.
39 To disable second and third pass put PASS2 to 0. 39 To disable second and third pass put PASS2 to 0.
40 To disable Scoring compilation tools put SCORING to 0.
40 41
41 If your login name differ from your nyx login name, edit install.sh and change the username variable to your nyx login name. 42 If your login name differ from your nyx login name, edit install.sh and change the username variable to your nyx login name.
42 43
43 run install.sh and follow the white rabbit. 44 run install.sh and follow the white rabbit.
44 45
45 3\ SOLR install 46 3\ SOLR install
46 --------------- 47 ---------------
47 48
48 The install.sh script download otmedia-2013-04.tar.gz and untar it in OTMEDIA_HOME/tools/SOLR/ . 49 The install.sh script download otmedia-2013-04.tar.gz and untar it in OTMEDIA_HOME/tools/SOLR/ .
49 See SOLR.INSTALL file to install OTMEDIA SOLR DB. 50 See SOLR.INSTALL file to install OTMEDIA SOLR DB.
50 51
51 4\ Install descriptions 52 4\ Install descriptions
52 ----------------------- 53 -----------------------
53 54
54 OTMEDIA_HOME 55 OTMEDIA_HOME
55 |-> bin/ 56 |-> bin/
56 |-> aff_mat 57 |-> aff_mat
57 |-> aff_mat.64 58 |-> aff_mat.64
58 |-> lia_plp_mt 59 |-> lia_plp_mt
59 |-> lia_plp_mt.64 60 |-> lia_plp_mt.64
60 |-> LIUM_SpkDiarization-4.2.jar 61 |-> LIUM_SpkDiarization-4.2.jar
61 |-> sclite 62 |-> sclite
62 |-> cfg/ # Main scripts configurations files 63 |-> cfg/ # Main scripts configurations files
63 |-> ConfidenceMeasure.cfg 64 |-> ConfidenceMeasure.cfg
64 |-> ConfPass.cfg 65 |-> ConfPass.cfg
65 |-> ExploitConfidencePass.cfg 66 |-> ExploitConfidencePass.cfg
66 |-> FirstPass.cfg 67 |-> FirstPass.cfg
67 |-> main_cfg.cfg 68 |-> main_cfg.cfg
68 |-> RecomposePass.cfg 69 |-> RecomposePass.cfg
69 |-> Scoring.cfg 70 |-> Scoring.cfg
70 |-> Secondass.cfg 71 |-> Secondass.cfg
71 |-> ThirdPass.cfg 72 |-> ThirdPass.cfg
72 |-> data/ # Some data 73 |-> data/ # Some data
73 |-> rules/ 74 |-> rules/
74 |-> asupp 75 |-> asupp
75 |-> basic 76 |-> basic
76 |-> lastprocess.regex 77 |-> lastprocess.regex
77 |-> muRules.tab 78 |-> muRules.tab
78 |-> numeric_rules 79 |-> numeric_rules
79 |-> postprocess.regex 80 |-> postprocess.regex
80 |-> preprocess.regex 81 |-> preprocess.regex
81 |-> random_regex.tab 82 |-> random_regex.tab
82 |-> main_tools/ # Main scripts 83 |-> main_tools/ # Main scripts
83 |-> CheckResults.sh 84 |-> CheckResults.sh
84 |-> ConfidenceMeasure.sh 85 |-> ConfidenceMeasure.sh
85 |-> ConfPass.sh 86 |-> ConfPass.sh
86 |-> ExploitConfidencePass.sh 87 |-> ExploitConfidencePass.sh
87 |-> FirstPass.sh 88 |-> FirstPass.sh
88 |-> OneScriptToRuleThemAll.sh 89 |-> OneScriptToRuleThemAll.sh
89 |-> RecomposePass.sh 90 |-> RecomposePass.sh
90 |-> ScoringRes.sh 91 |-> ScoringRes.sh
91 |-> SecondPass.sh 92 |-> SecondPass.sh
92 |-> ThirdPass.sh 93 |-> ThirdPass.sh
93 |-> tools/ # Tools 94 |-> tools/ # Tools
95 |-> CRF++-0.58.tar.gz
94 |-> lia_ltbox/ 96 |-> lia_ltbox/
95 |-> PACKAGE_MESURES_V1.0/ 97 |-> PACKAGE_MESURES_V1.0/
96 |-> QUOTE_FINDER/ 98 |-> QUOTE_FINDER/
97 |-> scripts/ # Secondary scripts (but useful) 99 |-> scripts/ # Secondary scripts (but useful)
98 |-> ApplyCorrectionRules.pl 100 |-> ApplyCorrectionRules.pl
99 |-> BdlexUC.pl 101 |-> BdlexUC.pl
100 |-> CheckConfPass.sh 102 |-> CheckConfPass.sh
101 |-> CheckExploitConfPass.sh 103 |-> CheckExploitConfPass.sh
102 |-> CheckFirstPass.sh 104 |-> CheckFirstPass.sh
103 |-> CheckSecondPass.sh 105 |-> CheckSecondPass.sh
104 |-> CheckThirdPass.sh 106 |-> CheckThirdPass.sh
105 |-> CleanFilter.sh 107 |-> CleanFilter.sh
106 |-> CoverageReportMaker.pl 108 |-> CoverageReportMaker.pl
107 |-> ctm2show.pl 109 |-> ctm2show.pl
108 |-> Date2txt.pl 110 |-> Date2txt.pl
109 |-> daybefore2after.sh 111 |-> daybefore2after.sh
110 |-> ExtractAudioFromTV.sh 112 |-> ExtractAudioFromTV.sh
111 |-> FindNormRules.pl 113 |-> FindNormRules.pl
112 |-> formatRES.pl 114 |-> formatRES.pl
113 |-> GenerateSOLRQueries.pl 115 |-> GenerateSOLRQueries.pl
114 |-> intersec.pl 116 |-> intersec.pl
115 |-> KeepConfZone.pl 117 |-> KeepConfZone.pl
116 |-> LexPhonFilter.pl 118 |-> LexPhonFilter.pl
117 |-> MergeLexicon.pl 119 |-> MergeLexicon.pl
118 |-> NbMaxWordsFilter.pl 120 |-> NbMaxWordsFilter.pl
119 |-> Number2txt.pl 121 |-> Number2txt.pl
120 |-> perlmod/ 122 |-> perlmod/
121 |-> Utils.pm 123 |-> Utils.pm
122 |-> PhonFormatter.pl 124 |-> PhonFormatter.pl
123 |-> ProcessSOLRQueries.py 125 |-> ProcessSOLRQueries.py
124 |-> RandomRegex.pl 126 |-> RandomRegex.pl
125 |-> RemoveLineContaining.pl 127 |-> RemoveLineContaining.pl
126 |-> res2out.pl 128 |-> res2out.pl
127 |-> ScoreCtm2trigg.pl 129 |-> ScoreCtm2trigg.pl
128 |-> scoredCtmAndTaggedLem2All.pl 130 |-> scoredCtmAndTaggedLem2All.pl
129 |-> Sentencer.pl 131 |-> Sentencer.pl
130 |-> srt2stm.pl 132 |-> srt2stm.pl
131 |-> Tools.sh 133 |-> Tools.sh
132 |-> UrlConverter.pl 134 |-> UrlConverter.pl
133 |-> SIGMUND/ 135 |-> SIGMUND/
134 |-> SOLR/ 136 |-> SOLR/
135 |-> Speeral/ 137 |-> Speeral/
136 |-> COPYING 138 |-> COPYING
137 |-> CorpusOTMedia.txt 139 |-> CorpusOTMedia.txt
138 |-> HOWTO 140 |-> HOWTO
139 |-> INSTALL 141 |-> INSTALL
140 |-> README 142 |-> README
141 |-> SOLR.INSTALL 143 |-> SOLR.INSTALL
142 |-> TODO 144 |-> TODO
143 145
144 146
145 147
146 148
147 149
148 150
149 151
150 152
151 153
152 154
153 155
154 156
155 157
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" > ~/.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 282
282 # set global configuration file 283 # set global configuration file
283 echo "OTMEDIA_HOME=\"$PWD\"" > $OTMEDIA_HOME/cfg/main_cfg.cfg 284 echo "OTMEDIA_HOME=\"$PWD\"" > $OTMEDIA_HOME/cfg/main_cfg.cfg
284 echo "ARCH=\"$ARCH\"" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 285 echo "ARCH=\"$ARCH\"" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
285 echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 286 echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
286 echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 287 echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
287 echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 288 echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
288 echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg 289 echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg
289 290
290 echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n" 291 echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n"
291 echo -e "do : source ~/.bashrc" 292 echo -e "do : source ~/.bashrc"
292 echo -e "or set variable :\n" 293 echo -e "or set variable :\n"
293 echo "export OTMEDIA_HOME=$PWD" 294 echo "export OTMEDIA_HOME=$PWD"
294 echo "export PATH=\$PATH:$OTMEDIA_HOME/main_tools" 295 echo "export PATH=\$PATH:$OTMEDIA_HOME/main_tools"
295 echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" 296 echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE"
296 297
297 298
298 echo "${txtwht} \\\\ " 299 echo "${txtwht} \\\\ "
299 echo " ,-~~~-\\\\_" 300 echo " ,-~~~-\\\\_"
300 echo " ( .\ " 301 echo " ( .\ "
301 echo " @\___(__--'${txtrst}" 302 echo " @\___(__--'${txtrst}"
302 303
303 echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}" 304 echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}"
304 305