Commit 17d865629cb2ccc491cad537f04937f8c3580056
1 parent
2ce72581f1
Exists in
master
update doc
Showing 3 changed files with 60 additions and 2 deletions Inline Diff
File was created | 1 | ################# | |
2 | # OTMEDIALIA # | ||
3 | # FAQ # | ||
4 | ################# | ||
5 | |||
6 | 1/ I've got "directory is locked" | ||
7 | --------------------------------- | ||
8 | That happens when a process is working on the show | ||
9 | or when a pass has not ending correctly. | ||
10 | To force the lock use option "-r" | ||
11 | |||
12 | |||
13 | |||
14 |
1 | #---------------# | 1 | #---------------# |
2 | # OTMEDIA LIA # | 2 | # OTMEDIA LIA # |
3 | # HOWTO # | 3 | # HOWTO # |
4 | # version 1.0 # | 4 | # version 1.0 # |
5 | #---------------# | 5 | #---------------# |
6 | 6 | ||
7 | 1\ Main scripts options | 7 | 1\ Main scripts options |
8 | 2\ Main scripts | ||
9 | 2.1\ FirstPass.sh | ||
10 | 2.2\ SecondPass.sh | ||
11 | 2.3\ ConfPass.sh | ||
12 | 2.4\ ExploitConfidencePass.sh | ||
13 | 2.5\ ThirdPass.sh | ||
14 | 2.6\ RecomposePass.sh | ||
15 | 2.7\ ScoringRes.sh | ||
16 | 2.8\ CheckResults.sh | ||
17 | 3\ OneScriptToRuleThemAll.sh | ||
18 | 4\ Modify configuration | ||
19 | 4.1\ Scripts configurations | ||
20 | 4.2\ Speeral configurations | ||
21 | 5\ Modify binaries | ||
22 | 6\ Exemples | ||
23 | |||
24 | |||
25 | 1\ Main scripts options | ||
8 | ----------------------- | 26 | ----------------------- |
9 | 27 | ||
10 | There are five main options for otmedia scripts. | 28 | There are five main options for otmedia scripts. |
11 | -h : for help | 29 | -h : for help |
12 | -D : Debug mode | 30 | -D : Debug mode |
13 | -v n : Verbose mode 1 low to 3 high | 31 | -v n : Verbose mode 1 low to 3 high |
14 | -c : Check results | 32 | -c : Check results |
15 | -r : force to rerun a script, without deleting work already done | 33 | -r : force to rerun a script, without deleting work already done |
16 | 34 | ||
17 | 2\ Main scripts | 35 | 2\ Main scripts |
18 | --------------- | 36 | --------------- |
37 | |||
38 | Each script got a configuration file in OTMEDIA_HOME/cfg/<scriptname>.cfg . | ||
39 | The main options can be modify individually through the arguments or in the configuration file. | ||
40 | |||
19 | 2.1\ FirstPass.sh | 41 | 2.1\ FirstPass.sh |
20 | ----------------- | 42 | ----------------- |
21 | 43 | ||
22 | FirstPass.sh do speaker diarization and transcription of an audio file. Convert it into wav format if not already done (16000Hz, 16 bits, mono). | 44 | FirstPass.sh do speaker diarization and transcription of an audio file. Convert it into wav format if not already done (16000Hz, 16 bits, mono). |
23 | If a .SRT file is present in the same directory of the audio file it will copy it. | 45 | If a .SRT file is present in the same directory of the audio file it will copy it. |
24 | 46 | ||
25 | $> FisrtPass.sh [options] 110624FR2_20002100.wav result_directory | 47 | $> FisrtPass.sh [options] 110624FR2_20002100.wav result_directory |
26 | 48 | ||
27 | Options: | 49 | Options: |
28 | -f n : number of forks for speeral | 50 | -f n : number of forks for speeral |
29 | 51 | ||
30 | Output : result_directory/110624FR2_20002100/res_p1/ | 52 | Output : result_directory/110624FR2_20002100/res_p1/ |
31 | and .ctm, .trs and .txt files. | 53 | and .ctm, .trs and .txt files. |
32 | 54 | ||
33 | 2.2\ SecondPass.sh | 55 | 2.2\ SecondPass.sh |
34 | ------------------ | 56 | ------------------ |
35 | 57 | ||
36 | SecondPass.sh do speaker adaptation and transcriptions base on the first pass. | 58 | SecondPass.sh do speaker adaptation and transcriptions base on the first pass. |
37 | 59 | ||
38 | $> SecondPass.sh [options] result_directory/110624FR2_20002100/ | 60 | $> SecondPass.sh [options] result_directory/110624FR2_20002100/ |
39 | 61 | ||
40 | Options: | 62 | Options: |
41 | -f n : number of forks for speeral | 63 | -f n : number of forks for speeral |
42 | 64 | ||
43 | Output : result_directory/110624FR2_20002100/res_p2/ | 65 | Output : result_directory/110624FR2_20002100/res_p2/ |
44 | and .ctm, .trs and .txt files. | 66 | and .ctm, .trs and .txt files. |
45 | 67 | ||
46 | 2.3\ ConfPass.sh | 68 | 2.3\ ConfPass.sh |
47 | ---------------- | 69 | ---------------- |
48 | 70 | ||
49 | ConfPass.sh do confidence measure using the second or third pass. | 71 | ConfPass.sh do confidence measure using the second or third pass. |
50 | 72 | ||
51 | $> Confpass.sh [options] result_directory/110624FR2_20002100/ <res_p2|res_p3> | 73 | $> Confpass.sh [options] result_directory/110624FR2_20002100/ <res_p2|res_p3> |
52 | 74 | ||
53 | Output : result_directory/110624FR2_20002100/conf/res_p2/scored_ctm/ | 75 | Output : result_directory/110624FR2_20002100/conf/res_p2/scored_ctm/ |
54 | and result_directory/110624FR2_20002100.usf file | 76 | and result_directory/110624FR2_20002100.usf file |
55 | 77 | ||
56 | 2.4\ ExploitConfidencePass.sh | 78 | 2.4\ ExploitConfidencePass.sh |
57 | ----------------------------- | 79 | ----------------------------- |
58 | 80 | ||
59 | It exploits confidence pass measure to : | 81 | It exploits confidence pass measure to : |
60 | - boost confidente zone | 82 | - boost confidente zone |
61 | - find alternative in non confidente zone (using SOLR DB) | 83 | - find alternative in non confidente zone (using SOLR DB) |
62 | - extend the lexicon | 84 | - extend the lexicon |
63 | 85 | ||
64 | $> ExploitConfidencePass.sh [options] result_directory/110624FR2_20002100 | 86 | $> ExploitConfidencePass.sh [options] result_directory/110624FR2_20002100 |
65 | 87 | ||
66 | Output : result_directory/110624FR2_20002100/trigg/speeral | 88 | Output : result_directory/110624FR2_20002100/trigg/speeral |
67 | result_directory/110624FR2_20002100/LEX/speeral/_ext | 89 | result_directory/110624FR2_20002100/LEX/speeral/_ext |
68 | 90 | ||
69 | 2.5\ ThirstPass.sh | 91 | 2.5\ ThirdPass.sh |
70 | ------------------ | 92 | ------------------ |
71 | 93 | ||
72 | ThirdPass.sh do transcriptions using SecondPass speaker adaptation and ExploitConfidencePass trigg files and new lexicon. | 94 | ThirdPass.sh do transcriptions using SecondPass speaker adaptation and ExploitConfidencePass trigg files and new lexicon. |
73 | 95 | ||
74 | $> ThirdPass.sh [options] result_directory/110624FR2_20002100/ | 96 | $> ThirdPass.sh [options] result_directory/110624FR2_20002100/ |
75 | 97 | ||
76 | Options : | 98 | Options : |
77 | -f n : number of forks for speeral | 99 | -f n : number of forks for speeral |
78 | 100 | ||
79 | Output : result_directory/110624FR2_20002100/conf/res_p3 | 101 | Output : result_directory/110624FR2_20002100/conf/res_p3 |
80 | and .ctm, .trs and .txt files. | 102 | and .ctm, .trs and .txt files. |
81 | 103 | ||
82 | 2.6\ RecomposePass.sh | 104 | 2.6\ RecomposePass.sh |
83 | -------------------- | 105 | -------------------- |
84 | 106 | ||
85 | RecomposePass.sh copy results that missing in ThirsPass from the Second and First Pass. | 107 | RecomposePass.sh copy results that missing in ThirsPass from the Second and First Pass. |
86 | 108 | ||
87 | $> RecomposePass.sh [options] result_directory/110624FR2_20002100/ | 109 | $> RecomposePass.sh [options] result_directory/110624FR2_20002100/ |
88 | 110 | ||
89 | Output : result_directory/110624FR2_20002100/res_all | 111 | Output : result_directory/110624FR2_20002100/res_all |
90 | and .ctm, .trs and .txt files. | 112 | and .ctm, .trs and .txt files. |
91 | 113 | ||
92 | 2.7\ ScoringRes.sh | 114 | 2.7\ ScoringRes.sh |
93 | ------------------ | 115 | ------------------ |
94 | 116 | ||
95 | ScoringRes.sh run differents scoring tools to score the results using SRT file if exists. | 117 | ScoringRes.sh run differents scoring tools to score the results using SRT file if exists. |
96 | 118 | ||
97 | $> ScoringRes.sh [options] result_directory/110624FR2_20002100/ | 119 | $> ScoringRes.sh [options] result_directory/110624FR2_20002100/ |
98 | 120 | ||
99 | Output : result_directory/110624FR2_20002100/scoring | 121 | Output : result_directory/110624FR2_20002100/scoring |
100 | 122 | ||
101 | 2.8\ CheckResults.sh | 123 | 2.8\ CheckResults.sh |
102 | -------------------- | 124 | -------------------- |
103 | 125 | ||
104 | CheckResults.sh parse results directories to synthesize works already done. | 126 | CheckResults.sh parse results directories to synthesize works already done. |
105 | 127 | ||
106 | $> CheckResults.sh [options] result_directory | 128 | $> CheckResults.sh [options] result_directory |
107 | 129 | ||
108 | Output : "Directory name #plp #res_p1 #treil_p2 #treil_p3 usf_p2 usf_p3" | 130 | Output : "Directory name #plp #res_p1 #treil_p2 #treil_p3 usf_p2 usf_p3" |
109 | #plp number of plp files | 131 | #plp number of plp files |
110 | #res_p1 number of .res files at first pass | 132 | #res_p1 number of .res files at first pass |
111 | #treil_p2 number of .treil files at second pass | 133 | #treil_p2 number of .treil files at second pass |
112 | #treil_p3 number of .treil files at third pass | 134 | #treil_p3 number of .treil files at third pass |
113 | usf_p2 usf file from confidence pass result on second pass (OK|ERR|NAN) | 135 | usf_p2 usf file from confidence pass result on second pass (OK|ERR|NAN) |
114 | usf_p3 usf file from confidence pass result on third pass (OK|ERR|NAN) | 136 | usf_p3 usf file from confidence pass result on third pass (OK|ERR|NAN) |
115 | 137 | ||
116 | 3\ OneScriptToRuleThemAll.sh | 138 | 3\ OneScriptToRuleThemAll.sh |
117 | ---------------------------- | 139 | ---------------------------- |
118 | 140 | ||
119 | The script to do all OTMEDIA LIA pass in one call. | 141 | The script to do all OTMEDIA LIA pass in one call. |
120 | 142 | ||
121 | $> OneScriptToRuleThemAll.sh [options] 110624FR2_20002100.wav result_directory | 143 | $> OneScriptToRuleThemAll.sh [options] 110624FR2_20002100.wav result_directory |
122 | 144 | ||
123 | Options : (default options are availables) | 145 | Options : (default options are availables) |
124 | -a Do every pass | 146 | -a Do every pass |
125 | -1 Do First pass | 147 | -1 Do First pass |
126 | -2 Do Second pass | 148 | -2 Do Second pass |
127 | -3 Do Third pass | 149 | -3 Do Third pass |
128 | -C Do Confidence pass | 150 | -C Do Confidence pass |
129 | -e Do Exploit Confidence pass | 151 | -e Do Exploit Confidence pass |
130 | -R Do Recompose pass | 152 | -R Do Recompose pass |
131 | -s Do Scoring pass | 153 | -s Do Scoring pass |
132 | 154 | ||
133 | 4\ Modify configuration | 155 | 4\ Modify configuration |
134 | ----------------------- | 156 | ----------------------- |
135 | 157 | ||
136 | Most of the main scripts got a configuration file (cfg/ directory). | 158 | Most of the main scripts got a configuration file (cfg/ directory). |
137 | You can change script behaviour and data used. | 159 | You can change script behaviour and data used. |
138 | Speeral configuration file can be also change (tools/Speeral/CFG/ directory) | 160 | Speeral configuration file can be also change (tools/Speeral/CFG/ directory) |
139 | 161 | ||
140 | 4.1\ Scripts configurations | 162 | 4.1\ Scripts configurations |
163 | --------------------------- | ||
141 | 164 | ||
142 | In scripts configuration files (OTMEDIA_HOME/cfg/) you can change default options as architecture, verbose ... | 165 | In scripts configuration files (OTMEDIA_HOME/cfg/) you can change default options as architecture, verbose ... |
143 | Scripts using Speeral got information on binaries, models path and name, and the configuration file for speeral. | 166 | Scripts using Speeral got information on binaries, models path and name, and the configuration file for speeral. |
144 | 167 | ||
145 | 4.2\ Speeral configurations | 168 | 4.2\ Speeral configurations |
169 | --------------------------- | ||
146 | 170 | ||
147 | Speeral configuration files are in OTMEDIA_HOME/tools/Speeral/CFG directory. | 171 | Speeral configuration files are in OTMEDIA_HOME/tools/Speeral/CFG directory. |
148 | The .tmp files are use to generate .xml file from install.sh. | 172 | The .tmp files are use to generate .xml file from install.sh. |
149 | You can modify .xml files for your needs, but most of data informations are pass through arguments at speeral call in scripts. | 173 | You can modify .xml files for your needs, but most of data informations are pass through arguments at speeral call in scripts. |
150 | 174 | ||
151 | 5\ Modify binaries | 175 | 5\ Modify binaries |
152 | ------------------ | 176 | ------------------ |
153 | 177 | ||
154 | Binaries can be find in bin and tools directory. | 178 | Binaries can be find in bin and tools directory. |
155 | Some binaries are compiled in 32 and 64 bits. By default all binaries are compiled in 32 bits. | 179 | Some binaries are compiled in 32 and 64 bits. By default all binaries are compiled in 32 bits. |
156 | You can update binaries as you need. | 180 | You can update binaries as you need. |
157 | 181 | ||
158 | To modify tools binaries, you need to download a compatible version. | 182 | To modify tools binaries, you need to download a compatible version. |
159 | lia_ltbox can be found in /labo/Tools/ | 183 | lia_ltbox can be found in /labo/Tools/ |
160 | Speeral (binaries) can be compiled from the git remote git@gitlia.univ-avignon.fr:vaudriguard/libspeeral.git . Do not modify Speeral data from OTMEDIA (unless you know what you do). | 184 | Speeral (binaries) can be compiled from the git remote git@gitlia.univ-avignon.fr:vaudriguard/libspeeral.git . Do not modify Speeral data from OTMEDIA (unless you know what you do). |
161 | In PACKAGES_MESURES_V1.0 you can update icsiboost binary (in bin) from the projet page : https://code.google.com/p/icsiboost/ | 185 | In PACKAGES_MESURES_V1.0 you can update icsiboost binary (in bin) from the projet page : https://code.google.com/p/icsiboost/ |
162 | For QUOTE_FINDER and SIGMUND please contact support. | 186 | For QUOTE_FINDER and SIGMUND please contact support. |
187 | |||
188 | 6\ Exemples | ||
189 | ----------- | ||
190 | |||
191 | Conventional use : | ||
192 | $> FirstPass.sh 110624FR2_20002100.wav /my/output/directory/ && SecondPass.sh /my/output/directory/110624FR2_20002100 && ConfPass.sh /my/output/directory/110624FR2_20002100 res_p2 && ExploitConfPass.sh /my/output/directory/110624FR2_20002100 && ConfPass.sh /my/output/directory/110624FR2_20002100 res_p3 && ThirdPass.sh /my/output/directory/110624FR2_20002100 && RecomposePass.sh /my/output/directory/110624FR2_20002100 && ScoringRes.sh /my/output/directory/110624FR2_20002100 | ||
193 | or | ||
194 | $> OneScriptToRuleThemAll.sh -a 110624FR2_20002100.wav /my/output/directory/ | ||
195 | |||
196 | Rerun SecondPass and ConfPass with verbose and speeral fork to 4 : | ||
197 | $> SecondPass.sh -r -f 4 -v 3 /my/output/directory/110624FR2_20002100 && ConfPass.sh -r -v 3 /my/output/directory/110624FR2_20002100 res_p2 | ||
198 | or | ||
199 | $> OneScriptToRuleThemAll.sh -r -2 -C 2 -v 3 -f 4 110624FR2_20002100.wav /my/output/directory/ | ||
200 | |||
201 | |||
163 | 202 | ||
164 | Good Luck ! Luke ! | 203 | Good Luck ! Luke ! |
165 | And the force be with you ! | 204 | And the force be with you ! |
166 | 205 |
install.sh
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 clean > /dev/null | ||
198 | make clean_ressource > /deV/null | ||
197 | make all > /dev/null | 199 | make all > /dev/null |
198 | make ressource > /dev/null | 200 | make ressource > /dev/null |
199 | ### config lia_tagg | 201 | ### config lia_tagg |
200 | cd $LIA_TAGG | 202 | cd $LIA_TAGG |
203 | make clean > /dev/null | ||
204 | make clean_ressource > /dev/null | ||
201 | make all > /dev/null | 205 | make all > /dev/null |
202 | make ressource.french > /dev/null | 206 | make ressource.french > /dev/null |
203 | ### config lia_biglex | 207 | ### config lia_biglex |
204 | cd $LIA_BIGLEX | 208 | cd $LIA_BIGLEX |
209 | make -f makefile.biglex clean > /dev/null | ||
205 | make -f makefile.biglex > /dev/null | 210 | make -f makefile.biglex > /dev/null |
206 | cd $OTMEDIA_HOME | 211 | cd $OTMEDIA_HOME |
207 | 212 | ||
208 | if [ $SCORING -eq 1 ] | 213 | if [ $SCORING -eq 1 ] |
209 | then | 214 | then |
210 | echo -e "\t${txtblu}Install CRF++${txtrst}\n" | 215 | echo -e "\t${txtblu}Install CRF++${txtrst}\n" |
211 | tar -xvzf "$OTMEDIA_HOME/tools/CRF++-0.58.tar.gz" -C "$OTMEDIA_HOME/tools/" | 216 | tar -xvzf "$OTMEDIA_HOME/tools/CRF++-0.58.tar.gz" -C "$OTMEDIA_HOME/tools/" |
212 | cd $OTMEDIA_HOME/tools/CRF++-0.58 | 217 | cd $OTMEDIA_HOME/tools/CRF++-0.58 |
213 | ./configure --prefix="$OTMEDIA_HOME/tools/install" | 218 | ./configure --prefix="$OTMEDIA_HOME/tools/install" |
214 | make | 219 | make |
215 | make install | 220 | make install |
216 | echo -e "\t${txtblu}Install lia_ne${txtrst}\n" | 221 | echo -e "\t${txtblu}Install lia_ne${txtrst}\n" |
217 | export PATH=$PATH:$OTMEDIA_HOME/tools/install/bin | 222 | export PATH=$PATH:$OTMEDIA_HOME/tools/install/bin |
218 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib | 223 | 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 | 224 | export LIA_NE=$OTMEDIA_HOME/tools/lia_ltbox/lia_ne_v2.2 |
220 | cd $LIA_NE | 225 | cd $LIA_NE |
221 | mkdir $LIA_NE/bin 2> /dev/null | 226 | mkdir $LIA_NE/bin 2> /dev/null |
222 | make all | 227 | make clean > /dev/null |
228 | make all > /dev/null | ||
223 | cd $OTMEDIA_HOME | 229 | cd $OTMEDIA_HOME |
224 | fi | 230 | fi |
225 | 231 | ||
226 | ### SOLR DB ### | 232 | ### SOLR DB ### |
227 | # Tomcat fisrtly | 233 | # Tomcat fisrtly |
228 | test=$(dpkg -l | grep "^ii" | grep tomcat) | 234 | test=$(dpkg -l | grep "^ii" | grep tomcat) |
229 | if [ "$test" == "" ] | 235 | if [ "$test" == "" ] |
230 | then | 236 | then |
231 | echo -e "${txtred}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n" | 237 | echo -e "${txtred}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n" |
232 | #exit 1; | 238 | #exit 1; |
233 | echo -e "\nTOMCAT : \t ${txtred}NOT OK${txtrst}\n" | 239 | echo -e "\nTOMCAT : \t ${txtred}NOT OK${txtrst}\n" |
234 | else | 240 | else |
235 | echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n" | 241 | echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n" |
236 | fi | 242 | fi |
237 | # SOLR secondly | 243 | # SOLR secondly |
238 | echo -e "\t${txtblu}Install SOLR DB${txtrst}\n" | 244 | echo -e "\t${txtblu}Install SOLR DB${txtrst}\n" |
239 | echo -e "You will need 300 Go of free space to install SOLR DB" | 245 | echo -e "You will need 300 Go of free space to install SOLR DB" |
240 | read -p "Continue ? (y/n) " solr | 246 | read -p "Continue ? (y/n) " solr |
241 | if [ "$solr" == "y" ] | 247 | if [ "$solr" == "y" ] |
242 | then | 248 | then |
243 | 249 | ||
244 | echo -e "Download SOLR DB\r" | 250 | echo -e "Download SOLR DB\r" |
245 | mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null | 251 | 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 | 252 | 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" | 253 | echo -e "Unzip SOLR DB\r" |
248 | tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" -C "$OTMEDIA_HOME/tools/SOLR/" | 254 | tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" -C "$OTMEDIA_HOME/tools/SOLR/" |
249 | else | 255 | else |
250 | echo "Skipping SOLR install" | 256 | echo "Skipping SOLR install" |
251 | fi | 257 | fi |
252 | read -e -p "Configure SOLR DB server ? (y/n) " solr | 258 | read -e -p "Configure SOLR DB server ? (y/n) " solr |
253 | if [ "$solr" == "y" ] | 259 | if [ "$solr" == "y" ] |
254 | then | 260 | then |
255 | read -p "Enter SOLR server IP :" ip | 261 | read -p "Enter SOLR server IP :" ip |
256 | if [ "${ip}" == "" ];then ip="localhost";fi | 262 | if [ "${ip}" == "" ];then ip="localhost";fi |
257 | echo "machine = \"${ip}\"" > $OTMEDIA_HOME/tools/scripts/solrinfo.py | 263 | echo "machine = \"${ip}\"" > $OTMEDIA_HOME/tools/scripts/solrinfo.py |
258 | read -p "Enter SOLR server port :" port | 264 | read -p "Enter SOLR server port :" port |
259 | if [ "${port}" == "" ]; then port="8080";fi | 265 | if [ "${port}" == "" ]; then port="8080";fi |
260 | echo -e "\n\tSOLR server IP ${ip}" | 266 | echo -e "\n\tSOLR server IP ${ip}" |
261 | echo -e "\tSOLR server port ${port}" | 267 | echo -e "\tSOLR server port ${port}" |
262 | echo "port = \"${port}\"" >> $OTMEDIA_HOME/tools/scripts/solrinfo.py | 268 | echo "port = \"${port}\"" >> $OTMEDIA_HOME/tools/scripts/solrinfo.py |
263 | else | 269 | else |
264 | echo "Skipping SOLR DB Configuration" | 270 | echo "Skipping SOLR DB Configuration" |
265 | fi | 271 | fi |
266 | echo -e "\nSee SOLR.INSTALL file for more information\n" | 272 | echo -e "\nSee SOLR.INSTALL file for more information\n" |
267 | fi | 273 | fi |
268 | 274 | ||
269 | ### Set Variables in bashrc ### | 275 | ### Set Variables in bashrc ### |
270 | cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" | grep -v "main_tools" | grep -v "/tools/install/" > ~/.bashrc.org | 276 | 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 | 277 | #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 | 278 | cp ~/.bashrc.org ~/.bashrc |
273 | export OTMEDIA_HOME=$PWD | 279 | export OTMEDIA_HOME=$PWD |
274 | echo "export OTMEDIA_HOME=$PWD" >> ~/.bashrc | 280 | echo "export OTMEDIA_HOME=$PWD" >> ~/.bashrc |
275 | echo "export PATH=\$PATH:$PWD/main_tools" >> ~/.bashrc | 281 | echo "export PATH=\$PATH:$PWD/main_tools" >> ~/.bashrc |
276 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" >> ~/.bashrc | 282 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" >> ~/.bashrc |
277 | #echo "export LIA_TAGG_LANG=french" >> ~/.bashrc | 283 | #echo "export LIA_TAGG_LANG=french" >> ~/.bashrc |
278 | #echo "export LIA_TAGG=$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" >> ~/.bashrc | 284 | #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 | 285 | #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 | 286 | #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 | 287 | #echo "export LIA_NE=$OTMEDIA_HOME/tools/lia_ltbox/lia_ne_v2.2" >> ~/.bashrc |
282 | if [ $SCORING -eq 1 ] | 288 | if [ $SCORING -eq 1 ] |
283 | then | 289 | then |
284 | echo "export PATH=\$PATH:$OTMEDIA_HOME/tools/install/bin" >> ~/.bashrc | 290 | 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 | 291 | echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib" >> ~/.bashrc |
286 | fi | 292 | fi |
287 | 293 | ||
288 | # set global configuration file | 294 | # set global configuration file |
289 | echo "OTMEDIA_HOME=\"$PWD\"" > $OTMEDIA_HOME/cfg/main_cfg.cfg | 295 | echo "OTMEDIA_HOME=\"$PWD\"" > $OTMEDIA_HOME/cfg/main_cfg.cfg |
290 | echo "ARCH=\"$ARCH\"" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 296 | echo "ARCH=\"$ARCH\"" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
291 | echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 297 | echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
292 | echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 298 | echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
293 | echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 299 | echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
294 | echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 300 | echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
295 | 301 | ||
296 | echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n" | 302 | echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n" |
297 | echo -e "do : source ~/.bashrc" | 303 | echo -e "do : source ~/.bashrc" |
298 | echo -e "or set variable :\n" | 304 | echo -e "or set variable :\n" |
299 | echo "export OTMEDIA_HOME=$PWD" | 305 | echo "export OTMEDIA_HOME=$PWD" |
300 | echo "export PATH=\$PATH:$OTMEDIA_HOME/main_tools" | 306 | echo "export PATH=\$PATH:$OTMEDIA_HOME/main_tools" |
301 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" | 307 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" |
302 | if [ $SCORING -eq 1 ] | 308 | if [ $SCORING -eq 1 ] |
303 | then | 309 | then |
304 | echo "export PATH=\$PATH:$OTMEDIA_HOME/tools/install/bin" | 310 | echo "export PATH=\$PATH:$OTMEDIA_HOME/tools/install/bin" |
305 | echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib" | 311 | echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$OTMEDIA_HOME/tools/install/lib" |
306 | fi | 312 | fi |
307 | 313 | ||
308 | 314 | ||
309 | 315 | ||
310 | echo "${txtwht} \\\\ " | 316 | echo "${txtwht} \\\\ " |
311 | echo " ,-~~~-\\\\_" | 317 | echo " ,-~~~-\\\\_" |
312 | echo " ( .\ " | 318 | echo " ( .\ " |
313 | echo " @\___(__--'${txtrst}" | 319 | echo " @\___(__--'${txtrst}" |
314 | 320 | ||
315 | echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}" | 321 | echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}" |
316 | 322 |