suricodes commited on
Commit
e8bc68a
·
verified ·
1 Parent(s): 687064a

Upload 75 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +7 -0
  2. mosesdecoder/mingw/Makefile +264 -0
  3. mosesdecoder/mingw/MosesGUI/Ui_addMTModel.py +130 -0
  4. mosesdecoder/mingw/MosesGUI/Ui_chooseMTModel.py +71 -0
  5. mosesdecoder/mingw/MosesGUI/Ui_credits.py +62 -0
  6. mosesdecoder/mingw/MosesGUI/Ui_mainWindow.py +191 -0
  7. mosesdecoder/mingw/MosesGUI/__init__.py +0 -0
  8. mosesdecoder/mingw/MosesGUI/addMTModel.py +118 -0
  9. mosesdecoder/mingw/MosesGUI/addMTModel.ui +170 -0
  10. mosesdecoder/mingw/MosesGUI/chooseMTModel.py +84 -0
  11. mosesdecoder/mingw/MosesGUI/chooseMTModel.ui +104 -0
  12. mosesdecoder/mingw/MosesGUI/credits.py +29 -0
  13. mosesdecoder/mingw/MosesGUI/credits.ui +76 -0
  14. mosesdecoder/mingw/MosesGUI/datamodel.py +424 -0
  15. mosesdecoder/mingw/MosesGUI/engine.py +116 -0
  16. mosesdecoder/mingw/MosesGUI/icon/moses.gif +0 -0
  17. mosesdecoder/mingw/MosesGUI/icon/moses.ico +0 -0
  18. mosesdecoder/mingw/MosesGUI/icons.qrc +5 -0
  19. mosesdecoder/mingw/MosesGUI/icons_rc.py +1021 -0
  20. mosesdecoder/mingw/MosesGUI/main.py +24 -0
  21. mosesdecoder/mingw/MosesGUI/mainWindow.py +269 -0
  22. mosesdecoder/mingw/MosesGUI/mainWindow.ui +284 -0
  23. mosesdecoder/mingw/MosesGUI/moses.py +91 -0
  24. mosesdecoder/mingw/MosesGUI/util.py +31 -0
  25. mosesdecoder/misc/1-1-Extraction.cpp +240 -0
  26. mosesdecoder/misc/GenerateSequences.cpp +514 -0
  27. mosesdecoder/misc/GenerateTuples.cpp +314 -0
  28. mosesdecoder/misc/GenerateTuples.h +12 -0
  29. mosesdecoder/misc/Jamfile +43 -0
  30. mosesdecoder/misc/QueryProbingPT.cpp +62 -0
  31. mosesdecoder/misc/TransliterationMining.cpp +605 -0
  32. mosesdecoder/misc/addLexROtoPT.cpp +168 -0
  33. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/1-1-Extraction +0 -0
  34. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/1-1-Extraction.o +0 -0
  35. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/GenerateSequences.o +0 -0
  36. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/TMining +0 -0
  37. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/TransliterationMining.o +0 -0
  38. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/addLexROtoPT +0 -0
  39. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/addLexROtoPT.o +0 -0
  40. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/generateSequences +0 -0
  41. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/merge-sorted +3 -0
  42. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/merge-sorted.o +0 -0
  43. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTable +3 -0
  44. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTable.o +0 -0
  45. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTableMin +3 -0
  46. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTableMin.o +0 -0
  47. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processPhraseTableMin +3 -0
  48. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processPhraseTableMin.o +0 -0
  49. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/pruneGeneration +0 -0
  50. mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/pruneGeneration.o +0 -0
.gitattributes CHANGED
@@ -88,3 +88,10 @@ mosesdecoder/mert/hgdecode filter=lfs diff=lfs merge=lfs -text
88
  mosesdecoder/mert/kbmira filter=lfs diff=lfs merge=lfs -text
89
  mosesdecoder/mert/mert filter=lfs diff=lfs merge=lfs -text
90
  mosesdecoder/mert/pro filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
88
  mosesdecoder/mert/kbmira filter=lfs diff=lfs merge=lfs -text
89
  mosesdecoder/mert/mert filter=lfs diff=lfs merge=lfs -text
90
  mosesdecoder/mert/pro filter=lfs diff=lfs merge=lfs -text
91
+ mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/merge-sorted filter=lfs diff=lfs merge=lfs -text
92
+ mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTable filter=lfs diff=lfs merge=lfs -text
93
+ mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTableMin filter=lfs diff=lfs merge=lfs -text
94
+ mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processPhraseTableMin filter=lfs diff=lfs merge=lfs -text
95
+ mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/prunePhraseTable filter=lfs diff=lfs merge=lfs -text
96
+ mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/queryLexicalTable filter=lfs diff=lfs merge=lfs -text
97
+ mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/queryPhraseTableMin filter=lfs diff=lfs merge=lfs -text
mosesdecoder/mingw/Makefile ADDED
@@ -0,0 +1,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Environment
3
+ MKDIR=C:\MinGW\msys\1.0\bin\mkdir.exe
4
+ CP=C:\MinGW\msys\1.0\bin\cp.exe
5
+ GREP=C:\MinGW\msys\1.0\bin\grep.exe
6
+ SED=C:\MinGW\msys\1.0\bin\sed.exe
7
+ RM=C:\MinGW\msys\1.0\bin\rm.exe
8
+ NM=nm
9
+ CCADMIN=CCadmin
10
+ RANLIB=ranlib
11
+ CC=gcc
12
+ CCC=g++
13
+ CXX=g++
14
+ FC=gfortran
15
+ AS=as
16
+ AR=ar
17
+
18
+ # Macros
19
+ CND_PLATFORM=MinGW-Windows
20
+ CND_DLIB_EXT=dll
21
+ CND_CONF=Debug
22
+ CND_DISTDIR=dist
23
+ CND_BUILDDIR=build
24
+
25
+ # Object Directory
26
+ OBJECTDIR=${CND_BUILDDIR}\${CND_CONF}\${CND_PLATFORM}
27
+
28
+ # C Compiler Flags
29
+ CFLAGS=
30
+
31
+ # CC Compiler Flags
32
+ CCFLAGS=
33
+ CXXFLAGS=-g -Wall -DKENLM_MAX_ORDER=6 -DMAX_NUM_FACTORS=4 -D_WIN32 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I. -ID:\work\moses\dependencies\boost_1_54_0_install\include
34
+ # -DWITH_THREADS
35
+
36
+ # Fortran Compiler Flags
37
+ FFLAGS=
38
+
39
+ # Assembler Flags
40
+ ASFLAGS=
41
+
42
+ # Link Libraries and Options
43
+ LDLIBSOPTIONS=-LD:\work\moses\dependencies\boost_1_54_0_install\lib
44
+
45
+ .PHONY : all
46
+ all: ${OBJECTDIR}\lmplz.exe ${OBJECTDIR}\moses-cmd.exe ${OBJECTDIR}\build_binary.exe \
47
+ ${OBJECTDIR}\moses-chart-cmd.exe ${OBJECTDIR}\processPhraseTable.exe \
48
+ ${OBJECTDIR}\processLexicalTable.exe ${OBJECTDIR}\CreateOnDiskPt.exe
49
+
50
+ ${OBJECTDIR}\\%.d: %.cc
51
+ ${MKDIR} -p ${subst \,/,$(@D)}
52
+ - ${RM} -f $@
53
+ ${CXX} -MM $(CXXFLAGS) $< > $@.temp
54
+ ${SED} "1s/${*F}.o[ :]*/${subst \,\\\\,${OBJECTDIR}\$*}.o ${subst \,\\\\,${OBJECTDIR}\$*}.d : /g" < $@.temp > $@
55
+ - ${RM} -f $@.temp
56
+
57
+ ${OBJECTDIR}\\%.d: %.cpp
58
+ ${MKDIR} -p ${subst \,/,$(@D)}
59
+ - ${RM} -f $@
60
+ ${CXX} -MM $(CXXFLAGS) $< > $@.temp
61
+ ${SED} "1s/${*F}.o[ :]*/${subst \,\\\\,${OBJECTDIR}\$*}.o ${subst \,\\\\,${OBJECTDIR}\$*}.d : /g" < $@.temp > $@
62
+ - ${RM} -f $@.temp
63
+
64
+ # libutil
65
+ UTIL_CC_SLASH = ${wildcard util/*.cc util/stream/*.cc util/double-conversion/*.cc}
66
+ UTIL_CC = ${subst /,\,${UTIL_CC_SLASH}}
67
+ UTIL_O = ${addprefix ${OBJECTDIR}\,${UTIL_CC:%.cc=%.o}}
68
+ sinclude ${UTIL_O:%.o=%.d}
69
+
70
+ ${UTIL_O}: ${OBJECTDIR}\\%.o: %.cc
71
+ ${MKDIR} -p ${subst \,/,$(@D)}
72
+ $(CXX) $(CXXFLAGS) -c $< -o $@
73
+
74
+ ${OBJECTDIR}\libutil.a: ${UTIL_O}
75
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
76
+ ${AR} -r -s ${OBJECTDIR}\libutil.a ${UTIL_O}
77
+
78
+ # libkenlm
79
+ KENLM_CC_ALL_SLASH = ${wildcard lm/*.cc lm/builder/*.cc lm/filter/*.cc}
80
+ KENLM_CC_ALL = ${subst /,\,${KENLM_CC_ALL_SLASH}}
81
+ KENLM_CC = ${filter-out %main.cc %test.cc,${KENLM_CC_ALL}}
82
+ KENLM_O = ${addprefix ${OBJECTDIR}\,${KENLM_CC:%.cc=%.o}}
83
+ sinclude ${KENLM_O:%.o=%.d}
84
+
85
+ ${KENLM_O}: ${OBJECTDIR}\\%.o: %.cc
86
+ ${MKDIR} -p ${subst \,/,$(@D)}
87
+ ${CXX} ${CXXFLAGS} -c $< -o $@
88
+
89
+ ${OBJECTDIR}\libkenlm.a: ${KENLM_O}
90
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
91
+ ${AR} -r -s ${OBJECTDIR}\libkenlm.a ${KENLM_O}
92
+
93
+ #lmplz
94
+ sinclude ${OBJECTDIR}\lm\builder\lmplz_main.d
95
+
96
+ ${OBJECTDIR}\lm\builder\lmplz_main.o: ${OBJECTDIR}\\%.o: %.cc
97
+ ${MKDIR} -p ${subst \,/,$(@D)}
98
+ ${CXX} ${CXXFLAGS} -c $< -o $@
99
+
100
+ ${OBJECTDIR}\lmplz.exe: ${OBJECTDIR}\lm\builder\lmplz_main.o ${OBJECTDIR}\libkenlm.a ${OBJECTDIR}\libutil.a
101
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
102
+ ${CXX} ${LDLIBSOPTIONS} -L ${OBJECTDIR} -static ${OBJECTDIR}\lm\builder\lmplz_main.o \
103
+ -lkenlm -lutil \
104
+ -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt \
105
+ -o ${OBJECTDIR}\lmplz.exe
106
+
107
+ #build_binary
108
+ sinclude ${OBJECTDIR}\lm\build_binary_main.d
109
+
110
+ ${OBJECTDIR}\lm\build_binary_main.o: ${OBJECTDIR}\\%.o: %.cc
111
+ ${MKDIR} -p ${subst \,/,$(@D)}
112
+ ${CXX} ${CXXFLAGS} -c $< -o $@
113
+
114
+ ${OBJECTDIR}\build_binary.exe: ${OBJECTDIR}\lm\build_binary_main.o ${OBJECTDIR}\libkenlm.a ${OBJECTDIR}\libutil.a
115
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
116
+ ${CXX} ${LDLIBSOPTIONS} -L ${OBJECTDIR} -static ${OBJECTDIR}\lm\build_binary_main.o \
117
+ -lkenlm -lutil \
118
+ -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt \
119
+ -o ${OBJECTDIR}\build_binary.exe
120
+
121
+ #libondiskpt
122
+ ONDISKPT_CC = ${addprefix OnDiskPt\, OnDiskWrapper.cpp SourcePhrase.cpp TargetPhrase.cpp Word.cpp Phrase.cpp PhraseNode.cpp TargetPhraseCollection.cpp Vocab.cpp OnDiskQuery.cpp}
123
+ ONDISKPT_O = ${addprefix ${OBJECTDIR}\,${ONDISKPT_CC:%.cpp=%.o}}
124
+ sinclude ${ONDISKPT_O:%.o=%.d}
125
+
126
+ ${ONDISKPT_O}: ${OBJECTDIR}\\%.o: %.cpp
127
+ ${MKDIR} -p ${subst \,/,$(@D)}
128
+ ${CXX} ${CXXFLAGS} -c $< -o $@
129
+
130
+ ${OBJECTDIR}\libondiskpt.a: ${ONDISKPT_O}
131
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
132
+ ${AR} -r -s ${OBJECTDIR}\libondiskpt.a ${ONDISKPT_O}
133
+
134
+ #libmoses
135
+ MOSES_CC_ALL_SLASH = ${wildcard moses/*.cpp moses/TranslationModel/*.cpp \
136
+ moses/TranslationModel/fuzzy-match/*.cpp \
137
+ moses/TranslationModel/DynSAInclude/*.cpp \
138
+ moses/TranslationModel/RuleTable/*.cpp \
139
+ moses/TranslationModel/Scope3Parser/*.cpp \
140
+ moses/TranslationModel/CYKPlusParser/*.cpp \
141
+ moses/FF/*.cpp \
142
+ moses/FF/OSM-Feature/*.cpp \
143
+ moses/FF/LexicalReordering/*.cpp\
144
+ moses/TranslationModel/CompactPT/*.cpp}
145
+ #lm
146
+ MOSES_CC_ALL_SLASH += ${addprefix moses\LM\, Backward.cpp BackwardLMState.cpp Base.cpp Implementation.cpp Joint.cpp Ken.cpp MultiFactor.cpp SingleFactor.cpp SkeletonLM.cpp}
147
+ MOSES_CC_ALL = ${subst /,\,${MOSES_CC_ALL_SLASH}}
148
+ MOSES_CC = ${filter-out %Test.cpp moses\Mock%.cpp,${MOSES_CC_ALL}}
149
+ MOSES_O = ${addprefix ${OBJECTDIR}\,${MOSES_CC:%.cpp=%.o}}
150
+ sinclude ${MOSES_O:%.o=%.d}
151
+
152
+ ${MOSES_O}: ${OBJECTDIR}\\%.o: %.cpp
153
+ ${MKDIR} -p ${subst \,/,$(@D)}
154
+ ${CXX} ${CXXFLAGS} -c $< -o $@
155
+
156
+ SEARCH_CC = ${addprefix search\, edge_generator.cc nbest.cc rule.cc vertex.cc}
157
+ SEARCH_O = ${addprefix ${OBJECTDIR}\,${SEARCH_CC:%.cc=%.o}}
158
+ sinclude ${SEARCH_O:%.o=%.d}
159
+
160
+ ${SEARCH_O}: ${OBJECTDIR}\\%.o: %.cc
161
+ ${MKDIR} -p ${subst \,/,$(@D)}
162
+ ${CXX} ${CXXFLAGS} -c $< -o $@
163
+
164
+ ${OBJECTDIR}\libmoses.a: ${MOSES_O} ${SEARCH_O}
165
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
166
+ ${AR} -r -s ${OBJECTDIR}\libmoses.a ${MOSES_O} ${SEARCH_O}
167
+
168
+ #libmosescmd
169
+ MOSESCMD_CC = ${addprefix moses-cmd\, IOWrapper.cpp mbr.cpp LatticeMBR.cpp TranslationAnalysis.cpp}
170
+ MOSESCMD_O = ${addprefix ${OBJECTDIR}\,${MOSESCMD_CC:%.cpp=%.o}}
171
+ sinclude ${MOSESCMD_O:%.o=%.d}
172
+
173
+ ${MOSESCMD_O}: ${OBJECTDIR}\\%.o: %.cpp
174
+ ${MKDIR} -p ${subst \,/,$(@D)}
175
+ ${CXX} ${CXXFLAGS} -c $< -o $@
176
+
177
+ #moses-cmd
178
+ sinclude ${OBJECTDIR}\moses-cmd\Main.d
179
+
180
+ ${OBJECTDIR}\moses-cmd\Main.o: ${OBJECTDIR}\\%.o: %.cpp
181
+ ${MKDIR} -p ${subst \,/,$(@D)}
182
+ ${CXX} ${CXXFLAGS} -c $< -o $@
183
+
184
+ ${OBJECTDIR}\moses-cmd.exe: ${OBJECTDIR}\libmoses.a \
185
+ ${OBJECTDIR}\libkenlm.a ${OBJECTDIR}\libondiskpt.a \
186
+ ${OBJECTDIR}\libutil.a ${OBJECTDIR}\moses-cmd\Main.o ${MOSESCMD_O}
187
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
188
+ ${CXX} ${LDLIBSOPTIONS} -L ${OBJECTDIR} -static ${OBJECTDIR}\moses-cmd\Main.o ${MOSESCMD_O} \
189
+ -lmoses -lkenlm -londiskpt -lutil \
190
+ -lboost_iostreams-mt -lboost_bzip2-mt -lboost_zlib-mt -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt \
191
+ -lz -lbz2 -ldl -lmman \
192
+ -o ${OBJECTDIR}\moses-cmd.exe
193
+
194
+ #moseschartcmd
195
+ MOSESCHARTCMD_CC = ${addprefix moses-chart-cmd\, Main.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp}
196
+ MOSESCHARTCMD_O = ${addprefix ${OBJECTDIR}\,${MOSESCHARTCMD_CC:%.cpp=%.o}}
197
+ sinclude ${MOSESCHARTCMD_O:%.o=%.d}
198
+
199
+ ${MOSESCHARTCMD_O}: ${OBJECTDIR}\\%.o: %.cpp
200
+ ${MKDIR} -p ${subst \,/,$(@D)}
201
+ ${CXX} ${CXXFLAGS} -c $< -o $@
202
+
203
+ ${OBJECTDIR}\moses-chart-cmd.exe: ${OBJECTDIR}\libmoses.a \
204
+ ${OBJECTDIR}\libkenlm.a ${OBJECTDIR}\libondiskpt.a \
205
+ ${OBJECTDIR}\libutil.a ${MOSESCHARTCMD_O}
206
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
207
+ ${CXX} ${LDLIBSOPTIONS} -L ${OBJECTDIR} -static ${MOSESCHARTCMD_O} \
208
+ -lmoses -lkenlm -londiskpt -lutil \
209
+ -lboost_iostreams-mt -lboost_bzip2-mt -lboost_zlib-mt -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt \
210
+ -lz -lbz2 -ldl -lmman \
211
+ -o ${OBJECTDIR}\moses-chart-cmd.exe
212
+
213
+ #processPhraseTable
214
+ PROCESSPHRASETABLE_CC = ${addprefix misc\, GenerateTuples.cpp processPhraseTable.cpp}
215
+ PROCESSPHRASETABLE_O = ${addprefix ${OBJECTDIR}\,${PROCESSPHRASETABLE_CC:%.cpp=%.o}}
216
+ sinclude ${PROCESSPHRASETABLE_O:%.o=%.d}
217
+
218
+ ${PROCESSPHRASETABLE_O}: ${OBJECTDIR}\\%.o: %.cpp
219
+ ${MKDIR} -p ${subst \,/,$(@D)}
220
+ ${CXX} ${CXXFLAGS} -c $< -o $@
221
+
222
+ ${OBJECTDIR}\processPhraseTable.exe: ${OBJECTDIR}\libmoses.a ${OBJECTDIR}\libutil.a ${PROCESSPHRASETABLE_O}
223
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
224
+ ${CXX} ${LDLIBSOPTIONS} -L ${OBJECTDIR} -static ${PROCESSPHRASETABLE_O} \
225
+ -lmoses -lutil \
226
+ -lboost_iostreams-mt -lboost_bzip2-mt -lboost_zlib-mt -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt \
227
+ -lz -lbz2 -ldl -lmman \
228
+ -o ${OBJECTDIR}\processPhraseTable.exe
229
+
230
+ #processLexicalTable
231
+ PROCESSLEXTABLE_CC = ${addprefix misc\, processLexicalTable.cpp}
232
+ PROCESSLEXTABLE_O = ${addprefix ${OBJECTDIR}\,${PROCESSLEXTABLE_CC:%.cpp=%.o}}
233
+ sinclude ${PROCESSLEXTABLE_O:%.o=%.d}
234
+
235
+ ${PROCESSLEXTABLE_O}: ${OBJECTDIR}\\%.o: %.cpp
236
+ ${MKDIR} -p ${subst \,/,$(@D)}
237
+ ${CXX} ${CXXFLAGS} -c $< -o $@
238
+
239
+ ${OBJECTDIR}\processLexicalTable.exe: ${OBJECTDIR}\libkenlm.a ${OBJECTDIR}\libmoses.a ${OBJECTDIR}\libutil.a ${OBJECTDIR}\libondiskpt.a ${PROCESSLEXTABLE_O}
240
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
241
+ ${CXX} ${LDLIBSOPTIONS} -L ${OBJECTDIR} -static ${PROCESSLEXTABLE_O} \
242
+ -lmoses -lkenlm -londiskpt -lutil \
243
+ -lboost_iostreams-mt -lboost_bzip2-mt -lboost_zlib-mt -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt \
244
+ -lz -lbz2 -ldl -lmman \
245
+ -o ${OBJECTDIR}\processLexicalTable.exe
246
+
247
+ #ondiskpt
248
+ sinclude ${OBJECTDIR}\OnDiskPt\Main.d
249
+
250
+ ${OBJECTDIR}\OnDiskPt\Main.o: ${OBJECTDIR}\\%.o: %.cpp
251
+ ${MKDIR} -p ${subst \,/,$(@D)}
252
+ ${CXX} ${CXXFLAGS} -c $< -o $@
253
+
254
+ ${OBJECTDIR}\CreateOnDiskPt.exe: ${OBJECTDIR}\OnDiskPt\Main.o ${OBJECTDIR}\libondiskpt.a ${OBJECTDIR}\libmoses.a ${OBJECTDIR}\libkenlm.a ${OBJECTDIR}\libutil.a
255
+ ${MKDIR} -p ${subst \,/,${OBJECTDIR}}
256
+ ${CXX} ${LDLIBSOPTIONS} -L ${OBJECTDIR} -static ${OBJECTDIR}\OnDiskPt\Main.o \
257
+ -londiskpt -lmoses -lkenlm -lutil \
258
+ -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt \
259
+ -lz -lbz2 -ldl -lmman \
260
+ -o ${OBJECTDIR}\CreateOnDiskPt.exe
261
+
262
+ .PHONY : clean
263
+ clean:
264
+
mosesdecoder/mingw/MosesGUI/Ui_addMTModel.py ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Form implementation generated from reading ui file 'C:\work\eric4workspace\MosesGUI\addMTModel.ui'
4
+ #
5
+ # Created: Thu Jul 11 13:38:49 2013
6
+ # by: PyQt4 UI code generator 4.10.2
7
+ #
8
+ # WARNING! All changes made in this file will be lost!
9
+
10
+ from PyQt4 import QtCore, QtGui
11
+
12
+
13
+ _fromUtf8 = getattr(QtCore.QString, 'fromUtf8', lambda s: s)
14
+
15
+
16
+ def _translate(context, text, disambig):
17
+ return QtGui.QApplication.translate(
18
+ context, text, disambig,
19
+ getattr(
20
+ QtGui.QApplication, 'UnicodeUTF8',
21
+ QtCore.QCoreApplication.Encoding))
22
+
23
+
24
+ class Ui_Dialog(object):
25
+ def setupUi(self, Dialog):
26
+ Dialog.setObjectName(_fromUtf8("Dialog"))
27
+ Dialog.resize(494, 342)
28
+ Dialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
29
+ Dialog.setWindowFilePath(_fromUtf8(""))
30
+ self.verticalLayout = QtGui.QVBoxLayout(Dialog)
31
+ self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
32
+ self.groupBox_3 = QtGui.QGroupBox(Dialog)
33
+ self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
34
+ self.gridLayout = QtGui.QGridLayout(self.groupBox_3)
35
+ self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
36
+ self.label = QtGui.QLabel(self.groupBox_3)
37
+ self.label.setObjectName(_fromUtf8("label"))
38
+ self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
39
+ self.editName = QtGui.QLineEdit(self.groupBox_3)
40
+ self.editName.setObjectName(_fromUtf8("editName"))
41
+ self.gridLayout.addWidget(self.editName, 0, 1, 1, 3)
42
+ self.verticalLayout.addWidget(self.groupBox_3)
43
+ self.groupBox = QtGui.QGroupBox(Dialog)
44
+ self.groupBox.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
45
+ self.groupBox.setObjectName(_fromUtf8("groupBox"))
46
+ self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
47
+ self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
48
+ self.grpBoxInternet = QtGui.QGroupBox(self.groupBox)
49
+ self.grpBoxInternet.setCheckable(True)
50
+ self.grpBoxInternet.setObjectName(_fromUtf8("grpBoxInternet"))
51
+ self.verticalLayout_3 = QtGui.QVBoxLayout(self.grpBoxInternet)
52
+ self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
53
+ self.editInternet = QtGui.QLineEdit(self.grpBoxInternet)
54
+ self.editInternet.setObjectName(_fromUtf8("editInternet"))
55
+ self.verticalLayout_3.addWidget(self.editInternet)
56
+ self.verticalLayout_2.addWidget(self.grpBoxInternet)
57
+ self.grpBoxLocal = QtGui.QGroupBox(self.groupBox)
58
+ self.grpBoxLocal.setFlat(False)
59
+ self.grpBoxLocal.setCheckable(True)
60
+ self.grpBoxLocal.setChecked(False)
61
+ self.grpBoxLocal.setObjectName(_fromUtf8("grpBoxLocal"))
62
+ self.horizontalLayout = QtGui.QHBoxLayout(self.grpBoxLocal)
63
+ self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
64
+ self.editLocal = QtGui.QLineEdit(self.grpBoxLocal)
65
+ self.editLocal.setText(_fromUtf8(""))
66
+ self.editLocal.setObjectName(_fromUtf8("editLocal"))
67
+ self.horizontalLayout.addWidget(self.editLocal)
68
+ self.btnLocal = QtGui.QPushButton(self.grpBoxLocal)
69
+ self.btnLocal.setObjectName(_fromUtf8("btnLocal"))
70
+ self.horizontalLayout.addWidget(self.btnLocal)
71
+ self.horizontalLayout.setStretch(0, 9)
72
+ self.horizontalLayout.setStretch(1, 1)
73
+ self.verticalLayout_2.addWidget(self.grpBoxLocal)
74
+ self.verticalLayout.addWidget(self.groupBox)
75
+ self.groupBox_2 = QtGui.QGroupBox(Dialog)
76
+ self.groupBox_2.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
77
+ self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
78
+ self.horizontalLayout_2 = QtGui.QHBoxLayout(self.groupBox_2)
79
+ self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
80
+ self.editPath = QtGui.QLineEdit(self.groupBox_2)
81
+ self.editPath.setObjectName(_fromUtf8("editPath"))
82
+ self.horizontalLayout_2.addWidget(self.editPath)
83
+ self.btnPath = QtGui.QPushButton(self.groupBox_2)
84
+ self.btnPath.setObjectName(_fromUtf8("btnPath"))
85
+ self.horizontalLayout_2.addWidget(self.btnPath)
86
+ self.horizontalLayout_2.setStretch(0, 9)
87
+ self.horizontalLayout_2.setStretch(1, 1)
88
+ self.verticalLayout.addWidget(self.groupBox_2)
89
+ self.buttonBox = QtGui.QDialogButtonBox(Dialog)
90
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
91
+ self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
92
+ self.verticalLayout.addWidget(self.buttonBox)
93
+ self.verticalLayout.setStretch(1, 2)
94
+ self.verticalLayout.setStretch(2, 1)
95
+ self.verticalLayout.setStretch(3, 1)
96
+
97
+ self.retranslateUi(Dialog)
98
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
99
+ QtCore.QMetaObject.connectSlotsByName(Dialog)
100
+ Dialog.setTabOrder(self.editName, self.grpBoxInternet)
101
+ Dialog.setTabOrder(self.grpBoxInternet, self.editInternet)
102
+ Dialog.setTabOrder(self.editInternet, self.grpBoxLocal)
103
+ Dialog.setTabOrder(self.grpBoxLocal, self.editLocal)
104
+ Dialog.setTabOrder(self.editLocal, self.btnLocal)
105
+ Dialog.setTabOrder(self.btnLocal, self.editPath)
106
+ Dialog.setTabOrder(self.editPath, self.btnPath)
107
+ Dialog.setTabOrder(self.btnPath, self.buttonBox)
108
+
109
+ def retranslateUi(self, Dialog):
110
+ Dialog.setWindowTitle(_translate("Dialog", "Install MT Model", None))
111
+ self.groupBox_3.setTitle(_translate("Dialog", "MT Model Details", None))
112
+ self.label.setText(_translate("Dialog", "Model Name:", None))
113
+ self.editName.setText(_translate("Dialog", "SampleModel", None))
114
+ self.groupBox.setTitle(_translate("Dialog", "Install From ...", None))
115
+ self.grpBoxInternet.setTitle(_translate("Dialog", "From Internet ...", None))
116
+ self.editInternet.setText(_translate("Dialog", "http://www.statmt.org/~jie/models/EnFr4MosesGUI.zip", None))
117
+ self.grpBoxLocal.setTitle(_translate("Dialog", "From Local File", None))
118
+ self.btnLocal.setText(_translate("Dialog", "...", None))
119
+ self.groupBox_2.setTitle(_translate("Dialog", "Install To ...", None))
120
+ self.btnPath.setText(_translate("Dialog", "...", None))
121
+
122
+
123
+ if __name__ == "__main__":
124
+ import sys
125
+ app = QtGui.QApplication(sys.argv)
126
+ Dialog = QtGui.QDialog()
127
+ ui = Ui_Dialog()
128
+ ui.setupUi(Dialog)
129
+ Dialog.show()
130
+ sys.exit(app.exec_())
mosesdecoder/mingw/MosesGUI/Ui_chooseMTModel.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Form implementation generated from reading ui file 'C:\work\eric4workspace\MosesGUI\chooseMTModel.ui'
4
+ #
5
+ # Created: Wed Jul 10 16:00:02 2013
6
+ # by: PyQt4 UI code generator 4.10.2
7
+ #
8
+ # WARNING! All changes made in this file will be lost!
9
+
10
+ from PyQt4 import QtCore, QtGui
11
+
12
+
13
+ _fromUtf8 = getattr(QtCore.QString, 'fromUtf8', lambda s: s)
14
+
15
+
16
+ def _translate(context, text, disambig):
17
+ return QtGui.QApplication.translate(
18
+ context, text, disambig,
19
+ getattr(
20
+ QtGui.QApplication, 'UnicodeUTF8',
21
+ QtCore.QCoreApplication.Encoding))
22
+
23
+
24
+ class Ui_Dialog(object):
25
+ def setupUi(self, Dialog):
26
+ Dialog.setObjectName(_fromUtf8("Dialog"))
27
+ Dialog.resize(400, 300)
28
+ self.verticalLayout = QtGui.QVBoxLayout(Dialog)
29
+ self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
30
+ self.groupBox = QtGui.QGroupBox(Dialog)
31
+ self.groupBox.setObjectName(_fromUtf8("groupBox"))
32
+ self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
33
+ self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
34
+ self.selTableView = QtGui.QTableView(self.groupBox)
35
+ self.selTableView.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
36
+ self.selTableView.setProperty("showDropIndicator", False)
37
+ self.selTableView.setDragDropOverwriteMode(False)
38
+ self.selTableView.setAlternatingRowColors(False)
39
+ self.selTableView.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
40
+ self.selTableView.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
41
+ self.selTableView.setGridStyle(QtCore.Qt.DashLine)
42
+ self.selTableView.setSortingEnabled(True)
43
+ self.selTableView.setObjectName(_fromUtf8("selTableView"))
44
+ self.selTableView.verticalHeader().setVisible(False)
45
+ self.verticalLayout_2.addWidget(self.selTableView)
46
+ self.verticalLayout.addWidget(self.groupBox)
47
+ self.buttonBox = QtGui.QDialogButtonBox(Dialog)
48
+ self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
49
+ self.buttonBox.setStandardButtons(
50
+ QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
51
+ self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
52
+ self.verticalLayout.addWidget(self.buttonBox)
53
+
54
+ self.retranslateUi(Dialog)
55
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
56
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
57
+ QtCore.QMetaObject.connectSlotsByName(Dialog)
58
+
59
+ def retranslateUi(self, Dialog):
60
+ Dialog.setWindowTitle(_translate("Dialog", "Please choose an MT model to load...", None))
61
+ self.groupBox.setTitle(_translate("Dialog", "Avaialble MT Models", None))
62
+
63
+
64
+ if __name__ == "__main__":
65
+ import sys
66
+ app = QtGui.QApplication(sys.argv)
67
+ Dialog = QtGui.QDialog()
68
+ ui = Ui_Dialog()
69
+ ui.setupUi(Dialog)
70
+ Dialog.show()
71
+ sys.exit(app.exec_())
mosesdecoder/mingw/MosesGUI/Ui_credits.py ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Form implementation generated from reading ui file 'C:\work\eric4workspace\MosesGUI\credits.ui'
4
+ #
5
+ # Created: Wed Jul 10 16:52:58 2013
6
+ # by: PyQt4 UI code generator 4.10.2
7
+ #
8
+ # WARNING! All changes made in this file will be lost!
9
+
10
+ from PyQt4 import QtCore, QtGui
11
+
12
+
13
+ _fromUtf8 = getattr(QtCore.QString, 'fromUtf8', lambda s: s)
14
+
15
+
16
+ def _translate(context, text, disambig):
17
+ return QtGui.QApplication.translate(
18
+ context, text, disambig,
19
+ getattr(
20
+ QtGui.QApplication, 'UnicodeUTF8',
21
+ QtCore.QCoreApplication.Encoding))
22
+
23
+
24
+ class Ui_Dialog(object):
25
+ def setupUi(self, Dialog):
26
+ Dialog.setObjectName(_fromUtf8("Dialog"))
27
+ Dialog.resize(359, 271)
28
+ self.label = QtGui.QLabel(Dialog)
29
+ self.label.setGeometry(QtCore.QRect(10, 10, 341, 211))
30
+ self.label.setAlignment(QtCore.Qt.AlignJustify | QtCore.Qt.AlignVCenter)
31
+ self.label.setWordWrap(True)
32
+ self.label.setObjectName(_fromUtf8("label"))
33
+ self.pushButton = QtGui.QPushButton(Dialog)
34
+ self.pushButton.setGeometry(QtCore.QRect(150, 240, 75, 23))
35
+ self.pushButton.setObjectName(_fromUtf8("pushButton"))
36
+
37
+ self.retranslateUi(Dialog)
38
+ QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), Dialog.accept)
39
+ QtCore.QMetaObject.connectSlotsByName(Dialog)
40
+
41
+ def retranslateUi(self, Dialog):
42
+ Dialog.setWindowTitle(_translate("Dialog", "Credits and Support", None))
43
+ self.label.setText(_translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
44
+ "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
45
+ "p, li { white-space: pre-wrap; }\n"
46
+ "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt; font-weight:400; font-style:normal;\">\n"
47
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">This software is provided by </span><a href=\"http://www.capitatranslationinterpreting.com/\"><span style=\" font-size:10pt; text-decoration: underline; color:#0000ff;\">Capita Translation and Interpreting</span></a><span style=\" font-size:10pt;\"> for the </span><a href=\"http://www.statmt.org/moses/\"><span style=\" font-size:10pt; text-decoration: underline; color:#0000ff;\">Moses</span></a><span style=\" font-size:10pt;\"> Statistical Machine Translation decoder as part of the </span><a href=\"http://www.statmt.org/mosescore/\"><span style=\" font-size:10pt; text-decoration: underline; color:#0000ff;\">Moses Core Project</span></a><a href=\"http://www.statmt.org/mosescore/\"><span style=\" font-size:10pt; text-decoration: underline; color:#000000;\">.</span></a></p>\n"
48
+ "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; color:#000000;\"><br /></p>\n"
49
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; color:#000000;\">For support, please email mail.jie.jiang@gmail.com or submit a post on </span><a href=\"http://www.statmt.org/moses/?n=Moses.MailingLists\"><span style=\" font-size:10pt; text-decoration: underline; color:#0000ff;\">Moses Support List</span></a><span style=\" font-size:10pt; text-decoration: underline; color:#000000;\">.</span></p>\n"
50
+ "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; color:#000000;\"><br /></p>\n"
51
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; color:#000000;\">More models are coming soon, please check </span><a href=\"http://www.statmt.org/moses/?n=Moses.Packages\"><span style=\" font-size:10pt; text-decoration: underline; color:#0000ff;\">Moses Packages</span></a><span style=\" font-size:10pt; text-decoration: underline; color:#000000;\">.</span></p></body></html>", None))
52
+ self.pushButton.setText(_translate("Dialog", "OK", None))
53
+
54
+
55
+ if __name__ == "__main__":
56
+ import sys
57
+ app = QtGui.QApplication(sys.argv)
58
+ Dialog = QtGui.QDialog()
59
+ ui = Ui_Dialog()
60
+ ui.setupUi(Dialog)
61
+ Dialog.show()
62
+ sys.exit(app.exec_())
mosesdecoder/mingw/MosesGUI/Ui_mainWindow.py ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Form implementation generated from reading ui file 'C:\work\eric4workspace\MosesGUI\mainWindow.ui'
4
+ #
5
+ # Created: Thu Jul 11 13:38:46 2013
6
+ # by: PyQt4 UI code generator 4.10.2
7
+ #
8
+ # WARNING! All changes made in this file will be lost!
9
+
10
+ from PyQt4 import QtCore, QtGui
11
+
12
+
13
+ _fromUtf8 = getattr(QtCore.QString, 'fromUtf8', lambda s: s)
14
+
15
+
16
+ def _translate(context, text, disambig):
17
+ return QtGui.QApplication.translate(
18
+ context, text, disambig,
19
+ getattr(
20
+ QtGui.QApplication, 'UnicodeUTF8',
21
+ QtCore.QCoreApplication.Encoding))
22
+
23
+
24
+ class Ui_MainWindow(object):
25
+ def setupUi(self, MainWindow):
26
+ MainWindow.setObjectName(_fromUtf8("MainWindow"))
27
+ MainWindow.resize(705, 491)
28
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
29
+ sizePolicy.setHorizontalStretch(0)
30
+ sizePolicy.setVerticalStretch(0)
31
+ sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
32
+ MainWindow.setSizePolicy(sizePolicy)
33
+ icon = QtGui.QIcon()
34
+ icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/moses.ico")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
35
+ MainWindow.setWindowIcon(icon)
36
+ MainWindow.setLayoutDirection(QtCore.Qt.LeftToRight)
37
+ MainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
38
+ self.centralWidget = QtGui.QWidget(MainWindow)
39
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
40
+ sizePolicy.setHorizontalStretch(0)
41
+ sizePolicy.setVerticalStretch(0)
42
+ sizePolicy.setHeightForWidth(self.centralWidget.sizePolicy().hasHeightForWidth())
43
+ self.centralWidget.setSizePolicy(sizePolicy)
44
+ self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
45
+ self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralWidget)
46
+ self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
47
+ self.tabWidget = QtGui.QTabWidget(self.centralWidget)
48
+ self.tabWidget.setAutoFillBackground(True)
49
+ self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
50
+ self.tab = QtGui.QWidget()
51
+ self.tab.setAutoFillBackground(True)
52
+ self.tab.setObjectName(_fromUtf8("tab"))
53
+ self.verticalLayout_2 = QtGui.QVBoxLayout(self.tab)
54
+ self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
55
+ self.groupBox = QtGui.QGroupBox(self.tab)
56
+ self.groupBox.setObjectName(_fromUtf8("groupBox"))
57
+ self.gridLayout = QtGui.QGridLayout(self.groupBox)
58
+ self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
59
+ self.label = QtGui.QLabel(self.groupBox)
60
+ self.label.setObjectName(_fromUtf8("label"))
61
+ self.gridLayout.addWidget(self.label, 2, 0, 1, 1)
62
+ self.editSrcLang = QtGui.QLineEdit(self.groupBox)
63
+ self.editSrcLang.setReadOnly(True)
64
+ self.editSrcLang.setObjectName(_fromUtf8("editSrcLang"))
65
+ self.gridLayout.addWidget(self.editSrcLang, 2, 1, 1, 1)
66
+ self.editTrgLang = QtGui.QLineEdit(self.groupBox)
67
+ self.editTrgLang.setReadOnly(True)
68
+ self.editTrgLang.setObjectName(_fromUtf8("editTrgLang"))
69
+ self.gridLayout.addWidget(self.editTrgLang, 2, 4, 1, 1)
70
+ self.label_3 = QtGui.QLabel(self.groupBox)
71
+ self.label_3.setObjectName(_fromUtf8("label_3"))
72
+ self.gridLayout.addWidget(self.label_3, 2, 3, 1, 1)
73
+ self.btnTranslate = QtGui.QPushButton(self.groupBox)
74
+ self.btnTranslate.setEnabled(True)
75
+ self.btnTranslate.setMinimumSize(QtCore.QSize(120, 30))
76
+ self.btnTranslate.setFlat(False)
77
+ self.btnTranslate.setObjectName(_fromUtf8("btnTranslate"))
78
+ self.gridLayout.addWidget(self.btnTranslate, 3, 2, 1, 1)
79
+ self.editModelName = QtGui.QLineEdit(self.groupBox)
80
+ self.editModelName.setReadOnly(True)
81
+ self.editModelName.setObjectName(_fromUtf8("editModelName"))
82
+ self.gridLayout.addWidget(self.editModelName, 1, 2, 1, 1)
83
+ self.label_2 = QtGui.QLabel(self.groupBox)
84
+ self.label_2.setAlignment(
85
+ QtCore.Qt.AlignRight |
86
+ QtCore.Qt.AlignTrailing |
87
+ QtCore.Qt.AlignVCenter)
88
+ self.label_2.setObjectName(_fromUtf8("label_2"))
89
+ self.gridLayout.addWidget(self.label_2, 1, 1, 1, 1)
90
+ self.verticalLayout_2.addWidget(self.groupBox)
91
+ self.splitter = QtGui.QSplitter(self.tab)
92
+ self.splitter.setOrientation(QtCore.Qt.Horizontal)
93
+ self.splitter.setObjectName(_fromUtf8("splitter"))
94
+ self.editSrc = QtGui.QTextEdit(self.splitter)
95
+ self.editSrc.setObjectName(_fromUtf8("editSrc"))
96
+ self.editTrg = QtGui.QTextEdit(self.splitter)
97
+ self.editTrg.setReadOnly(True)
98
+ self.editTrg.setObjectName(_fromUtf8("editTrg"))
99
+ self.verticalLayout_2.addWidget(self.splitter)
100
+ self.verticalLayout_2.setStretch(0, 2)
101
+ self.verticalLayout_2.setStretch(1, 8)
102
+ self.tabWidget.addTab(self.tab, _fromUtf8(""))
103
+ self.tab_2 = QtGui.QWidget()
104
+ self.tab_2.setAutoFillBackground(True)
105
+ self.tab_2.setObjectName(_fromUtf8("tab_2"))
106
+ self.verticalLayout = QtGui.QVBoxLayout(self.tab_2)
107
+ self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
108
+ self.label_5 = QtGui.QLabel(self.tab_2)
109
+ self.label_5.setAutoFillBackground(True)
110
+ self.label_5.setObjectName(_fromUtf8("label_5"))
111
+ self.verticalLayout.addWidget(self.label_5)
112
+ self.splitter_4 = QtGui.QSplitter(self.tab_2)
113
+ self.splitter_4.setOrientation(QtCore.Qt.Horizontal)
114
+ self.splitter_4.setObjectName(_fromUtf8("splitter_4"))
115
+ self.groupBox_3 = QtGui.QGroupBox(self.splitter_4)
116
+ self.groupBox_3.setMinimumSize(QtCore.QSize(200, 0))
117
+ self.groupBox_3.setMaximumSize(QtCore.QSize(200, 16777215))
118
+ self.groupBox_3.setAutoFillBackground(True)
119
+ self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
120
+ self.formLayout = QtGui.QFormLayout(self.groupBox_3)
121
+ self.formLayout.setObjectName(_fromUtf8("formLayout"))
122
+ self.newModelBtn = QtGui.QPushButton(self.groupBox_3)
123
+ self.newModelBtn.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
124
+ self.newModelBtn.setObjectName(_fromUtf8("newModelBtn"))
125
+ self.formLayout.setWidget(0, QtGui.QFormLayout.SpanningRole, self.newModelBtn)
126
+ self.delModelBtn = QtGui.QPushButton(self.groupBox_3)
127
+ self.delModelBtn.setObjectName(_fromUtf8("delModelBtn"))
128
+ self.formLayout.setWidget(1, QtGui.QFormLayout.SpanningRole, self.delModelBtn)
129
+ self.tableView = QtGui.QTableView(self.splitter_4)
130
+ font = QtGui.QFont()
131
+ font.setPointSize(7)
132
+ self.tableView.setFont(font)
133
+ self.tableView.setMouseTracking(False)
134
+ self.tableView.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
135
+ self.tableView.setAutoFillBackground(True)
136
+ self.tableView.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
137
+ self.tableView.setFrameShape(QtGui.QFrame.StyledPanel)
138
+ self.tableView.setFrameShadow(QtGui.QFrame.Plain)
139
+ self.tableView.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
140
+ self.tableView.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
141
+ self.tableView.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
142
+ self.tableView.setGridStyle(QtCore.Qt.DashLine)
143
+ self.tableView.setSortingEnabled(True)
144
+ self.tableView.setWordWrap(False)
145
+ self.tableView.setCornerButtonEnabled(False)
146
+ self.tableView.setObjectName(_fromUtf8("tableView"))
147
+ self.tableView.verticalHeader().setVisible(False)
148
+ self.tableView.verticalHeader().setSortIndicatorShown(True)
149
+ self.verticalLayout.addWidget(self.splitter_4)
150
+ self.verticalLayout.setStretch(1, 1000)
151
+ self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
152
+ self.verticalLayout_3.addWidget(self.tabWidget)
153
+ self.labelInfo = QtGui.QLabel(self.centralWidget)
154
+ self.labelInfo.setTextFormat(QtCore.Qt.AutoText)
155
+ self.labelInfo.setAlignment(
156
+ QtCore.Qt.AlignRight |
157
+ QtCore.Qt.AlignTrailing |
158
+ QtCore.Qt.AlignVCenter)
159
+ self.labelInfo.setObjectName(_fromUtf8("labelInfo"))
160
+ self.verticalLayout_3.addWidget(self.labelInfo)
161
+ MainWindow.setCentralWidget(self.centralWidget)
162
+
163
+ self.retranslateUi(MainWindow)
164
+ self.tabWidget.setCurrentIndex(0)
165
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
166
+
167
+ def retranslateUi(self, MainWindow):
168
+ MainWindow.setWindowTitle(_translate("MainWindow", "Moses Machine Translation System", None))
169
+ self.groupBox.setTitle(_translate("MainWindow", "Current MT Model", None))
170
+ self.label.setText(_translate("MainWindow", "Translate From:", None))
171
+ self.label_3.setText(_translate("MainWindow", "Translate Into:", None))
172
+ self.btnTranslate.setText(_translate("MainWindow", "Translate", None))
173
+ self.label_2.setText(_translate("MainWindow", "Model Name:", None))
174
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Machine Translation", None))
175
+ self.label_5.setText(_translate("MainWindow", "TextLabel", None))
176
+ self.groupBox_3.setTitle(_translate("MainWindow", "Management", None))
177
+ self.newModelBtn.setText(_translate("MainWindow", "Install New Model ...", None))
178
+ self.delModelBtn.setText(_translate("MainWindow", "Uninstall Selected Model ...", None))
179
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Model Management", None))
180
+ self.labelInfo.setText(_translate("MainWindow", "<qt><a href=\"www\">Credits and Support</a></qt>", None))
181
+
182
+ import icons_rc
183
+
184
+ if __name__ == "__main__":
185
+ import sys
186
+ app = QtGui.QApplication(sys.argv)
187
+ MainWindow = QtGui.QMainWindow()
188
+ ui = Ui_MainWindow()
189
+ ui.setupUi(MainWindow)
190
+ MainWindow.show()
191
+ sys.exit(app.exec_())
mosesdecoder/mingw/MosesGUI/__init__.py ADDED
File without changes
mosesdecoder/mingw/MosesGUI/addMTModel.py ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ Module implementing Dialog.
5
+ """
6
+
7
+ from PyQt4.QtGui import (
8
+ QDialog,
9
+ QFileDialog,
10
+ )
11
+ from PyQt4.QtCore import pyqtSignature
12
+
13
+ import datetime
14
+ import os
15
+
16
+ from Ui_addMTModel import Ui_Dialog
17
+ from util import doAlert
18
+
19
+
20
+ class AddMTModelDialog(QDialog, Ui_Dialog):
21
+ """
22
+ Class documentation goes here.
23
+ """
24
+ def __init__(self, parent=None, workdir=None):
25
+ """
26
+ Constructor
27
+ """
28
+ QDialog.__init__(self, parent)
29
+ self.setupUi(self)
30
+ self.timestr = None
31
+ self.workdir = workdir
32
+ todir, timestr = self.findEmptyDirWithTime(self.workdir)
33
+ self.editPath.setText(todir)
34
+ self.editName.setText("SampleModel_" + timestr)
35
+
36
+ def findEmptyDirWithTime(self, workdir):
37
+ if not self.timestr:
38
+ self.timestr = datetime.datetime.now().strftime('%Y-%m-%d_%H%M%S')
39
+ while True:
40
+ todir = os.path.join(workdir, "Model_%s" % self.timestr)
41
+ if not os.path.exists(todir):
42
+ break
43
+ self.timestr = datetime.datetime.now().strftime('%Y-%m-%d_%H%M%S')
44
+ return todir, self.timestr
45
+
46
+ @pyqtSignature("")
47
+ def on_btnLocal_clicked(self):
48
+ """
49
+ Slot documentation goes here.
50
+ """
51
+ dialog = QFileDialog(self)
52
+ dialog.setFileMode(QFileDialog.ExistingFile)
53
+ dialog.setNameFilter("Zipped model files (*.zip)")
54
+ dialog.setViewMode(QFileDialog.Detail)
55
+ if dialog.exec_():
56
+ self.editLocal.setText(dialog.selectedFiles()[0])
57
+
58
+ @pyqtSignature("")
59
+ def on_btnPath_clicked(self):
60
+ """
61
+ Slot documentation goes here.
62
+ """
63
+ dialog = QFileDialog(self, directory=self.workdir)
64
+ dialog.setFileMode(QFileDialog.Directory)
65
+ dialog.setViewMode(QFileDialog.Detail)
66
+ dialog.setOptions(QFileDialog.ShowDirsOnly)
67
+ if dialog.exec_():
68
+ root = str(dialog.selectedFiles()[0])
69
+ todir, _ = self.findEmptyDirWithTime(root)
70
+ self.editPath.setText(todir)
71
+
72
+ @pyqtSignature("bool")
73
+ def on_grpBoxInternet_toggled(self, p0):
74
+ """
75
+ Slot documentation goes here.
76
+ """
77
+ self.grpBoxLocal.setChecked(not p0)
78
+
79
+ @pyqtSignature("bool")
80
+ def on_grpBoxLocal_toggled(self, p0):
81
+ """
82
+ Slot documentation goes here.
83
+ """
84
+ self.grpBoxInternet.setChecked(not p0)
85
+
86
+ @pyqtSignature("")
87
+ def on_buttonBox_accepted(self):
88
+ """
89
+ Slot documentation goes here.
90
+ """
91
+ def checkEmpty(mystr):
92
+ return len(str(mystr).strip()) <= 0
93
+
94
+ # Check everything.
95
+ self.modelName = self.editName.text()
96
+ if checkEmpty(self.modelName):
97
+ doAlert("Please provide non-empty Model Name")
98
+ return
99
+ if self.grpBoxInternet.isChecked():
100
+ self.source = self.editInternet.text()
101
+ self.sourceMode = "Internet"
102
+ elif self.grpBoxLocal.isChecked():
103
+ self.source = self.editLocal.text()
104
+ self.sourceMode = "Local"
105
+ if not os.path.exists(str(self.source)):
106
+ doAlert("Please provide valid local file as source")
107
+ return
108
+ else:
109
+ doAlert("Please provide Install Source")
110
+ return
111
+ if checkEmpty(self.source):
112
+ doAlert("Please provide non-empty Install Source")
113
+ return
114
+ self.dest = self.editPath.text()
115
+ if checkEmpty(self.dest):
116
+ doAlert("Please provide non-empty Install Destination Folder")
117
+ return
118
+ self.accept()
mosesdecoder/mingw/MosesGUI/addMTModel.ui ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Dialog</class>
4
+ <widget class="QDialog" name="Dialog">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>494</width>
10
+ <height>342</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Install MT Model</string>
15
+ </property>
16
+ <property name="locale">
17
+ <locale language="English" country="UnitedKingdom"/>
18
+ </property>
19
+ <property name="windowFilePath">
20
+ <string notr="true"/>
21
+ </property>
22
+ <layout class="QVBoxLayout" name="verticalLayout" stretch="0,2,1,1">
23
+ <item>
24
+ <widget class="QGroupBox" name="groupBox_3">
25
+ <property name="title">
26
+ <string>MT Model Details</string>
27
+ </property>
28
+ <layout class="QGridLayout" name="gridLayout">
29
+ <item row="0" column="0">
30
+ <widget class="QLabel" name="label">
31
+ <property name="text">
32
+ <string>Model Name:</string>
33
+ </property>
34
+ </widget>
35
+ </item>
36
+ <item row="0" column="1" colspan="3">
37
+ <widget class="QLineEdit" name="editName">
38
+ <property name="text">
39
+ <string>SampleModel</string>
40
+ </property>
41
+ </widget>
42
+ </item>
43
+ </layout>
44
+ </widget>
45
+ </item>
46
+ <item>
47
+ <widget class="QGroupBox" name="groupBox">
48
+ <property name="locale">
49
+ <locale language="English" country="UnitedKingdom"/>
50
+ </property>
51
+ <property name="title">
52
+ <string>Install From ...</string>
53
+ </property>
54
+ <layout class="QVBoxLayout" name="verticalLayout_2">
55
+ <item>
56
+ <widget class="QGroupBox" name="grpBoxInternet">
57
+ <property name="title">
58
+ <string>From Internet ...</string>
59
+ </property>
60
+ <property name="checkable">
61
+ <bool>true</bool>
62
+ </property>
63
+ <layout class="QVBoxLayout" name="verticalLayout_3">
64
+ <item>
65
+ <widget class="QLineEdit" name="editInternet">
66
+ <property name="text">
67
+ <string>http://www.statmt.org/~jie/models/EnFr4MosesGUI.zip</string>
68
+ </property>
69
+ </widget>
70
+ </item>
71
+ </layout>
72
+ </widget>
73
+ </item>
74
+ <item>
75
+ <widget class="QGroupBox" name="grpBoxLocal">
76
+ <property name="title">
77
+ <string>From Local File</string>
78
+ </property>
79
+ <property name="flat">
80
+ <bool>false</bool>
81
+ </property>
82
+ <property name="checkable">
83
+ <bool>true</bool>
84
+ </property>
85
+ <property name="checked">
86
+ <bool>false</bool>
87
+ </property>
88
+ <layout class="QHBoxLayout" name="horizontalLayout" stretch="9,1">
89
+ <item>
90
+ <widget class="QLineEdit" name="editLocal">
91
+ <property name="text">
92
+ <string/>
93
+ </property>
94
+ </widget>
95
+ </item>
96
+ <item>
97
+ <widget class="QPushButton" name="btnLocal">
98
+ <property name="text">
99
+ <string>...</string>
100
+ </property>
101
+ </widget>
102
+ </item>
103
+ </layout>
104
+ </widget>
105
+ </item>
106
+ </layout>
107
+ </widget>
108
+ </item>
109
+ <item>
110
+ <widget class="QGroupBox" name="groupBox_2">
111
+ <property name="locale">
112
+ <locale language="English" country="UnitedKingdom"/>
113
+ </property>
114
+ <property name="title">
115
+ <string>Install To ...</string>
116
+ </property>
117
+ <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="9,1">
118
+ <item>
119
+ <widget class="QLineEdit" name="editPath"/>
120
+ </item>
121
+ <item>
122
+ <widget class="QPushButton" name="btnPath">
123
+ <property name="text">
124
+ <string>...</string>
125
+ </property>
126
+ </widget>
127
+ </item>
128
+ </layout>
129
+ </widget>
130
+ </item>
131
+ <item>
132
+ <widget class="QDialogButtonBox" name="buttonBox">
133
+ <property name="standardButtons">
134
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
135
+ </property>
136
+ </widget>
137
+ </item>
138
+ </layout>
139
+ </widget>
140
+ <tabstops>
141
+ <tabstop>editName</tabstop>
142
+ <tabstop>grpBoxInternet</tabstop>
143
+ <tabstop>editInternet</tabstop>
144
+ <tabstop>grpBoxLocal</tabstop>
145
+ <tabstop>editLocal</tabstop>
146
+ <tabstop>btnLocal</tabstop>
147
+ <tabstop>editPath</tabstop>
148
+ <tabstop>btnPath</tabstop>
149
+ <tabstop>buttonBox</tabstop>
150
+ </tabstops>
151
+ <resources/>
152
+ <connections>
153
+ <connection>
154
+ <sender>buttonBox</sender>
155
+ <signal>rejected()</signal>
156
+ <receiver>Dialog</receiver>
157
+ <slot>reject()</slot>
158
+ <hints>
159
+ <hint type="sourcelabel">
160
+ <x>442</x>
161
+ <y>326</y>
162
+ </hint>
163
+ <hint type="destinationlabel">
164
+ <x>474</x>
165
+ <y>339</y>
166
+ </hint>
167
+ </hints>
168
+ </connection>
169
+ </connections>
170
+ </ui>
mosesdecoder/mingw/MosesGUI/chooseMTModel.py ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ Module implementing ChooseMTModelDialog.
5
+ """
6
+
7
+ import sys
8
+
9
+ from PyQt4.QtCore import (
10
+ pyqtSignature,
11
+ QObject,
12
+ SIGNAL,
13
+ )
14
+ from PyQt4.QtGui import QDialog
15
+ from PyQt4.QtSql import QSqlQueryModel
16
+
17
+ from Ui_chooseMTModel import Ui_Dialog
18
+ from util import doAlert
19
+
20
+
21
+ class ChooseMTModelDialog(QDialog, Ui_Dialog):
22
+ """
23
+ Class documentation goes here.
24
+ """
25
+ def __init__(self, parent=None, datamodel=None):
26
+ """
27
+ Constructor
28
+ """
29
+ QDialog.__init__(self, parent)
30
+ self.setupUi(self)
31
+ self.model = QSqlQueryModel()
32
+ self.selTableView.setModel(self.model)
33
+ self.database = datamodel.getQSqlDatabase()
34
+ self.updateModel()
35
+ self.selTableView.hideColumn(0)
36
+ self.selTableView.hideColumn(5)
37
+ self.selTableView.hideColumn(6)
38
+ # Change status and keep the column.
39
+ QObject.connect(
40
+ datamodel, SIGNAL("modelInstalled()"),
41
+ self.on_datamodel_modelInstalled)
42
+
43
+ def updateModel(self):
44
+ self.model.setQuery(
45
+ 'SELECT ID, name, srclang, trglang, status, path, mosesini '
46
+ 'FROM models '
47
+ 'WHERE status = "READY" AND deleted != "True"',
48
+ self.database)
49
+
50
+ def on_datamodel_recordUpdated(self, bRecord):
51
+ """Deal with the selection changed problem."""
52
+ try:
53
+ if bRecord:
54
+ current = self.selTableView.currentIndex()
55
+ if current and current.row() != -1:
56
+ self.curSelection = current.row()
57
+ else:
58
+ self.curSelection = None
59
+ else:
60
+ if self.curSelection is not None:
61
+ self.selTableView.selectRow(self.curSelection)
62
+ except Exception as e:
63
+ print >> sys.stderr, str(e)
64
+
65
+ def on_datamodel_modelInstalled(self):
66
+ self.updateModel()
67
+
68
+ @pyqtSignature("")
69
+ def on_buttonBox_accepted(self):
70
+ """
71
+ Slot documentation goes here.
72
+ """
73
+ current = self.selTableView.currentIndex()
74
+ if not current:
75
+ doAlert("Please choose a model to start.")
76
+ return
77
+ record = self.model.record(current.row())
78
+ self.ID = record.value("ID").toString()
79
+ self.modelName = record.value("name").toString()
80
+ self.srcLang = record.value('srclang').toString()
81
+ self.trgLang = record.value('trglang').toString()
82
+ self.path = record.value("path").toString()
83
+ self.mosesini = record.value("mosesini").toString()
84
+ self.accept()
mosesdecoder/mingw/MosesGUI/chooseMTModel.ui ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Dialog</class>
4
+ <widget class="QDialog" name="Dialog">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>400</width>
10
+ <height>300</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Please choose an MT model to load...</string>
15
+ </property>
16
+ <layout class="QVBoxLayout" name="verticalLayout">
17
+ <item>
18
+ <widget class="QGroupBox" name="groupBox">
19
+ <property name="title">
20
+ <string>Avaialble MT Models</string>
21
+ </property>
22
+ <layout class="QVBoxLayout" name="verticalLayout_2">
23
+ <item>
24
+ <widget class="QTableView" name="selTableView">
25
+ <property name="editTriggers">
26
+ <set>QAbstractItemView::NoEditTriggers</set>
27
+ </property>
28
+ <property name="showDropIndicator" stdset="0">
29
+ <bool>false</bool>
30
+ </property>
31
+ <property name="dragDropOverwriteMode">
32
+ <bool>false</bool>
33
+ </property>
34
+ <property name="alternatingRowColors">
35
+ <bool>false</bool>
36
+ </property>
37
+ <property name="selectionMode">
38
+ <enum>QAbstractItemView::SingleSelection</enum>
39
+ </property>
40
+ <property name="selectionBehavior">
41
+ <enum>QAbstractItemView::SelectRows</enum>
42
+ </property>
43
+ <property name="gridStyle">
44
+ <enum>Qt::DashLine</enum>
45
+ </property>
46
+ <property name="sortingEnabled">
47
+ <bool>true</bool>
48
+ </property>
49
+ <attribute name="verticalHeaderVisible">
50
+ <bool>false</bool>
51
+ </attribute>
52
+ </widget>
53
+ </item>
54
+ </layout>
55
+ </widget>
56
+ </item>
57
+ <item>
58
+ <widget class="QDialogButtonBox" name="buttonBox">
59
+ <property name="orientation">
60
+ <enum>Qt::Horizontal</enum>
61
+ </property>
62
+ <property name="standardButtons">
63
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
64
+ </property>
65
+ </widget>
66
+ </item>
67
+ </layout>
68
+ </widget>
69
+ <resources/>
70
+ <connections>
71
+ <connection>
72
+ <sender>buttonBox</sender>
73
+ <signal>accepted()</signal>
74
+ <receiver>Dialog</receiver>
75
+ <slot>accept()</slot>
76
+ <hints>
77
+ <hint type="sourcelabel">
78
+ <x>248</x>
79
+ <y>254</y>
80
+ </hint>
81
+ <hint type="destinationlabel">
82
+ <x>157</x>
83
+ <y>274</y>
84
+ </hint>
85
+ </hints>
86
+ </connection>
87
+ <connection>
88
+ <sender>buttonBox</sender>
89
+ <signal>rejected()</signal>
90
+ <receiver>Dialog</receiver>
91
+ <slot>reject()</slot>
92
+ <hints>
93
+ <hint type="sourcelabel">
94
+ <x>316</x>
95
+ <y>260</y>
96
+ </hint>
97
+ <hint type="destinationlabel">
98
+ <x>286</x>
99
+ <y>274</y>
100
+ </hint>
101
+ </hints>
102
+ </connection>
103
+ </connections>
104
+ </ui>
mosesdecoder/mingw/MosesGUI/credits.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ Module implementing DlgCredits.
5
+ """
6
+
7
+ from PyQt4.QtGui import QDialog, QDesktopServices
8
+ from PyQt4.QtCore import pyqtSignature, QUrl
9
+
10
+ from Ui_credits import Ui_Dialog
11
+
12
+
13
+ class DlgCredits(QDialog, Ui_Dialog):
14
+ """
15
+ Class documentation goes here.
16
+ """
17
+ def __init__(self, parent=None):
18
+ """
19
+ Constructor
20
+ """
21
+ QDialog.__init__(self, parent)
22
+ self.setupUi(self)
23
+
24
+ @pyqtSignature("QString")
25
+ def on_label_linkActivated(self, link):
26
+ """
27
+ Slot documentation goes here.
28
+ """
29
+ QDesktopServices().openUrl(QUrl(link))
mosesdecoder/mingw/MosesGUI/credits.ui ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Dialog</class>
4
+ <widget class="QDialog" name="Dialog">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>359</width>
10
+ <height>271</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Credits and Support</string>
15
+ </property>
16
+ <widget class="QLabel" name="label">
17
+ <property name="geometry">
18
+ <rect>
19
+ <x>10</x>
20
+ <y>10</y>
21
+ <width>341</width>
22
+ <height>211</height>
23
+ </rect>
24
+ </property>
25
+ <property name="text">
26
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
27
+ &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
28
+ p, li { white-space: pre-wrap; }
29
+ &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
30
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;This software is provided by &lt;/span&gt;&lt;a href=&quot;http://www.capitatranslationinterpreting.com/&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Capita Translation and Interpreting&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; for the &lt;/span&gt;&lt;a href=&quot;http://www.statmt.org/moses/&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Moses&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; Statistical Machine Translation decoder as part of the &lt;/span&gt;&lt;a href=&quot;http://www.statmt.org/mosescore/&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Moses Core Project&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;http://www.statmt.org/mosescore/&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#000000;&quot;&gt;.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
31
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; color:#000000;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
32
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; color:#000000;&quot;&gt;For support, please email mail.jie.jiang@gmail.com or submit a post on &lt;/span&gt;&lt;a href=&quot;http://www.statmt.org/moses/?n=Moses.MailingLists&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Moses Support List&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#000000;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
33
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; color:#000000;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
34
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; color:#000000;&quot;&gt;More models are coming soon, please check &lt;/span&gt;&lt;a href=&quot;http://www.statmt.org/moses/?n=Moses.Packages&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Moses Packages&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#000000;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
35
+ </property>
36
+ <property name="alignment">
37
+ <set>Qt::AlignJustify|Qt::AlignVCenter</set>
38
+ </property>
39
+ <property name="wordWrap">
40
+ <bool>true</bool>
41
+ </property>
42
+ </widget>
43
+ <widget class="QPushButton" name="pushButton">
44
+ <property name="geometry">
45
+ <rect>
46
+ <x>150</x>
47
+ <y>240</y>
48
+ <width>75</width>
49
+ <height>23</height>
50
+ </rect>
51
+ </property>
52
+ <property name="text">
53
+ <string>OK</string>
54
+ </property>
55
+ </widget>
56
+ </widget>
57
+ <resources/>
58
+ <connections>
59
+ <connection>
60
+ <sender>pushButton</sender>
61
+ <signal>clicked()</signal>
62
+ <receiver>Dialog</receiver>
63
+ <slot>accept()</slot>
64
+ <hints>
65
+ <hint type="sourcelabel">
66
+ <x>151</x>
67
+ <y>98</y>
68
+ </hint>
69
+ <hint type="destinationlabel">
70
+ <x>186</x>
71
+ <y>118</y>
72
+ </hint>
73
+ </hints>
74
+ </connection>
75
+ </connections>
76
+ </ui>
mosesdecoder/mingw/MosesGUI/datamodel.py ADDED
@@ -0,0 +1,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ from PyQt4.QtCore import (
4
+ QDateTime,
5
+ SIGNAL,
6
+ )
7
+ from PyQt4.QtGui import (
8
+ QMessageBox,
9
+ )
10
+ from PyQt4.QtSql import (
11
+ QSqlDatabase,
12
+ QSqlQuery,
13
+ QSqlTableModel,
14
+ QVariant,
15
+ )
16
+
17
+ import ConfigParser
18
+ import os
19
+ import shutil
20
+ import sys
21
+ import threading
22
+ import urllib2
23
+ import zipfile
24
+
25
+ from util import (
26
+ doAlert,
27
+ doQuestion,
28
+ )
29
+
30
+
31
+ class DataModel(QSqlTableModel):
32
+ defaultDbFile = os.path.join(
33
+ os.path.split(os.path.realpath(__file__))[0], "models.sqlite")
34
+
35
+ def __init__(self, parent=None, filename=None):
36
+ self.installThreads = {}
37
+ self.processes = set()
38
+ if filename is None:
39
+ filename = DataModel.defaultDbFile
40
+ self.db = QSqlDatabase.addDatabase('QSQLITE')
41
+ print >> sys.stderr, "Open database at %s" % filename
42
+ self.db.setDatabaseName(filename)
43
+ self.db.open()
44
+ query = QSqlQuery(
45
+ 'SELECT COUNT(*) '
46
+ 'FROM sqlite_master '
47
+ 'WHERE type="table" AND tbl_name="models"',
48
+ self.db)
49
+ if not query.next() or query.value(0).toInt()[0] < 1:
50
+ # Create new table.
51
+ print >> sys.stderr, "Table not find, create the table"
52
+ query = QSqlQuery(
53
+ 'CREATE TABLE models ('
54
+ 'ID INTEGER PRIMARY KEY AUTOINCREMENT, '
55
+ 'name TEXT, '
56
+ 'status TEXT, '
57
+ 'srclang TEXT, '
58
+ 'trglang TEXT, '
59
+ 'date DATE, '
60
+ 'path TEXT, '
61
+ 'mosesini TEXT, '
62
+ 'origin TEXT, '
63
+ 'originMode TEXT, '
64
+ 'deleted TEXT)',
65
+ self.db)
66
+ if query.next():
67
+ print >> sys.stderr, query.value(0).toString()
68
+ # TODO: shoudn't design the deletion checking like this
69
+ # Change all deleted models into not deleted in case it failed last
70
+ # time.
71
+ query = QSqlQuery(
72
+ 'UPDATE models SET deleted="False" WHERE deleted="True"', self.db)
73
+ query = QSqlQuery(
74
+ 'UPDATE models SET status="READY" WHERE status="ON"', self.db)
75
+ super(DataModel, self).__init__(parent, self.db)
76
+ self.setTable("models")
77
+ self.select()
78
+ self.setEditStrategy(QSqlTableModel.OnFieldChange)
79
+
80
+ def destroy(self):
81
+ bExit = False
82
+ for i in self.installThreads:
83
+ t, flag = self.installThreads[i]
84
+ if t.isAlive() and flag:
85
+ if not bExit:
86
+ if not doQuestion(
87
+ "Installing process is running in the background, "
88
+ "do you want to terminate them and exit?"):
89
+ return False
90
+ else:
91
+ bExit = True
92
+ self.installThreads[i][1] = False
93
+ t.join()
94
+ if self.db:
95
+ self.db.close()
96
+ self.db = None
97
+ return True
98
+
99
+ def getQSqlDatabase(self):
100
+ return self.db
101
+
102
+ def getRowID(self, row):
103
+ record = self.record(row)
104
+ return record.value('ID')
105
+
106
+ def delModel(self, row):
107
+ record = self.record(row)
108
+ if str(record.value('deleted').toString()) == 'True':
109
+ self.emit(
110
+ SIGNAL("messageBox(QString)"),
111
+ "The model is deleting, please be patient!")
112
+ return
113
+ # Hint to decide what to delete.
114
+ text = '''You are going to delete the selected model entry.
115
+ Do you also want to delete all the model files on the disk?
116
+ Click "Yes" to delete model entry and model files.
117
+ Click "No" to delete model entry but keep model files.
118
+ Click "Cancel" to do nothing.'''
119
+ reply = QMessageBox.question(
120
+ None, 'Message', text, QMessageBox.Yes, QMessageBox.No,
121
+ QMessageBox.Cancel)
122
+
123
+ if reply == QMessageBox.Cancel:
124
+ return
125
+ else:
126
+ record.setValue('deleted', 'True')
127
+ self.changeRecord(row, record)
128
+
129
+ def delModelThread():
130
+ irowid, _ = record.value("ID").toInt()
131
+ if irowid in self.installThreads:
132
+ t, flag = self.installThreads[irowid]
133
+ if t.isAlive() and flag:
134
+ self.installThreads[irowid][1] = False
135
+ t.join()
136
+ if reply == QMessageBox.Yes:
137
+ destDir = str(record.value("path").toString())
138
+ try:
139
+ shutil.rmtree(destDir)
140
+ except Exception as e:
141
+ self.emit(
142
+ SIGNAL("messageBox(QString)"),
143
+ "Failed to remove dir: " + destDir)
144
+ print >> sys.stderr, str(e)
145
+ self.removeRow(row)
146
+ # End of Model deleting thread.
147
+
148
+ t = threading.Thread(target=delModelThread)
149
+ t.start()
150
+
151
+ def newEntry(self):
152
+ import random
153
+ rec = self.record()
154
+ for i in xrange(1, 10):
155
+ rec.setValue(i, QVariant(str(random.random())))
156
+ self.insertRecord(-1, rec)
157
+ doAlert(self.query().lastInsertId().toString())
158
+
159
+ def changeRecord(self, curRow, record):
160
+ # self.emit(SIGNAL("recordUpdated(bool)"), True) #record selection
161
+ self.setRecord(curRow, record)
162
+ # self.emit(SIGNAL("recordUpdated(bool)"), False) #restore selection
163
+
164
+ def installModel(self, installParam):
165
+ dest = installParam['dest']
166
+ # Make dir.
167
+ if not os.path.exists(dest):
168
+ try:
169
+ os.makedirs(str(dest))
170
+ except:
171
+ doAlert("Failed to create install directory: %s" % dest)
172
+ return
173
+ # Create entry in db.
174
+ rec = self.record()
175
+ rec.setValue('name', installParam['modelName'])
176
+ rec.setValue('status', 'Fetching Source...')
177
+ rec.setValue('path', dest)
178
+ rec.setValue('origin', installParam['source'])
179
+ rec.setValue('originMode', installParam['sourceMode'])
180
+ rec.setValue('date', QDateTime.currentDateTime())
181
+ rec.setValue('deleted', 'False')
182
+ self.insertRecord(-1, rec)
183
+ rowid = self.query().lastInsertId()
184
+
185
+ # Start thread.
186
+ def installThread(irowid):
187
+
188
+ # Find the current row in model.
189
+ def updateRecord(keyvalues):
190
+ curRow = None
191
+ # TODO: use binary search instead of linear
192
+ for i in xrange(0, self.rowCount()):
193
+ if self.record(i).value("ID") == rowid:
194
+ curRow = i
195
+ break
196
+ if curRow is not None:
197
+ record = self.record(curRow)
198
+ for key in keyvalues:
199
+ record.setValue(key, keyvalues[key])
200
+ self.changeRecord(curRow, record)
201
+ return curRow
202
+
203
+ def checkExit():
204
+ # Check thread is ok to run.
205
+ if irowid not in self.installThreads or not self.installThreads[irowid][1]:
206
+ return True
207
+ else:
208
+ return False
209
+
210
+ def markExit():
211
+ if irowid in self.installThreads: # Set thread to dead.
212
+ self.installThreads[irowid][1] = False
213
+
214
+ def statusMessageLogMarkExit(status=None, message=None,
215
+ exception=None):
216
+ if status is not None:
217
+ updateRecord({'status': status})
218
+ if message is not None:
219
+ self.emit(SIGNAL("messageBox(QString)"), message)
220
+ print >> sys.stderr, message
221
+ if exception is not None:
222
+ print >> sys.stderr, str(exception)
223
+ markExit()
224
+
225
+ # 1. Download or copy from local.
226
+ # Where the downloaded/copied zip file is:
227
+ destFile = os.path.join(str(dest), "model.zip")
228
+ # Where the unzipped contents are:
229
+ destDir = os.path.join(str(dest), "model")
230
+
231
+ if installParam['sourceMode'] == 'Local':
232
+ fin = fout = None
233
+ try:
234
+ inFile = str(installParam['source'])
235
+ total_size = os.path.getsize(inFile)
236
+ fin = open(inFile, 'rb')
237
+ chunk_size = 52428800 # 50MB as chunk size
238
+ fout = open(destFile, 'wb')
239
+ content = fin.read(chunk_size)
240
+ download_size = content_size = len(content)
241
+ lastMsg = ""
242
+ while content_size > 0:
243
+ # Check if thread is notified as exit.
244
+ if checkExit():
245
+ return statusMessageLogMarkExit()
246
+ fout.write(content)
247
+ if total_size > 0:
248
+ msg = 'COPY %.0f%%' % (
249
+ download_size * 100.0 / total_size)
250
+ else:
251
+ msg = 'COPY %d MB' % (download_size / 1048576)
252
+ if msg != lastMsg:
253
+ updateRecord({'status': msg})
254
+ lastMsg = msg
255
+ content = fin.read(chunk_size)
256
+ content_size = len(content)
257
+ download_size += content_size
258
+ except Exception as e:
259
+ return statusMessageLogMarkExit(
260
+ status=(
261
+ 'Failed copying from: %s'
262
+ % installParam['source']),
263
+ message=(
264
+ "Failed copy model: %s"
265
+ % installParam['modelName']),
266
+ exception=e)
267
+ finally:
268
+ if fin:
269
+ fin.close()
270
+ if fout:
271
+ fout.close()
272
+
273
+ elif installParam['sourceMode'] == 'Internet':
274
+ conn = fout = None
275
+ try:
276
+ conn = urllib2.urlopen(str(installParam['source']))
277
+ total_size = int(conn.headers['Content-Length'])
278
+ chunk_size = 1048576 # 1MB as chunk size
279
+ fout = open(destFile, 'wb')
280
+ content = conn.read(chunk_size)
281
+ download_size = content_size = len(content)
282
+ lastMsg = ""
283
+ while content_size > 0:
284
+ # Check if thread is notified as exit.
285
+ if checkExit():
286
+ return statusMessageLogMarkExit()
287
+ fout.write(content)
288
+ if total_size > 0:
289
+ msg = 'DOWNLOAD %.0f%%' % (
290
+ download_size * 100.0 / total_size)
291
+ else:
292
+ msg = 'DOWNLOAD %d MB' % (download_size / 1048576)
293
+ if msg != lastMsg:
294
+ updateRecord({'status': msg})
295
+ lastMsg = msg
296
+ content = conn.read(chunk_size)
297
+ content_size = len(content)
298
+ download_size += content_size
299
+ except Exception as e:
300
+ return statusMessageLogMarkExit(
301
+ status=(
302
+ 'Failed downloading from: %s'
303
+ % installParam['source']),
304
+ message=(
305
+ "Failed download model: %s"
306
+ % installParam['modelName']),
307
+ exception=e)
308
+ finally:
309
+ if conn:
310
+ conn.close()
311
+ if fout:
312
+ fout.close()
313
+ else:
314
+ return statusMessageLogMarkExit(
315
+ status='Unsupported source mode: %s'
316
+ % installParam['sourceMode'])
317
+
318
+ # 2. Unzip.
319
+ zfile = fout = None
320
+ try:
321
+ zfile = zipfile.ZipFile(destFile)
322
+ # Check property files.
323
+ if "model.ini" not in zfile.namelist():
324
+ return statusMessageLogMarkExit(
325
+ status=(
326
+ 'Missing model.ini in model file: %s'
327
+ % installParam['sourceMode']),
328
+ message=(
329
+ "Invalid modle file format because model.ini "
330
+ "is missing in the zipped model file, exit "
331
+ "installation for model %s"
332
+ % installParam['modelName']))
333
+ chunk_size = 52428800 # 50MB as chunk size
334
+ # Get file size uncompressed.
335
+ total_size = 0
336
+ for name in zfile.namelist():
337
+ total_size += zfile.getinfo(name).file_size
338
+ download_size = 0
339
+ lastMsg = ""
340
+ for i, name in enumerate(zfile.namelist()):
341
+ (dirname, filename) = os.path.split(name)
342
+ outDir = os.path.join(destDir, dirname)
343
+ if not os.path.exists(outDir):
344
+ os.makedirs(outDir)
345
+ if filename:
346
+ fin = zfile.open(name, 'r')
347
+ outFile = os.path.join(destDir, name)
348
+ fout = open(outFile, 'wb')
349
+ content = fin.read(chunk_size)
350
+ content_size = len(content)
351
+ download_size += content_size
352
+ while content_size > 0:
353
+ # Check if thread is notified as exit.
354
+ if checkExit():
355
+ return statusMessageLogMarkExit()
356
+ fout.write(content)
357
+ if total_size > 0:
358
+ msg = 'UNZIP %.0f%%' % (
359
+ download_size * 100.0 / total_size)
360
+ else:
361
+ msg = 'UNZIP %d MB' % (
362
+ download_size / 1048576)
363
+ if msg != lastMsg:
364
+ updateRecord({'status': msg})
365
+ lastMsg = msg
366
+ content = fin.read(chunk_size)
367
+ content_size = len(content)
368
+ download_size += content_size
369
+ fin.close()
370
+ fout.close()
371
+ except Exception as e:
372
+ return statusMessageLogMarkExit(
373
+ status=(
374
+ 'Failed unzipping from: %s' % installParam['source']),
375
+ message=(
376
+ "Failed unzip model: %s" % installParam['modelName']),
377
+ exception=e)
378
+ finally:
379
+ if zfile:
380
+ zfile.close()
381
+ if fin:
382
+ fin.close()
383
+ if fout:
384
+ fout.close()
385
+
386
+ # 3 Post process and check data validity.
387
+ try:
388
+ modelini = os.path.join(destDir, "model.ini")
389
+ cp = ConfigParser.RawConfigParser()
390
+ cp.read(modelini)
391
+ mosesini = os.path.join(destDir, 'moses.ini')
392
+ if not os.path.exists(mosesini):
393
+ raise Exception("Moses ini doesn't exist")
394
+ updateRecord({
395
+ 'srclang': cp.get("Language", 'Source Language').upper(),
396
+ 'trglang': cp.get("Language", 'Target Language').upper(),
397
+ 'mosesini': mosesini},
398
+ )
399
+ except Exception as e:
400
+ return statusMessageLogMarkExit(
401
+ status='ERROR model format %s' % installParam['source'],
402
+ message=(
403
+ "Unspported model format: %s"
404
+ % installParam['modelName']),
405
+ exception=e)
406
+
407
+ statusMessageLogMarkExit(
408
+ status='READY',
409
+ message="Model %s Installed!" % installParam['modelName'])
410
+ # Send new model signal.
411
+ self.emit(SIGNAL("modelInstalled()")) # Record selection.
412
+ return
413
+ # End of thread func.
414
+
415
+ # Start the thread.
416
+ irowid, _ = rowid.toInt()
417
+ t = threading.Thread(target=installThread, args=(irowid, ))
418
+ if irowid in self.installThreads: # If old thread is there.
419
+ print >> sys.stderr, (
420
+ "table rowid %d already has a thread running, stop it"
421
+ % irowid)
422
+ self.installThreads[irowid][1] = False
423
+ self.installThreads[irowid] = [t, True]
424
+ t.start()
mosesdecoder/mingw/MosesGUI/engine.py ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ import ConfigParser
4
+ import os
5
+ import subprocess
6
+ import sys
7
+
8
+ from PyQt4.QtCore import (
9
+ QObject,
10
+ SIGNAL,
11
+ )
12
+
13
+ from util import doAlert
14
+
15
+
16
+ class Engine(QObject):
17
+ def __init__(self, model, moses):
18
+ super(Engine, self).__init__()
19
+ self.model = model
20
+ self.moses = moses
21
+ self.check(self.model)
22
+ # Determine how many steps by num of modules in the model directory
23
+ # (moses + tok/detok + ...) + 1
24
+ modelini = model['path'] + os.sep + 'model' + os.sep + 'model.ini'
25
+ if not os.path.exists(modelini):
26
+ raise Exception(
27
+ "Model ini file doesn't exist, please check model dir %s"
28
+ % modelini)
29
+ cp = ConfigParser.RawConfigParser()
30
+ cp.readfp(open(modelini))
31
+ truemodel = None
32
+ try:
33
+ truemodel = cp.get("Preprocess", 'Truemodel')
34
+ truemodel_path = os.path.join(model['path'], 'model', truemodel)
35
+ if not os.path.exists(truemodel_path):
36
+ doAlert("Truemodel doesn't exist, ignore %s" % truemodel)
37
+ truemodel = None
38
+ except:
39
+ # doAlert("Truemodel not configured")
40
+ truemodel = None
41
+ self.cmds = []
42
+ # tok
43
+ self.cmds.append(
44
+ '"%s" -q -l %s -noxml'
45
+ % (self.moses.getTokenizer(), str(model['srclang']).lower()))
46
+ if truemodel is not None:
47
+ self.cmds.append(
48
+ '"%s" -model "%s"' % (self.moses.getTruecase(), truemodel))
49
+ self.cmds.append('"%s" -f moses.ini' % self.moses.getMosesCmd())
50
+ self.cmds.append('"%s"' % self.moses.getDetruecase())
51
+ self.cmds.append(
52
+ '"%s" -q -noxml -l %s'
53
+ % (self.moses.getDetokenizer(), str(model['trglang']).lower()))
54
+ self.process = []
55
+ # doAlert('\n'.join(self.cmds))
56
+
57
+ def check(self, model):
58
+ model_path_exists = os.path.exists(model['path'])
59
+ model_mosesini_exists = os.path.exists(model['mosesini'])
60
+ if not model_path_exists or not model_mosesini_exists:
61
+ raise Exception(
62
+ "Model file doesn't exist, please check model dir %s"
63
+ % self.model['path'])
64
+
65
+ def countSteps(self):
66
+ return len(self.cmds) + 1
67
+
68
+ def start(self):
69
+ # print >> sys.stderr, self.cmds
70
+ try:
71
+ self.emit(SIGNAL("stepFinished(int)"), 0)
72
+ for i, cmd in enumerate(self.cmds):
73
+ proc = subprocess.Popen(
74
+ cmd, shell=True, stdin=subprocess.PIPE,
75
+ stdout=subprocess.PIPE,
76
+ cwd=os.path.join(str(self.model['path']), 'model'))
77
+ self.process.append(proc)
78
+ if not proc.poll() is None:
79
+ raise Exception("Failed to start engine!")
80
+ proc.stdin.write("dummy\n")
81
+ proc.stdin.flush()
82
+ if len(proc.stdout.readline().strip()) <= 0:
83
+ raise Exception(
84
+ "Engine process exited: [%s] in folder [%s]"
85
+ % (
86
+ cmd,
87
+ os.path.join(str(self.model['path']), 'model')))
88
+ self.emit(SIGNAL("stepFinished(int)"), i + 1)
89
+ self.emit(SIGNAL("loaded(bool, QString)"), True, "Model Loaded")
90
+ except Exception as e:
91
+ self.emit(
92
+ SIGNAL("loaded(bool, QString)"), False,
93
+ "Failed to load Model: %s" % str(e))
94
+
95
+ def stop(self):
96
+ for process in self.process:
97
+ # doAlert(str(process.pid))
98
+ # print >> sys.stderr, str(process)
99
+ process.terminate()
100
+ process.wait()
101
+ self.process = []
102
+
103
+ def translate(self, input):
104
+ lastInput = input
105
+ try:
106
+ for i, proc in enumerate(self.process):
107
+ if not proc.poll() is None:
108
+ raise Exception("Failed to start engine!")
109
+ proc.stdin.write("%s\n" % lastInput)
110
+ proc.stdin.flush()
111
+ output = proc.stdout.readline().strip()
112
+ lastInput = output
113
+ return output
114
+ except Exception, e:
115
+ print >> sys.stderr, "Translate error: %s" % str(e)
116
+ return lastInput
mosesdecoder/mingw/MosesGUI/icon/moses.gif ADDED
mosesdecoder/mingw/MosesGUI/icon/moses.ico ADDED
mosesdecoder/mingw/MosesGUI/icons.qrc ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ <RCC>
2
+ <qresource prefix="/">
3
+ <file>icon/moses.ico</file>
4
+ </qresource>
5
+ </RCC>
mosesdecoder/mingw/MosesGUI/icons_rc.py ADDED
@@ -0,0 +1,1021 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Resource object code
4
+ #
5
+ # Created: Thu 11. Jul 13:17:57 2013
6
+ # by: The Resource Compiler for PyQt (Qt v4.8.4)
7
+ #
8
+ # WARNING! All changes made in this file will be lost!
9
+
10
+ from PyQt4 import QtCore
11
+
12
+ qt_resource_data = "\
13
+ \x00\x00\x3d\x4c\
14
+ \x00\
15
+ \x01\x08\x3e\x78\x9c\xed\xdd\x05\x98\x2c\x47\xd5\x06\xe0\x1b\x34\
16
+ \xb8\x07\x87\x20\x81\xe0\xee\x12\x82\xbb\xbb\xbb\xbb\x3b\x01\x82\
17
+ \xbb\xbb\xbb\xbb\x4b\x70\x77\xf7\xe0\xee\xee\xf5\xe7\x2d\x9e\x2f\
18
+ \xff\xa1\xe9\x99\xe9\xdd\x9d\xd9\xdd\x0b\xb7\xf2\x74\x76\xee\x4c\
19
+ \x4b\xd5\x91\xef\x7c\xe7\x54\x75\xf7\x8e\x1d\xbb\x1d\xf4\xdf\x7e\
20
+ \xfb\xed\x38\xe8\xff\x7b\xee\xd8\x7b\xf7\xdd\x76\xec\xb1\x63\xc7\
21
+ \x8e\xbd\x0f\xda\x0e\xfa\xca\x97\xfd\xfb\x7f\xb5\x83\xf6\xdb\x6b\
22
+ \x47\xdf\xd2\xda\x7f\x59\xfb\xe7\x3f\xff\xd9\xfe\xf1\x8f\x7f\xf4\
23
+ \xed\xef\x7f\xff\x7b\xfb\xdb\xdf\xfe\xf6\x6f\x9b\xef\xfc\x66\xbf\
24
+ \xb1\x2d\xc7\xd5\x63\xf3\xef\x1c\xb7\xab\xfd\x7f\x8b\xcc\xb6\xfa\
25
+ \xfa\xd1\x51\xf4\x33\x4b\xbf\x1b\xd9\xd2\x72\xbd\x5d\xf6\xf0\x2f\
26
+ \x39\x93\xc5\x56\x5c\x73\x96\xdd\xfd\xf1\x8f\x7f\x6c\xdf\xf9\xce\
27
+ \x77\xda\x47\x3e\xf2\x91\xf6\xda\xd7\xbe\xb6\x3d\xed\x69\x4f\x6b\
28
+ \xf7\xbf\xff\xfd\xdb\x2d\x6e\x71\x8b\x76\x9d\xeb\x5c\xa7\x6f\x37\
29
+ \xbc\xe1\x0d\xdb\x55\xaf\x7a\xd5\x76\xe9\x4b\x5f\xba\x5d\xfe\xf2\
30
+ \x97\x6f\x97\xbd\xec\x65\xfb\xf7\x37\xbf\xf9\xcd\xdb\xad\x6f\x7d\
31
+ \xeb\x76\xcf\x7b\xde\xb3\x3d\xf6\xb1\x8f\x6d\x2f\x7e\xf1\x8b\xdb\
32
+ \x7b\xde\xf3\x9e\xf6\x8d\x6f\x7c\xa3\xfd\xf6\xb7\xbf\x5d\x57\x7f\
33
+ \xb6\xba\x0d\xed\x77\x15\xe7\x5f\x75\x8b\xcf\x0d\xaf\xe5\xfb\x6f\
34
+ \x7f\xfb\xdb\xed\xed\x6f\x7f\x7b\x7b\xc2\x13\x9e\xd0\xee\x78\xc7\
35
+ \x3b\xb6\xab\x5c\xe5\x2a\xed\x02\x17\xb8\x40\x3b\xcb\x59\xce\xd2\
36
+ \x4e\x7d\xea\x53\xb7\x93\x9e\xf4\xa4\x6d\xaf\xbd\xf6\x6a\xe7\x38\
37
+ \xc7\x39\xda\xb9\xce\x75\xae\x76\xb2\x93\x9d\xac\x1d\xf9\xc8\x47\
38
+ \x6e\x7b\xee\xb9\x67\xbb\xc4\x25\x2e\xd1\x2e\x78\xc1\x0b\xb6\x0b\
39
+ \x5d\xe8\x42\xed\x04\x27\x38\x41\x3b\xea\x51\x8f\xda\xf7\x3f\xf9\
40
+ \xc9\x4f\xde\x4e\x74\xa2\x13\xf5\x7d\x4f\x7b\xda\xd3\xb6\xb3\x9f\
41
+ \xfd\xec\xed\xe2\x17\xbf\x78\xb7\x8f\x87\x3e\xf4\xa1\xed\x55\xaf\
42
+ \x7a\x55\xfb\xdc\xe7\x3e\xd7\xfe\xf0\x87\x3f\x8c\xf6\x75\x3b\x60\
43
+ \xc3\x2c\xfc\x5a\xd4\xb6\x43\xdf\xb5\x60\xfb\xb0\x2f\xbf\xfa\xd5\
44
+ \xaf\xda\xfb\xdf\xff\xfe\xf6\xd4\xa7\x3e\xb5\xdd\xee\x76\xb7\x6b\
45
+ \x97\xb9\xcc\x65\xba\x7e\x4e\x72\x92\x93\xb4\xa3\x1c\xe5\x28\xed\
46
+ \x10\x87\x38\x44\x43\x6d\xb2\x1d\xee\x70\x87\x6b\xe7\x3b\xdf\xf9\
47
+ \xba\x4f\x3f\xf9\xc9\x4f\x6e\x0f\x78\xc0\x03\xfa\xbe\x77\xbf\xfb\
48
+ \xdd\xfb\xe7\x0b\x5f\xf8\xc2\xfd\xb7\xf3\x9e\xf7\xbc\xed\xa2\x17\
49
+ \xbd\x68\xff\x9e\x9d\x1c\xf7\xb8\xc7\x6d\x97\xba\xd4\xa5\xda\x4d\
50
+ \x6f\x7a\xd3\x76\xa5\x2b\x5d\xa9\x9d\xf2\x94\xa7\x6c\xbb\xef\xbe\
51
+ \x7b\x3b\xde\xf1\x8e\xd7\xed\x6a\xdf\x7d\xf7\x6d\xd7\xba\xd6\xb5\
52
+ \x3a\xb6\xbc\xec\x65\x2f\x6b\xdf\xfa\xd6\xb7\x26\xf5\x7f\xb3\xda\
53
+ \x5f\xff\xfa\xd7\xf6\xa7\x3f\xfd\xa9\x73\x98\xb5\xb4\x55\xe3\xc5\
54
+ \x7a\xae\xff\x8b\x5f\xfc\xa2\x7d\xf0\x83\x1f\xec\x3a\xbf\xe5\x2d\
55
+ \x6f\xd9\xfd\x95\x9f\x1e\xf6\xb0\x87\xfd\x37\x5d\xd7\x8d\x1d\xec\
56
+ \xb6\xdb\x6e\xed\x48\x47\x3a\x52\x3b\xc3\x19\xce\xd0\x2e\x79\xc9\
57
+ \x4b\x76\xcc\x87\xfd\x77\xba\xd3\x9d\xda\x17\xbf\xf8\xc5\x76\xd7\
58
+ \xbb\xde\xb5\xed\xb1\xc7\x1e\x5d\xf7\x7c\x9e\xee\x61\x09\xbd\x1f\
59
+ \xf1\x88\x47\x6c\xe7\x3c\xe7\x39\xbb\xfe\x9f\xf2\x94\xa7\xb4\xfb\
60
+ \xde\xf7\xbe\xed\x50\x87\x3a\x54\x3b\xc2\x11\x8e\xd0\x63\x06\x4c\
61
+ \x39\xe6\x31\x8f\xd9\xed\x01\x46\xb0\x91\x07\x3f\xf8\xc1\xed\xad\
62
+ \x6f\x7d\x6b\xfb\xd1\x8f\x7e\xb4\x70\x4c\xab\x94\x97\x46\xef\x7f\
63
+ \xf9\xcb\x5f\x36\x3d\x3e\xaf\xb7\x0d\xb1\x8a\xfd\x7e\xf3\x9b\xdf\
64
+ \x6c\x2f\x7f\xf9\xcb\xdb\x5d\xee\x72\x97\x8e\xbf\x30\x7a\xa8\x67\
65
+ \x3a\xa6\xeb\x6c\xfe\x5d\x7f\x3f\xe4\x21\x0f\xd9\x8e\x73\x9c\xe3\
66
+ \x74\x5d\x9e\xf9\xcc\x67\x6e\xc7\x38\xc6\x31\xda\x35\xae\x71\x8d\
67
+ \xf6\xa0\x07\x3d\xa8\x5d\xec\x62\x17\x6b\xd7\xbe\xf6\xb5\xbb\xdf\
68
+ \xc3\x89\xf3\x9f\xff\xfc\xed\xc6\x37\xbe\x71\xbb\xe2\x15\xaf\xd8\
69
+ \xae\x7f\xfd\xeb\x77\x6c\x81\x15\x78\x82\xd8\xa2\x0f\xfe\x7e\xf2\
70
+ \x93\x9f\x6c\x8f\x7b\xdc\xe3\x3a\x4e\x88\x33\xf0\x85\x3d\xb0\x25\
71
+ \x58\x84\x43\x3c\xef\x79\xcf\xeb\x31\x82\x0f\x0e\xc7\xb8\xcc\xb6\
72
+ \x2a\x8c\xd9\x2c\x0c\x18\xea\x9d\xcd\x7e\xfe\xf3\x9f\x6f\xcf\x79\
73
+ \xce\x73\xda\xcd\x6e\x76\xb3\x76\x8a\x53\x9c\x62\xd4\xb7\xe9\x75\
74
+ \xa8\xeb\x31\xdb\xf0\x97\x0e\x61\xbc\x73\xc2\x8e\xc3\x1f\xfe\xf0\
75
+ \x5d\xdf\x62\xfc\x73\x9f\xfb\xdc\xf6\xec\x67\x3f\xbb\x9d\xea\x54\
76
+ \xa7\x6a\x47\x3b\xda\xd1\xda\xa1\x0f\x7d\xe8\xce\x09\x5e\xf8\xc2\
77
+ \x17\xb6\xc7\x3f\xfe\xf1\x1d\xe7\xc5\x02\xba\xbd\xf3\x9d\xef\xdc\
78
+ \xfb\xc6\xb7\xbe\xf7\xbd\xef\x75\xfb\x80\x1d\x30\xe9\x46\x37\xba\
79
+ \x51\xb7\x05\xe7\xb1\xef\x09\x4f\x78\xc2\x8e\x37\xb0\xe3\x13\x9f\
80
+ \xf8\x44\xfb\xcd\x6f\x7e\xf3\x1f\x63\x5e\x86\xdc\x56\xd1\x36\x72\
81
+ \xee\xb5\x1c\x57\xf3\xc7\x3f\xff\xf9\xcf\x3d\x86\xe2\x56\x57\xbe\
82
+ \xf2\x95\x3b\x6e\x8f\xf9\xf8\x22\x9d\x8f\xe9\x9f\xbe\xe9\xf1\x81\
83
+ \x0f\x7c\x60\xf7\x6f\x71\x9b\xbe\xe8\xf5\x8c\x67\x3c\x63\xbb\xe6\
84
+ \x35\xaf\xd9\xf1\xe1\x36\xb7\xb9\x4d\xd7\x29\x5c\x3f\xf6\xb1\x8f\
85
+ \xdd\x7f\xbb\xee\x75\xaf\xdb\x79\x86\xf8\x80\x43\xbe\xeb\x5d\xef\
86
+ \xea\xfd\xfe\xf5\xaf\x7f\xdd\xf1\x5e\x1c\xb2\xaf\xdf\xe8\x5b\xbe\
87
+ \x21\xbe\x1c\xff\xf8\xc7\xef\xd7\xc6\x29\xd9\x1c\x3b\x60\x3b\xc9\
88
+ \x23\x36\xaa\xbf\x70\xe2\xed\xd2\xd6\x3a\x9e\xe8\x9e\x2f\xfd\xf8\
89
+ \xc7\x3f\x6e\x6f\x7b\xdb\xdb\xba\xac\xe1\x73\xf5\xf3\x21\x9f\x5b\
90
+ \xeb\xc6\x06\xc4\x6d\x9c\x9f\x5e\xc5\x90\x67\x3e\xf3\x99\xed\x63\
91
+ \x1f\xfb\x58\xbb\xdc\xe5\x2e\xd7\xf1\x05\xaf\xe3\xb7\x30\xfb\xe9\
92
+ \x4f\x7f\x7a\xd7\x97\x7f\xc3\x07\x3e\xbd\xff\xfe\xfb\x77\x9d\xe2\
93
+ \x11\x6f\x7c\xe3\x1b\x3b\xa6\xcb\x0b\xdf\xfc\xe6\x37\xb7\x1b\xdc\
94
+ \xe0\x06\x3d\xae\xd8\x17\x2f\x84\x19\xf0\x04\x1f\x10\x5f\xf6\xd9\
95
+ \x67\x9f\x7e\xfd\xc3\x1c\xe6\x30\xfd\x33\x0c\x92\xb3\xb0\xf7\x5a\
96
+ \x8b\xda\xd9\xdb\x54\xbe\x5b\x6b\x36\xbf\xfb\xdd\xef\x7a\x8c\xe4\
97
+ \x5f\x62\xf4\x7a\xfd\x7c\x8a\xff\xd3\xe9\xdd\xee\x76\xb7\x9e\xf7\
98
+ \xf9\x37\x7c\x16\xf7\xe9\xe3\x4c\x67\x3a\x53\xe7\x7b\x36\xbf\xa9\
99
+ \x15\xe8\xd7\x93\x9e\xf4\xa4\xae\x57\x78\x0e\x3f\x1e\xf9\xc8\x47\
100
+ \xf6\x3e\x7f\xff\xfb\xdf\xef\xc7\xca\x37\x70\x3f\x9c\x51\xbc\x60\
101
+ \x1f\xe2\x0a\xdb\xe1\xef\x6a\x11\x7e\xc3\x13\x8c\x8f\x6d\xbb\x86\
102
+ \x7a\x03\x7b\xff\xf9\xcf\x7f\xde\xed\x7f\xbb\xe4\x5c\xb3\xda\xb2\
103
+ \x6c\x34\xb5\x12\x63\xc6\xe9\xe5\x63\x64\xc5\xff\xa6\xc6\xf4\xf5\
104
+ \x6e\xf0\x58\x6d\x80\x0f\x9e\xfe\xf4\xa7\xef\x7c\x4d\xbc\x17\xbf\
105
+ \x4f\x7c\xe2\x13\xb7\x8b\x5c\xe4\x22\xed\x6a\x57\xbb\x5a\xc7\x73\
106
+ \x7c\x01\x36\x5c\xef\x7a\xd7\xeb\x75\x21\xc7\xd8\x1f\x6e\xfc\xfe\
107
+ \xf7\xbf\x6f\xaf\x7c\xe5\x2b\x7b\x3e\x81\x27\xc0\x77\xbf\xab\x0d\
108
+ \xe0\x8c\xf2\x8b\x97\xbc\xe4\x25\xed\x67\x3f\xfb\x59\xd7\x2b\x3b\
109
+ \x7a\xcd\x6b\x5e\xd3\xde\xf7\xbe\xf7\xb5\x7b\xdf\xfb\xde\x07\xe7\
110
+ \x10\x62\xc6\xed\x6f\x7f\xfb\xf6\xb5\xaf\x7d\xad\x63\x41\xec\x60\
111
+ \x3b\xb6\x65\xe8\x3f\x3e\xcf\x27\xe4\xef\x57\xb8\xc2\x15\xba\x3f\
112
+ \x90\xc7\x2a\xf5\x5e\xf3\x00\xbe\xbd\xf7\xde\x7b\xb7\x87\x3c\xe4\
113
+ \x21\x9d\x5b\xba\x3e\xdb\xc3\xf9\x70\x82\x4f\x7f\xfa\xd3\xdd\xe7\
114
+ \x63\x93\x47\x3f\xfa\xd1\x3b\xe7\xbf\xdf\xfd\xee\xd7\x6b\x05\x62\
115
+ \xc6\x57\xbf\xfa\xd5\x9e\x1f\xca\x4b\x7c\x56\x3f\x60\x03\x74\xca\
116
+ \x1e\xc4\x05\xba\x94\xbf\xf8\xcb\xc7\xdf\xfd\xee\x77\x77\xdb\x11\
117
+ \x47\x60\x01\xbe\x01\x57\xc4\x24\xf9\x82\xfa\x01\x3e\xb1\x5d\x6a\
118
+ \x47\xcb\x6c\x95\xe3\xa9\xdd\xf0\x79\x31\x97\x2e\xe8\x64\x59\x58\
119
+ \x3f\x25\x16\xb8\x96\x9a\x01\xde\x87\x0b\x88\xc9\x67\x3d\xeb\x59\
120
+ \x7b\x9c\x86\x01\x70\x01\x8f\xbb\xd7\xbd\xee\xd5\xe3\x3c\x3e\xc8\
121
+ \x46\xc4\x77\xbc\x8e\xef\xc3\x6d\xc7\xc3\x08\xdc\x00\x5f\x64\x0b\
122
+ \xf8\xe4\xd5\xaf\x7e\xf5\x9e\x1b\x6a\xe1\x66\xef\x7c\xe7\x3b\x3b\
123
+ \xb7\x3c\xd6\xb1\x8e\xd5\xed\x6a\xbf\xfd\xf6\x6b\x5f\xff\xfa\xd7\
124
+ \x7b\x4e\xcb\xc6\xf4\x01\x36\xc9\x2d\x52\x43\x9a\x67\x03\x3b\x93\
125
+ \x6d\x54\xdc\x30\xb6\x3b\xdc\xe1\x0e\x3d\xee\x46\xe7\xd9\x36\x4b\
126
+ \xf7\x7c\x54\x4d\x97\xee\x60\x3f\xfb\xa3\xef\x7b\xdc\xe3\x1e\x3d\
127
+ \xbe\xe3\x06\xe2\xb3\x98\x40\x3f\xb7\xbd\xed\x6d\x7b\x5c\x90\x8f\
128
+ \xa4\xae\xf3\xfa\xd7\xbf\xbe\xd7\x07\xd8\x0b\x7c\x10\xd7\xd5\x10\
129
+ \x1e\xfd\xe8\x47\xb7\x0f\x7f\xf8\xc3\x07\xf3\x7b\xb5\x8b\x47\x3d\
130
+ \xea\x51\x3d\x27\x90\x73\xa8\x09\x88\x21\xae\x0f\x53\x6c\x7e\x77\
131
+ \x1c\x99\x38\x97\xba\xd2\x7b\xdf\xfb\xde\x83\x6b\xdd\xdb\x35\x1e\
132
+ \x4c\x69\xb1\x61\x7f\xc9\x45\x6c\xe5\x73\xd1\xc7\x66\xe8\x7d\xb8\
133
+ \xc1\xf9\xf3\x9c\xe7\x3c\x3d\x3e\x8b\x01\xf8\x9b\x4d\x4c\x10\x8b\
134
+ \xdf\xf0\x86\x37\x74\xee\x47\xa7\xf2\x4f\x18\x4d\x27\xaf\x7e\xf5\
135
+ \xab\x7b\x0e\x2f\xb6\xb3\x17\xf3\x06\xf8\xde\xf3\x9f\xff\xfc\x8e\
136
+ \x65\xc6\xe5\x9c\xa9\xf5\xe0\x36\x62\x06\x9f\x87\xf1\xec\xe7\x19\
137
+ \xcf\x78\x46\xaf\x13\xf0\x75\xdf\xb1\x3f\x38\x23\x57\x10\x0f\x70\
138
+ \x50\x71\x04\x56\x38\x77\xec\x68\x59\x36\xb0\x99\x79\x46\xfa\x4c\
139
+ \x1e\x64\x8a\x2b\xc3\x3a\x3a\xd8\x68\x3e\xb7\x96\x2d\xd7\xc2\xb5\
140
+ \xc4\x69\xfc\x5c\xbd\x16\x56\xf3\x59\xf5\xbe\xd4\x76\xc4\x61\x1c\
141
+ \x8e\xbf\xde\xea\x56\xb7\xea\xf5\x22\x3a\x11\xd3\x3f\xf5\xa9\x4f\
142
+ \xb5\x0f\x7c\xe0\x03\xfd\x37\xfa\x71\x0c\x9d\xe1\x10\xc6\x86\x1b\
143
+ \x04\xbb\x0f\x3c\xf0\xc0\x6e\x5b\xb0\xee\x61\x0f\x7b\x58\xd7\xbd\
144
+ \xfd\xcf\x76\xb6\xb3\x75\xde\xa0\x06\xf1\xac\x67\x3d\xab\xc7\x0e\
145
+ \xf6\xa5\xc6\xa0\x6f\xce\x81\x6f\x8a\x37\xe6\x1a\x1e\xf3\x98\xc7\
146
+ \xf4\xbc\xb8\xca\x73\x23\x6d\xb3\xf4\x9f\xbe\xaa\x77\x99\x3f\xc5\
147
+ \x77\x86\xfa\x58\x35\xd6\x0f\xf1\x85\x7f\xcb\xdd\xc8\x18\xef\xf0\
148
+ \x1d\x7b\x3c\xdd\xe9\x4e\xd7\xf5\x40\xaf\x62\x33\xff\xe3\x97\xec\
149
+ \xc3\xfc\x2f\xcc\x92\x33\xbe\xe3\x1d\xef\xe8\x39\x2a\xbd\xe2\x71\
150
+ \x74\x06\xaf\x71\x57\xc7\xca\x07\xd3\xe4\x93\xf4\x27\x3f\xc0\x25\
151
+ \xd5\x8b\xd9\x48\x6c\x4d\x8e\x20\x37\x94\x8b\xc8\x2d\xf0\x60\xf1\
152
+ \xc8\xfe\xae\xe5\xdf\x62\x90\x3a\x85\xfe\x9a\xcb\xae\x72\x5d\x6f\
153
+ \xdb\x0c\xdd\xe7\x1a\xb8\xac\xba\x2a\x39\x6d\x15\xde\xb3\x35\x35\
154
+ \x3b\x9c\x4e\x4e\x47\x97\xf4\xca\xd7\xc5\x6e\x71\x80\x0d\x88\xbd\
155
+ \x62\x3c\xae\x27\x3f\x83\x11\x62\x02\xcc\xc0\xed\x70\xf7\xd7\xbd\
156
+ \xee\x75\x5d\xa7\x70\x5f\x1d\x48\x4c\xb8\xcf\x7d\xee\xd3\x31\x04\
157
+ \x2f\x64\xeb\xc6\x8c\xd7\xb1\x79\xfb\xb1\x0f\x1b\xbb\xc2\x23\xd4\
158
+ \x96\xd4\x20\xd8\x8c\x3e\xe0\x94\x70\x40\x0c\x91\x3f\xfa\x37\x1b\
159
+ \x30\xcf\x04\x3b\x70\x05\x36\x20\x46\xa8\x17\x69\xf3\x6c\x60\xab\
160
+ \x79\x61\xae\x4f\x16\x7c\x40\x5d\x24\x7a\xd8\x2c\x8e\xe7\x2f\x7e\
161
+ \xaf\x06\x63\x93\xc3\xf3\x3f\xfa\xf7\x1b\xdf\x66\x07\xf4\x27\xdf\
162
+ \xc3\xf7\xc8\x18\x26\xf0\x45\xf3\x8b\x70\x1d\xe6\xe3\x80\x7c\xfe\
163
+ \x2d\x6f\x79\x4b\x7b\xc4\x23\x1e\xd1\xbf\x83\x23\x7c\xd8\x5f\xf1\
164
+ \x5c\x5c\x48\x5d\x1f\x3f\x64\x43\xf8\x1c\x2e\x01\xeb\xd9\x15\x8c\
165
+ \xc7\x11\xe8\x14\x0f\x14\x0f\xf4\x0b\xc7\x80\x09\xea\x84\x7c\x1e\
166
+ \x3e\xe1\x84\xe6\x1b\xe5\x83\xf6\x87\x47\xe2\x81\x79\x49\xf3\x0d\
167
+ \xda\x76\xe4\x84\x89\x2d\x6a\x63\xec\xf9\x34\xa7\x39\xcd\xa6\xea\
168
+ \x3e\xfa\x97\x4b\x91\x29\x79\x92\x39\x9f\xe5\x73\x70\x00\x47\xa3\
169
+ \xcf\x2f\x7c\xe1\x0b\x07\xf3\x11\xf5\x5a\x3a\x81\x05\xb8\x9a\xfe\
170
+ \xb2\x5b\xb8\xad\x5e\xf3\xa1\x0f\x7d\xa8\xaf\xf7\x70\x2e\x76\xe3\
171
+ \x7b\xbe\x8c\x1b\x8a\x6b\xce\x25\xcf\xff\xe9\x4f\x7f\xda\xf9\x02\
172
+ \x9f\x75\x5e\xe7\x82\x0f\x70\x03\xde\xc3\x18\x3e\xef\x77\xf5\x65\
173
+ \x36\xc5\x36\x60\x0d\x2c\x72\x7e\xd8\xc4\x56\x61\x07\xdb\xc1\x45\
174
+ \x7c\x76\x2d\x58\xc4\x06\xf0\x81\xcd\xae\x17\x2f\xca\x43\x52\xd3\
175
+ \xc3\xf5\x5e\xfa\xd2\x97\x76\x99\x56\x7f\xdc\x2c\xac\x27\x77\xdc\
176
+ \xfa\xe1\x0f\x7f\x78\x7b\xc5\x2b\x5e\xd1\xf5\xca\xef\xd9\x04\x1c\
177
+ \xa6\x7b\x35\x39\xb9\x08\x0e\xc7\x26\xe4\x83\x38\x97\xbc\xfd\x26\
178
+ \x37\xb9\x49\xf7\x3f\xba\xe3\x9b\xd6\x75\xf0\x6f\x1c\x8e\xfe\xe8\
179
+ \x49\x7c\x36\xe7\xc3\x7e\xe4\x04\xea\x76\xf2\x3c\x71\x9a\x7d\xe0\
180
+ \xf7\xf4\xed\xba\x7c\x37\xb1\x85\x6f\xcb\x31\x61\x07\xac\x61\x63\
181
+ \x74\x8b\x1b\xb3\x2f\xd7\xc4\x35\x3f\xfe\xf1\x8f\x77\x3b\x82\x53\
182
+ \x7e\x7f\xe2\x13\x9f\xd8\xf3\x50\x7d\x65\x03\xe2\xd3\x2f\x7f\xf9\
183
+ \xcb\x4d\xad\x11\xcd\x5a\x7b\x95\xe6\x37\x73\xb6\xf2\xe2\x60\xfe\
184
+ \x66\xc7\x7a\x58\x0f\x9f\xc9\x29\x98\x29\x4e\xe3\xda\xe2\xaf\x39\
185
+ \x1a\x72\xe3\x3f\x78\xb5\x3a\x1c\x9d\x90\x29\xdb\x60\x37\x7c\xdb\
186
+ \xdc\x1e\xb9\xd3\x05\x1c\xb7\x2f\x7d\xb0\x05\x1c\x2d\xeb\xc3\xc4\
187
+ \x7c\xf6\x2e\xe6\x3b\x0f\xff\xd5\x07\x98\x4d\xa7\xf2\xc4\xc4\x6f\
188
+ \xe7\xb7\x7e\xc0\xbc\x90\x7e\xe0\x23\xbe\x97\x03\xb2\x3b\x6b\x11\
189
+ \xd8\x9b\x98\xe9\x9c\x6c\xc8\xbf\x71\x82\x17\xbd\xe8\x45\xed\x27\
190
+ \x3f\xf9\x49\xe7\x8b\x6c\xc7\xf7\xfa\x0e\x67\xd5\x16\xb7\x3a\xe6\
191
+ \xa7\x96\xaf\x9e\x8b\x47\x6f\x26\xde\xd7\xf8\x02\xe7\xd5\xd5\xe4\
192
+ \x6d\xfc\x3e\xb5\x1c\xb9\x1e\x99\x27\x37\x53\xaf\xa5\x8b\xf0\x42\
193
+ \x98\x8a\xe7\xd3\x15\xdd\xc2\x5a\xf1\x82\x1d\xa8\xf5\x8a\xcd\xe2\
194
+ \x86\xf8\x40\x2f\x6c\x02\x1f\xfb\xc1\x0f\x7e\xd0\x75\xc0\x3f\xe1\
195
+ \x39\x9c\x97\xdf\xd1\x69\x62\x83\x9a\xa0\xf3\xb8\x1e\x6c\x4a\x6e\
196
+ \x0f\xfb\x71\x44\xfa\xf4\x5d\x70\x0b\xd6\xc0\x27\xb9\x20\x0e\xc2\
197
+ \xae\x60\x93\x31\x99\x13\x57\x37\x4d\x5e\xe0\xba\xea\xe8\xf3\xfc\
198
+ \x72\xd5\x2d\xb8\xf0\xe5\x2f\x7f\xb9\xcb\x1b\xce\x6e\x36\xcf\xcf\
199
+ \x5c\x8a\x2d\x79\x9b\xfa\x2b\x6c\xc6\xa7\xe9\x41\xee\xa6\xa9\xdd\
200
+ \xf2\x27\xdc\x4d\x5e\xe2\x18\x78\x8f\xdb\xc9\xe1\xcc\xc9\xc1\x61\
201
+ \xfc\xeb\x4d\x6f\x7a\x53\x8f\x23\x6a\x41\x62\x31\xdf\x56\xf7\xa1\
202
+ \x37\x3e\x4f\xf6\x74\xcb\xef\xf1\x0d\x36\x41\x67\xae\xef\xdf\xf0\
203
+ \xc7\x6f\x8e\x11\x17\xd4\xf9\xfc\x25\x23\xf5\xbf\x73\x9f\xfb\xdc\
204
+ \xbd\x76\xa0\x66\x84\x17\x58\x3f\x64\x8d\x31\xdb\x60\xcb\x6a\x47\
205
+ \x6a\x48\x62\x0d\x9d\xe3\xa6\xea\x0a\x7c\x9f\xcd\xc3\x22\x36\x21\
206
+ \xfe\x6c\x85\x0d\x84\x83\x98\xdb\xc0\xa3\xf5\x71\x33\x75\x9f\xeb\
207
+ \x90\x27\xd9\xc8\xa3\xf8\x0a\xbf\x16\x83\x6c\xb0\xdd\xfa\x3e\x7a\
208
+ \xd7\x3e\xfb\xd9\xcf\x1e\xbc\x5e\x93\xce\xf1\x72\xfb\xc0\x08\x5c\
209
+ \x1f\xdf\x23\x7f\x75\x5a\xfe\xce\x3f\xad\x23\x16\xff\xc5\x74\xf1\
210
+ \x9f\x4f\x92\xb7\x7c\x4c\x2c\xc1\xf1\xd8\x0c\x8c\x87\x21\xfc\xd2\
211
+ \x9a\x73\x36\x03\x07\xe4\x22\xfa\xe2\x7a\xfc\x57\x8d\x09\x27\xe0\
212
+ \xf3\x6c\x50\xdf\xd9\x48\x74\x29\xf7\xc3\x9f\xd8\x99\x86\x7f\x8a\
213
+ \x11\xe6\x06\xc4\x06\xfc\x80\x7d\xaa\x5b\x8b\x51\x1f\xfd\xe8\x47\
214
+ \x3b\xff\xdc\xec\x39\x23\xd7\xd2\x5f\xbc\xc7\xf8\x37\x63\xfe\x6e\
215
+ \xa8\xfb\xe0\x3f\x1d\xa9\x97\xc2\x61\x3e\x06\x3f\xe9\x14\x36\xe0\
216
+ \x4b\x64\x63\xde\x49\x2c\x87\x9d\x74\x4d\xf6\xb0\x41\x5c\xe5\x87\
217
+ \x74\x8b\x3f\xc0\x01\xbc\x81\x5f\xf2\x35\x18\x22\x4e\xc0\x70\x39\
218
+ \x9d\xf8\x01\x1b\xd8\x87\x3c\x8e\x6e\xc4\x75\x7a\x63\x7b\x7c\xd7\
219
+ \x31\xe2\x86\x7c\x1f\x4f\xe0\xeb\xfa\xe3\x7b\xb1\x9e\x8d\xe9\x17\
220
+ \x8c\x10\x5b\x70\x14\xf9\x83\x7a\xaf\x79\x28\xd7\xca\x1c\x12\x9d\
221
+ \xbf\xe0\x05\x2f\xe8\xfa\x37\x37\x69\x2e\xc9\x6f\x38\x25\x1b\x32\
222
+ \x0f\xf1\xdd\xef\x7e\x77\xd3\x72\x82\xe4\x02\x74\x6f\x4e\xdb\x98\
223
+ \xc9\x79\xb3\xf2\xfb\xcc\xe3\xf0\x5d\x98\x4a\x47\xfc\x8e\x8f\x91\
224
+ \x2f\xdc\xa4\x3b\x18\x8c\x67\xf3\x57\x0d\xe7\xe7\xc3\xe4\x25\xe6\
225
+ \xaa\xef\xc0\x50\x7e\x69\x2e\x5f\x9d\x47\x5c\xe0\xc7\xec\x03\xf6\
226
+ \x8b\xf5\x78\x1c\xfd\xb3\x71\xb9\x99\x58\xc7\x8f\x8d\xdb\x46\xaf\
227
+ \xc9\xf9\x9d\x03\x67\xf3\x9d\x73\xd9\x5f\xff\xe4\x8b\x38\x88\x5a\
228
+ \x23\x3b\xcb\x3d\x28\xae\xef\x1c\xee\x53\x81\x29\xe6\x7d\xd8\x8f\
229
+ \x63\xd8\x42\xf4\xf9\x99\xcf\x7c\xa6\x73\x1b\xb5\x09\x6b\x96\xf1\
230
+ \x41\x73\x90\xe1\x2c\xc6\x5c\xd7\x16\xae\x5a\xff\xf8\x9e\x75\x6c\
231
+ \xc6\x9a\xf9\xdb\xcd\x8a\xf7\xf4\x0f\x53\x71\x3b\xfa\x97\x3b\x91\
232
+ \x2d\x8e\x84\x7f\xf2\x47\xfc\x4f\xfd\xc1\x67\x6b\x2f\xf0\x34\x7a\
233
+ \xe6\xfb\xfa\xcc\xbf\x60\x85\x5a\x9b\x18\xed\x2f\x1d\xc2\x5c\xbe\
234
+ \x08\x57\xb3\xc6\x1f\x36\xb8\x06\xbf\xa4\x1b\xb8\xce\x86\xc4\x04\
235
+ \x35\x1a\x75\x1c\xb6\x61\x5f\x5c\x82\x2d\xa9\x0f\xe3\x79\xfc\x1b\
236
+ \xd6\xdb\xdf\x1c\x8f\x3c\x02\xcf\x13\x2b\x53\x5f\x84\x21\xf4\xa9\
237
+ \xe1\x10\x6c\x4d\xfe\xa0\x25\xe7\x76\x8f\x09\x2e\xe9\x5a\x38\x28\
238
+ \x4c\xf1\x9d\x3e\xe4\x3e\x16\xf1\x03\x27\x59\xf5\x9a\x50\x4d\xcc\
239
+ \x87\x47\xc1\xfc\x55\xfb\x7e\xce\x2f\x9e\xd2\x5d\xe4\x44\x9f\xc6\
240
+ \x2e\xaf\x17\x27\xc9\x18\x46\x93\x39\x8e\x45\x3f\x9a\x79\x3b\xeb\
241
+ \x0a\x7d\xcf\xdf\xc4\x0a\x18\x6c\x5f\xf2\x17\x93\x61\x35\x7e\xc0\
242
+ \x8f\xf1\x08\xbc\x8f\x5d\x88\xcd\xf8\x80\xbc\x9f\x0d\xd0\x2b\xbf\
243
+ \x65\x63\x62\xbd\xdf\xe8\xc4\x6f\x7c\x9e\xaf\xf3\x47\xf6\xe8\x18\
244
+ \xf5\x61\x7e\x2f\xb6\xf8\xec\xdc\xf4\x96\x35\xc8\xf8\x09\x3e\x29\
245
+ \x3e\xc1\x2c\xfb\x7c\xe5\x2b\x5f\x39\x58\xde\x91\xb9\x35\x42\xe6\
246
+ \x0b\xc8\x00\x27\x34\x0f\x2d\xa7\x61\xe3\x59\xaf\x2c\x3e\xac\x8a\
247
+ \x0b\xe6\x9c\xe2\x11\xdc\xc7\x8d\x56\x99\xeb\xd5\x39\x9c\x60\xbe\
248
+ \xdc\x57\x4d\x8c\xfe\xc4\x51\x9b\x71\xab\xa1\xf1\x53\xbe\xcb\xc7\
249
+ \xd8\x84\x38\x4e\x8e\x64\x2b\xaf\x17\x8f\xe9\x8c\xce\x61\x02\x59\
250
+ \x93\x27\x1c\x93\x13\x90\x27\xfb\xa1\x43\xfa\x91\xdf\x99\xbf\x10\
251
+ \xbb\xc5\x1a\xf1\x56\x9e\xc8\xcf\x1c\x27\xd7\xe0\xbf\xb0\x82\xcf\
252
+ \x8b\x39\xfa\x62\x5f\xbf\xb9\x1e\x39\xc9\xe9\xe9\x48\x6c\x62\xaf\
253
+ \xec\x4d\xae\xc8\xbe\x60\x8c\x3a\x15\xbf\xe5\xf3\xf0\x05\x76\x64\
254
+ \x0e\x79\xb8\x26\x1e\x3e\x89\x4d\x6c\xdd\x71\x6c\xd8\x5a\x23\xb8\
255
+ \x07\x13\x71\x51\x3c\xa2\xea\x6b\x99\xfa\x87\x47\xea\x9d\xea\x23\
256
+ \x74\xc4\xff\x37\x03\xf3\xf1\x1c\xb1\x0e\x67\x83\xa9\xe4\xa8\x7e\
257
+ \xcf\xaf\xf1\x7e\xb2\xcd\xba\x0a\x36\x22\x86\x8b\xd1\xe2\x14\x59\
258
+ \xcb\xeb\xe8\x86\x4e\xe8\x90\xdf\xe0\x89\x62\x2a\x1b\x71\x1f\x87\
259
+ \xdc\x3b\x73\xff\xf2\x3a\xf2\x85\x19\x6a\x82\xf2\x3a\xf8\x0e\xc7\
260
+ \x71\x48\x7e\x0d\x73\x6c\x6a\x4b\x78\x24\xfb\x63\x5b\xce\x2f\x1e\
261
+ \xc1\x19\x75\x22\x78\xc1\xc7\xd9\x88\xf3\xe1\x7b\x62\x0e\x2c\xd2\
262
+ \x27\xfa\xa2\x7f\x3c\x03\xb6\xb1\xc7\x59\xbe\xe7\x37\xf8\x82\x7f\
263
+ \xb2\x4d\x73\x91\x62\x5b\xea\xd1\x70\xc9\x9a\x25\xf9\xc0\xb2\x75\
264
+ \xaf\xc1\x28\x31\x77\xd5\xb8\x2f\xa7\xe3\x0b\x30\x3e\xb5\x3c\xb2\
265
+ \x81\xa9\xf4\x8e\xef\xb3\x01\x7c\x4b\x1d\x56\x7c\xa6\x67\xba\x12\
266
+ \x57\xf9\x2a\xdb\x50\x97\xa5\x4f\xf2\xce\xbd\x1d\xe2\xb7\x79\x14\
267
+ \x9c\x4a\xbe\x0d\x4b\x5c\x0b\x87\x67\x17\xec\x81\x4e\xe4\x35\xa9\
268
+ \xdd\xe2\x82\xae\xed\xdf\x7c\x9e\x2d\x88\xc7\xae\x81\x53\xc2\x1f\
269
+ \x78\xa8\x2f\xec\xc6\x39\xe5\x99\x7c\xd5\xbe\xfe\xc2\x14\xb6\x03\
270
+ \x97\x60\x3f\x7d\xc9\x19\xe8\x4f\x9d\xc9\x58\x61\x85\x7f\x8f\xdd\
271
+ \x6f\xae\x99\x63\xc6\x0d\xc5\x1c\xb5\x4c\x35\x37\xb9\x80\x73\xaa\
272
+ \x65\x90\x1d\x4c\xc4\x11\xab\xde\x96\xa5\x7f\xf7\xdf\xf1\xc1\xe0\
273
+ \xf1\xaa\xe2\x3c\x7d\xc0\x64\x7c\xd8\x3c\x4e\xd6\x6d\xd2\xb7\x18\
274
+ \xcd\x3f\xe1\x2e\xac\x65\xf3\xf2\x6d\xba\x54\x7b\x81\x15\xe2\x00\
275
+ \x4e\x25\xc7\xa2\x17\xf2\x17\x37\xd4\xd1\xc5\x4e\x18\xc6\x9e\x70\
276
+ \x18\x7c\x9e\xff\x9b\x63\x87\x19\x6c\x0b\x6e\xc3\x7f\x75\x02\xd7\
277
+ \x10\x4f\xe8\x59\xbc\xe7\xdf\xae\xcd\x8f\xe9\x16\xb6\xf0\x47\x79\
278
+ \x86\x7e\xb3\x57\x18\x84\xa3\xe8\x93\xb9\x30\xfb\xe3\x69\x6c\x90\
279
+ \x9d\xf9\x8e\x2d\xe1\xf0\x78\x3b\xbb\x65\x13\x5f\xfa\xd2\x97\x46\
280
+ \xf5\x96\x7f\xcb\x09\xd4\xd8\x8d\x83\xfd\xb1\x31\xfc\x04\xf6\x27\
281
+ \x16\xe3\x96\xf8\x21\x4c\x59\x86\x0d\xe4\xf8\x1f\xfe\xf0\x87\x7d\
282
+ \xfe\x82\x7e\x56\xa9\x7b\xba\x56\x93\x15\xd7\x8c\x03\x46\xaa\x8f\
283
+ \xc1\x52\x7a\x10\x9f\xe9\x08\xde\xb2\x0f\xf7\x5f\xa8\x8b\x91\x05\
284
+ \x19\xcb\x45\x71\x79\x71\x54\x1d\xc0\x39\xd9\x0d\x1f\x93\x27\xcb\
285
+ \xdf\x7d\xa6\x2b\x78\x2d\xee\xb3\x6b\x3c\xc1\xf8\xf8\xa1\xda\x21\
286
+ \x1b\x83\xf3\x30\x5b\x5d\x17\x17\x64\x37\x74\xa4\xc6\x2f\xe6\xd0\
287
+ \x3f\x5d\x8b\x0f\xf0\xc2\xf7\x36\xf6\x06\x13\xc4\x0b\x7c\xcf\x78\
288
+ \xdc\x6b\x88\x4b\xc0\x32\xe3\x80\x2b\x74\xcf\xfe\xc4\x2e\x76\x05\
289
+ \x5f\xe7\xf1\x77\xdc\x4e\xfd\x87\xbf\xbb\x06\xbd\xe3\x7e\xd1\x47\
290
+ \xe2\x31\x2e\x2a\xa7\xd4\x96\x35\x57\xac\x86\x9a\xfb\xf0\x56\xa1\
291
+ \xff\x9c\x93\x5f\xe2\xb1\xe2\x3a\xac\x81\xb7\x72\x7b\xb9\x4f\xee\
292
+ \xc9\xe5\x63\xec\x00\xb6\xd3\x35\xbc\x13\x73\xe9\x5f\x1c\xf5\xbd\
293
+ \x98\x4c\x97\xf0\x83\x3f\x5b\xc3\x41\x8f\xe2\x87\xfc\x85\xdc\xd9\
294
+ \x34\x3c\x10\xab\x71\x2b\x18\xe0\x7b\xbe\xcf\x27\xe5\x90\xe6\xf8\
295
+ \xc5\x5d\xfc\x80\x4c\xd5\x7d\x70\x47\x7a\xe0\xf7\xf8\x1c\x1b\xd0\
296
+ \x2f\xf9\xbe\xf8\x0b\x57\x5c\x4b\xdf\xc5\x23\x7d\x87\x67\xf0\x9f\
297
+ \x5d\x88\x43\x38\x01\x0c\x67\x73\xf8\x5b\x7c\x7f\x51\xb3\x9f\x7c\
298
+ \x45\x8c\xac\xba\xaf\x3e\xc4\x2e\xc4\xac\xd4\x3d\x37\x7a\x1f\x9f\
299
+ \xb8\x63\x4c\xab\xc2\xfd\x6c\xec\x57\x1c\xe3\xdb\x6a\xb1\xe2\x9b\
300
+ \xbc\x9d\xbc\x61\x80\xba\x27\x5f\x55\xb3\xe3\x33\x30\x14\x2e\xc0\
301
+ \x53\x39\x16\x5f\xa3\x2b\x7a\xa2\x67\xf6\x4a\x8f\x8e\x11\xab\xfd\
302
+ \xce\x0f\x61\x40\x78\x14\x7d\xc9\x0b\xac\xdb\x71\x1e\xfb\xab\x15\
303
+ \xd1\x2f\x9b\x77\x6c\xea\x02\xf4\x68\x1e\x80\x9d\x65\xde\xde\xe7\
304
+ \xc8\x84\x5e\xf1\x92\xdc\x53\x40\x0f\xf6\x4b\x4d\x88\xcf\xe2\x11\
305
+ \xfa\x6a\xad\x08\x9b\xc2\x59\xf1\x50\xb6\x30\xcf\xf7\xf3\x3d\x4e\
306
+ \xc3\x47\x5c\x73\xac\xee\x16\x0c\x80\x7d\xd6\x2b\x6a\xeb\xc5\x80\
307
+ \x5c\x53\x9c\xaa\x6b\x79\x56\x85\xfd\xf4\x49\x4e\xfc\x88\xfe\x0f\
308
+ \x38\xe0\x80\xce\xeb\xd8\x83\xdf\xc5\x7a\xd8\x87\xe3\xa8\xd1\xfa\
309
+ \x5d\xdf\xf8\x28\xdd\xd2\xbb\x3e\x9b\x43\xe3\x57\x7c\x15\x06\x38\
310
+ \x46\xbc\x94\xe3\xe3\x58\x62\x33\x9f\x85\xed\xf4\xe0\x3b\x98\x0f\
311
+ \x93\xf5\x41\x6d\x08\x5e\x38\xbf\x73\x3b\x0f\xdd\xe1\x07\xf2\x3f\
312
+ \x58\xed\xfc\x78\x18\x7b\x81\x3d\x72\x3c\x79\xa1\xef\xf0\x0e\xf5\
313
+ \x3d\xdc\x81\x3d\x3b\x16\x4e\xc0\x13\xf6\x9a\x9a\x2d\x1b\x84\x11\
314
+ \x6a\xf8\x8b\xf2\xf6\xfc\x06\xa3\xc4\x9b\xe8\x7f\x96\x2c\x5d\x17\
315
+ \x2f\xae\xb9\xe4\x5a\x5a\x6c\x06\x56\x1a\xcf\x2a\xeb\xfb\xb1\x29\
316
+ \x7e\xc8\x1f\xd5\x3a\xf8\xa9\x18\x8b\x37\xe3\xd3\xea\x66\xc6\x0b\
317
+ \x4f\xe9\x08\x37\xe0\xa7\xb8\x9f\x3c\x88\xfe\xea\xf3\x79\x7c\xc7\
318
+ \x3f\xc3\x1d\x71\x2f\xf1\x44\xcc\x56\xaf\x73\x3d\xbe\xcb\x3e\xd8\
319
+ \x36\xac\xc8\xb3\x24\x32\x37\x6c\x7f\xfe\xe9\xba\x62\x2a\x9e\x41\
320
+ \x2e\xe6\xe5\xc4\x08\x3a\xe4\x8f\xfa\x2b\x6f\x10\x3b\xe8\xc7\x6f\
321
+ \xbe\xf7\x3c\x1a\x71\xca\xb5\xc5\x19\xfa\x76\x6d\x36\xe5\x5c\xce\
322
+ \xcd\x36\xe5\x1b\x8b\xe6\x6f\xf2\x9b\x79\x27\xb9\xeb\x2c\xfd\x0f\
323
+ \x63\x29\xdc\xd3\xd6\x7a\x9f\x70\xf4\x8f\x87\xb1\xdf\x55\xfa\x7e\
324
+ \x6a\xba\x7c\x58\x3c\xe7\x63\xf2\xdb\xd4\x64\xd5\xbd\xe5\x4b\xf4\
325
+ \x22\xff\x51\xe7\x80\xd5\x64\x27\x36\xc0\x07\x71\xb1\x3e\x83\x09\
326
+ \xa7\x97\x7b\xe3\x8f\xea\x15\xf8\x35\xfe\xe0\x18\x5c\x5e\x3e\x00\
327
+ \x8b\xe9\x04\x9f\x96\xcb\x8b\x2f\xfa\xa0\x06\x67\x1f\x9f\xd9\xa4\
328
+ \xbc\x8e\x1e\xc5\x40\x36\x97\xb8\xca\xde\x72\xcf\xd6\x98\xae\x60\
329
+ \xba\x7a\x54\xd6\x7e\x93\xa3\x79\xf2\xe4\x05\xe2\x05\x5e\xc0\x47\
330
+ \xa7\xea\xdf\xb1\x6c\x31\xf7\x4a\xce\xd3\x3f\x8c\x93\xb3\xd4\xe3\
331
+ \xa7\xb4\xfa\xfc\x0d\xf1\x37\xb9\xe5\x2a\xfc\x3f\xfa\xe7\xab\x30\
332
+ \xd2\xb5\x70\x23\x98\xe8\xbe\x59\xb5\x2e\x7d\x48\xcd\x1f\xa6\xf9\
333
+ \xb7\x75\x66\x6c\x01\x86\xe3\xf1\x7c\xae\xda\x2d\xfe\x08\xa3\xd5\
334
+ \x74\xe8\x4c\x2c\x14\xd3\x71\x78\xfe\xca\xff\xf8\x2f\xfe\x0f\xe3\
335
+ \x52\x4f\xe5\xc7\x36\x7c\xc0\x86\x5b\xd2\xa1\xbe\xf2\x37\xb1\x1c\
336
+ \xe6\xeb\x63\xea\xce\x99\x83\xcf\xbd\x7b\xf5\xbe\x7c\x71\x0c\xef\
337
+ \x77\x3c\x0e\xa3\x7e\xc2\x2e\xc4\x0b\xf6\x0c\x27\xa6\xd4\xec\xf3\
338
+ \xbb\xbe\xc9\xf9\xc8\x6c\x5e\xfd\x2d\xba\x22\x1f\xe3\xac\xb2\x59\
339
+ \xd4\xb2\x1f\x3c\xe3\x2f\xab\xd2\xbd\x2d\xf3\x47\xfc\x58\x1c\x96\
340
+ \x73\xc9\xe9\x32\x9f\x6f\xee\x53\x3e\xc0\xf7\xe0\x34\x7e\xc5\xaf\
341
+ \xe1\xbe\xef\xd9\x00\x1b\x4f\xee\x14\xb9\xab\xc7\xc2\xdf\x8c\x7d\
342
+ \xbd\x8d\x1d\xba\xb6\xbc\x02\x3e\xe0\x95\xf8\xb7\x38\x82\xe7\xc9\
343
+ \x13\x33\xff\x3e\x26\x43\xfd\x82\x5f\xe2\x0b\x7f\xc4\x0f\x60\x1b\
344
+ \xfe\x4a\xb6\xa9\xf7\x4c\x6d\xf8\x2d\x2c\x5a\xc4\xc5\xf3\x9b\x38\
345
+ \x06\x4f\x6b\x9f\x86\x6d\x56\xbd\x89\x0c\x5d\x6b\x55\xd8\x1f\x9f\
346
+ \x72\x6e\x38\x2b\x2f\xc7\xd3\xe8\x55\xbc\x84\xdd\x62\x25\x3b\x24\
347
+ \x33\xb6\x2c\xe7\xc1\xa9\xf9\x33\xdc\xe6\x8f\x74\xc0\x07\x33\x37\
348
+ \xa9\x19\x33\xee\xa0\x5e\xa4\x45\x47\x53\xb6\x1a\x47\xcc\x09\xe8\
349
+ \x9b\x38\x0a\xef\xd9\x93\xba\x03\xdc\xe6\xff\x70\x64\xf8\x4c\xd1\
350
+ \x61\xc3\x47\xed\x2f\x17\xc5\xff\xc8\x14\x16\x18\xd3\x94\xf5\x3b\
351
+ \xf5\xbc\xf2\x11\xc7\x2e\xaa\xbf\xd6\xe7\x1e\xc0\xaa\x79\xcf\x00\
352
+ \xab\xe7\xcf\x5f\xfd\x52\xb7\x20\xef\x55\xfb\xbf\x2d\x6b\x2d\xf1\
353
+ \x61\x3e\x0d\xab\xd9\x03\xfd\xc9\xe7\xc9\x2d\xb9\xb2\x78\x0c\xc7\
354
+ \xe1\x20\x6e\x2e\x8f\x4f\xdf\xe3\xff\x55\xff\xc9\x09\x70\x33\x75\
355
+ \x41\xf8\x8b\xc3\xd9\x7c\x8e\xfc\xb3\x99\x5b\x4d\xfd\x4c\xec\xc0\
356
+ \x43\xe4\x24\xea\x08\x72\x0c\x31\x98\xdf\xaa\xdf\xd4\x63\xd3\xc8\
357
+ \xda\x75\x32\x27\x5f\xf3\x68\xdc\x05\x0e\xa8\x4f\xe8\xcf\xd4\xe7\
358
+ \x65\xd8\xd8\xb0\x3e\x4c\xd5\x49\x7e\xc7\x17\x52\x5f\x88\x5d\xcf\
359
+ \xba\x6e\x7e\x37\x47\x86\x3f\xae\xd2\xf7\xab\xfe\xe5\xf4\xf0\x9f\
360
+ \x6e\xf1\x7d\x79\x9d\x5a\x3a\xfc\x95\x7b\x8b\x97\xe6\xbb\xe4\x7e\
361
+ \xf8\x94\xb8\x20\x0f\x13\x4f\xb3\x56\xa2\xea\x1f\xbf\x52\x03\x11\
362
+ \x5f\xad\xd3\xe2\x6b\xec\xc7\x31\x7c\x1a\xae\xe0\x96\xf6\x13\xe7\
363
+ \xd5\x04\xe8\x1c\x17\x97\xf7\xcb\x0b\x63\x57\x38\x84\xb9\x7d\x79\
364
+ \x1e\xbe\xc8\x2f\xe4\xa5\xec\xc0\xb9\xd9\x96\x7d\x71\x10\x3a\x86\
365
+ \x15\xf2\x17\x1c\x25\x73\xf2\xc1\x1f\x7a\x70\x1e\xfc\x74\x2c\x6e\
366
+ \xcc\xd2\xbf\xc6\xe6\xe4\xa6\x53\xfd\x31\x7a\x83\x37\xe4\xa5\xc5\
367
+ \x5e\x67\x3d\x6b\x22\xf2\xa3\x83\x55\x63\x7f\xd5\xbf\x1c\x93\xae\
368
+ \xe4\x37\xe4\x8a\x83\xcb\x9b\xe0\x26\x3f\x31\xcf\x21\xf6\xf9\x1e\
369
+ \x46\xe0\x00\x38\x7c\x9e\xc5\x35\xc4\x2f\xf2\x55\x6b\xe7\xcb\x72\
370
+ \x18\xdc\x52\xad\x3e\xf7\x56\x88\xe3\xf0\x01\xb6\xcb\x15\x61\x0c\
371
+ \x5c\xa7\x33\xbc\x43\xbe\xc0\xfe\x34\xc7\xdb\x97\xae\xc5\x73\x73\
372
+ \x79\x79\xde\x17\x7f\x76\x3c\x9b\xc8\x3a\x1f\xb9\x83\x9a\xbf\x3e\
373
+ \xea\x3f\x2c\x35\x7f\xcb\x36\xd8\x38\xfe\x08\x7b\xa6\xae\xd5\x88\
374
+ \x9e\x70\x54\xd7\x89\xdc\x16\xc9\x36\x36\x92\xda\xe4\xd0\x9e\x66\
375
+ \xd9\x99\x86\xf3\xae\x92\xf7\xe7\xbc\x36\x35\x35\xbe\xcd\x97\xd5\
376
+ \xad\xc8\x97\xbd\xaa\xd7\xc0\x5b\x79\x1a\xce\x65\xed\x9b\xf8\x2b\
377
+ \x3e\xe0\x5e\x64\xcc\xe7\x2a\x76\x6b\x64\xcd\xff\xf8\xb9\x86\xef\
378
+ \xab\xb1\xa9\xbb\x90\x03\xbe\xc8\xbf\xe9\x80\x1f\xc3\x05\x39\x35\
379
+ \xfb\x60\x07\xf8\x1e\xbb\x80\xb5\x1a\x7e\x01\x4b\xe0\xb9\x63\xe0\
380
+ \x06\xbd\xea\x1b\x6c\x72\x8c\x9c\x24\xcf\x0c\xd4\x4f\xc7\xc0\x32\
381
+ \xf3\x0c\xb0\x4d\xdc\x36\x37\xa0\x2e\x84\xdf\x84\x6b\x4c\x69\xd9\
382
+ \x0f\xf7\x57\x83\x9c\xaa\xff\xba\xe9\xcb\xa2\x3c\xa0\xce\x33\x1a\
383
+ \xcb\x2a\x75\x1f\x5c\x71\x7e\xf5\x1c\x1c\x4f\x1e\xaf\x66\xc6\xef\
384
+ \xc8\x56\xee\x84\x03\x90\xa9\xfc\x80\x7f\xa6\x16\xcb\x26\xe0\x00\
385
+ \x39\xd3\x77\x8d\x67\xb8\x01\x6e\x88\x03\xf8\x8d\xff\xca\x11\xf1\
386
+ \x2f\x38\x43\xdf\xfc\x56\x8c\xc9\x33\x1e\x6c\x74\xc4\x36\xc4\x3d\
387
+ \x31\x5f\x7f\xcc\xeb\xe9\x0f\x2c\x71\x2e\xd8\x04\x3b\xf0\x10\xfd\
388
+ \xc8\x7d\x24\xf2\x03\xf5\xc3\xac\x15\xf2\x57\xde\xa7\x8f\x62\x3d\
389
+ \x9f\x97\x8f\xc8\x31\xa7\xe2\xfe\xd0\x2f\xc5\x15\x7c\x7e\x2d\xfa\
390
+ \x0f\x76\xe3\xcc\xea\xdd\xda\xac\x5a\x50\xbe\x57\xfb\xcc\x3d\xdb\
391
+ \xab\x5e\xdb\x47\xff\x6a\xe5\xd6\x6a\xc1\x72\xf1\x1e\xd6\xc3\x60\
392
+ \xdc\x9e\x7f\xc2\x7f\x71\x93\x7e\xf8\xbc\x3a\x8a\xda\x00\xdf\x32\
393
+ \x47\xcb\x2f\x13\x03\x70\x01\xb8\x2c\xbf\xe2\xa3\x1a\xbb\x31\x3f\
394
+ \x87\x03\x38\x8f\x18\x4a\xb7\x6c\x08\x9e\xb2\x21\xfb\xf0\x6d\x75\
395
+ \x45\xd8\xc7\x87\xc5\x02\xc7\xc0\x22\x3e\xac\xa9\x07\xd0\xbf\x5c\
396
+ \x84\x8c\xcc\x0b\xb2\x25\xfa\x85\x19\x6c\x55\x8c\x52\xeb\x35\x47\
397
+ \xac\xbf\xae\xcd\x6e\x70\xcd\x8d\x3c\xe3\xc9\x98\xeb\xf3\x33\xd6\
398
+ \xa2\x7f\x75\x75\xb5\x93\x29\xfa\x37\x56\xb5\xf6\x55\xeb\x3f\xf8\
399
+ \x2f\x9f\xa1\x03\xb2\xe7\x87\xc6\x29\xde\xca\x01\x7d\xef\x2f\xbf\
400
+ \x65\x1f\x74\x02\x03\xcc\x83\xe7\x1e\x39\xfc\x2b\x7e\x62\x0c\x62\
401
+ \x09\x1b\x81\xe7\xf0\x23\xcf\x83\xa7\xdf\x70\x73\x7c\x8f\x2d\xc8\
402
+ \xdf\xf0\x2a\x3c\xc1\x6f\x78\x1c\x9c\x54\xe3\x13\xeb\xfd\x3b\xf7\
403
+ \xde\x68\xf4\x28\xde\xeb\x07\x3c\x67\xa7\xb0\x5f\xed\x1f\xbe\x88\
404
+ \x23\xe6\xa7\xf3\xac\x31\xb2\x84\x37\x72\x30\x6b\x4e\x22\xe7\xa9\
405
+ \x39\x7f\x5d\x77\xa7\x26\xb2\x1e\x19\xfb\xcb\xc7\x70\x93\x59\x79\
406
+ \x6a\xfd\x4e\xfc\xcb\xb3\x37\x57\x8d\xff\x36\xb5\x51\xdc\x8f\xbc\
407
+ \xd4\x01\xcd\x01\xc8\x3f\x7c\x07\xbb\xc5\x7e\x75\x53\xb8\x4e\xef\
408
+ \xa9\x11\xd0\xaf\xfd\xe1\x62\x95\x69\x9e\xcd\x28\x57\x30\x66\xe7\
409
+ \x5a\x8b\xac\x6b\xc3\xdd\xaa\xfe\xd9\x05\x9b\x61\x43\x78\x85\x38\
410
+ \x25\x76\xc1\x29\x18\x26\x66\xa9\x5f\x39\x86\xbe\xe5\x13\xfa\xc7\
411
+ \x9e\xe1\x8d\xfe\xa7\x4d\xc1\x81\xec\xe3\x7a\xd6\x95\x6e\xc4\x27\
412
+ \xc9\x30\xcf\xa5\x9e\xb5\xc6\x04\x96\xd2\xc3\xd0\x7e\x56\xa5\x7f\
413
+ \xe7\x57\xd3\x53\xcf\x31\x87\x23\xef\x90\x7f\xc1\x60\x7e\x4f\x9e\
414
+ \x78\x20\x0c\x36\x1f\xcc\xb7\xe4\x82\x7c\xd9\xfc\x9c\x9a\x30\x1f\
415
+ \x83\xfb\xc3\x9c\x16\xa6\xdb\x17\xe7\x23\x3f\xfb\xe0\xf0\xfc\x1d\
416
+ \x16\xe7\x1e\x3e\xf9\x5f\xe6\xc9\x60\x85\xad\xae\xbd\xa6\x4b\x31\
417
+ \x63\x5e\x83\x1d\xa9\x19\x8c\x35\x6b\xce\x9c\x03\x57\x34\x9e\xd4\
418
+ \x63\x16\xd9\x40\x7e\xe7\x0b\xea\x8f\xe4\xb6\x56\xee\x17\x1d\xe2\
419
+ \x0e\xea\xd5\xda\x30\x06\xd4\x9a\xaf\xb8\xbb\x6a\xdd\xd7\xf3\xab\
420
+ \xed\xf3\x1f\x7a\xe7\xb7\xfe\xc2\x52\x9c\x8a\x6e\xf4\x95\xdf\xf1\
421
+ \x7f\x71\x57\xbc\xc5\xc5\xe8\x06\xfe\xd3\x71\xad\x01\x55\x2c\xe3\
422
+ \x93\x8e\xb1\x06\x98\xef\xa9\x33\xf1\x65\xbc\x81\x7d\xb1\x91\xac\
423
+ \xcf\xb4\xe5\xbe\x7f\x3c\x84\x9f\xb3\x0b\xb5\xe6\xe8\x1f\x1e\x98\
424
+ \x2f\xf0\x9b\x73\xe3\xe4\x62\x0b\xce\xe4\x6f\x3e\xf3\x7d\xfd\xab\
425
+ \x73\x01\xe2\x89\x7a\x03\x1c\x90\x9f\xf2\xc5\x45\xf7\xd6\xd7\x7a\
426
+ \x0c\xbc\xdb\x88\xfe\xf9\x8a\xba\xc7\x98\xfe\xf3\x6f\xb1\x17\x67\
427
+ \x59\x84\x33\xc3\x7b\xb0\xd6\xab\x7f\x9b\x79\x58\xb2\x37\x3e\xb9\
428
+ \x39\xbf\xf6\x6f\x71\x9c\xde\xf9\x2d\x5c\x22\x4f\x7e\xc0\x97\xc8\
429
+ \x8d\x6e\xd4\x0c\xd9\xf5\x70\xdd\x6c\xe4\xc6\xcf\xf1\x0a\xeb\xc3\
430
+ \x60\x4a\xf2\x3c\xf5\x7b\xf7\x5c\xaa\xcd\xcb\xa9\x7c\x07\x5b\x60\
431
+ \xa4\x5c\x01\x9f\xa3\x77\x8d\xdd\xd8\x4f\x53\x9f\xc0\x09\x71\x79\
432
+ \xeb\x89\x61\x8f\x7f\xe3\xfb\xec\x0a\x86\xc1\x1b\xdc\x93\xce\x60\
433
+ \x7f\xd6\x64\xc7\x7e\xb2\xe6\x14\x8f\x90\x6b\xcd\xe3\x03\xf9\x5e\
434
+ \x1d\x52\x9c\xdc\x88\xfe\x71\x47\x3c\xaa\xca\x67\xa8\x7f\x39\xb3\
435
+ \x79\xa9\x29\xfa\x1f\xab\x41\xaf\xe5\x99\x7e\xd9\x0f\x37\xe1\x5f\
436
+ \xfc\x54\xde\x05\x03\xc8\x8f\xdc\xe1\x7c\x9e\xad\x33\xd4\x2f\x0c\
437
+ \xe5\x7f\x72\x1b\xf6\x32\x5c\xf3\x98\x31\xaa\x01\xe3\x95\x72\x5a\
438
+ \xdc\xdc\xfa\x09\x7a\xa6\x6f\xdc\x1c\x47\x50\x4b\x36\xbf\xe4\x33\
439
+ \xfe\x03\x57\xe4\x75\x7c\x5d\xde\x44\xb7\xce\x0b\x3f\xe1\x12\x7d\
440
+ \xe3\x75\xe4\x29\x97\x70\x5c\xee\xcd\xf1\x9b\xf1\xf8\x8c\x23\xfa\
441
+ \xab\x9e\x9d\x5a\xb3\xcf\xae\xef\x98\x3c\xe3\x6b\x11\x27\x94\xab\
442
+ \xca\x93\xd7\xe3\x6f\xd1\x85\xb5\x13\xfa\x56\x65\x34\xf4\x17\x75\
443
+ \x13\xf5\xe9\xb1\xeb\xd4\x7b\x31\xb2\xf6\xcc\x3a\x34\xfc\x9d\x0e\
444
+ \x63\x97\x8b\x6c\xa0\xfe\x9e\xfa\x1f\x59\xd3\x3b\xbc\x17\x6f\xd5\
445
+ \xce\xe4\x53\xb8\x78\xd6\x5c\xf8\xcc\x5f\x7c\x4e\xce\xcf\x9f\xf8\
446
+ \x34\x9d\x65\x0e\x78\xa8\x7f\xf9\x01\xbc\x57\xcf\x32\x0f\x67\x5d\
447
+ \x89\xf3\x67\x5d\x8e\x3a\x27\x9d\xc2\x00\x35\x28\x39\x3a\xfd\x39\
448
+ \x67\xee\x09\xa6\x7f\x79\xbb\x3e\xc2\x6f\x9c\x5f\x9f\x9d\x57\x4d\
449
+ \x47\x4e\xc8\xef\xf1\x94\x3c\x5b\x5e\x5c\x11\xc7\xd8\xa7\xbf\x72\
450
+ \x91\xd4\x23\xd8\x23\xcc\x62\x77\x30\x99\x7d\x0f\x79\x79\xad\x67\
451
+ \xd9\x27\xcf\xcf\x5b\x6b\x5c\xae\xf7\x4a\xf3\x81\x70\x8f\xb1\x6b\
452
+ \xb1\x57\x76\x32\x76\x9d\xac\x39\x51\x4f\x54\xdb\xb0\x8e\x4d\x5d\
453
+ \x46\x0d\xc5\x5a\x16\x39\x0f\x59\xfa\xab\xaf\xb3\xf0\x21\xbc\x9f\
454
+ \xde\x33\xff\x47\x3e\x64\x68\x4e\x4d\x0c\x52\xa7\x97\x63\x19\x3b\
455
+ \x1f\x84\x99\xf1\x3b\xb5\x38\x1c\x41\xac\xa5\x7f\x18\x0c\xc3\x87\
456
+ \xeb\xde\xf3\x17\xfe\xe2\x5c\xf6\xd1\x3f\x35\x19\xeb\x70\xe4\xe8\
457
+ \x6a\x3d\xa9\xd3\xd2\xa9\x75\xc3\xe2\x32\x5d\xe1\xf1\x7c\x53\x2d\
458
+ \x40\xfd\x87\xfe\xd5\x20\xe0\x87\xfe\xc1\x2a\x7d\x94\x8f\xa8\x03\
459
+ \x90\x9d\x7c\x80\x1d\xc0\x15\xb6\x20\xe6\xb8\x06\x1b\xc1\x09\xc4\
460
+ \x2c\x7d\xb7\x8f\x7e\x99\xe3\x24\x4b\xdf\x19\x4b\x6d\xe9\xbf\x5c\
461
+ \x55\x5d\x61\x23\xb1\x36\x9b\xf9\x32\xf2\x1c\x9b\xf3\xd3\x60\xd2\
462
+ \x98\x9d\x65\x6d\xa6\xdf\xc4\x07\x38\x28\xbe\xe1\x8b\x72\x74\xf5\
463
+ \x16\x76\x9f\xfb\xf0\xf8\x96\xb9\xc7\xa1\xaf\xfb\x4e\xde\x6e\x13\
464
+ \x03\xfd\x35\x26\x36\x03\x47\xcc\x89\xe3\x5e\x74\x09\x0b\x34\x32\
465
+ \x55\x17\xb6\x9f\xbc\x34\xcf\x55\x93\xa7\xd8\x8f\x7c\x7c\x76\xed\
466
+ \x31\x0c\xcd\x7c\x07\x2e\x21\xe7\xa7\x63\x71\x40\x3c\x65\x0f\x6c\
467
+ \x58\xae\xe8\x3b\x5c\x32\x6b\xa7\xe3\x27\xc6\xc7\x36\x1c\x4f\x47\
468
+ \xd6\x6d\xc2\x49\x1c\x4e\xfe\x80\xd7\xc1\x78\xbc\x4f\x9e\x21\xde\
469
+ \xc0\x29\xc7\xfb\x2c\x36\xa9\x69\xe9\x87\x73\x88\x27\x7c\x86\x1e\
470
+ \x60\x1c\x9b\x77\x7d\xf9\xe4\x18\x36\xb3\xb1\xbc\x4b\x62\xbd\x9c\
471
+ \xbc\xe6\x00\x6a\x18\x95\x77\xd6\x39\x5f\xf8\x10\x1b\xab\x6b\x0c\
472
+ \x70\x47\xf1\x4d\xac\x23\x27\x18\xc9\x0f\xf9\x95\x18\x8c\x33\x89\
473
+ \x51\x7c\x45\xad\x5d\x1d\xd5\xbe\xd6\x6a\xc7\xdf\xd5\xec\x8d\xd7\
474
+ \xba\x02\x3c\x9c\x9c\xf3\x9c\x6d\x58\x02\xe3\xf8\x1b\xae\x95\xe7\
475
+ \xb1\x92\x2d\x3e\x08\xb3\xd9\x0e\x3b\xa0\x0b\xf5\x57\x71\x4a\xee\
476
+ \x08\xab\xe5\xc6\xf8\x42\x78\xc2\x10\xdb\xf2\x7c\x2a\x5c\xc2\x39\
477
+ \xc9\x9e\xff\xb9\x1e\x7f\x97\x5b\xf0\x55\xf6\x2f\xcf\xf4\x9b\x38\
478
+ \xa3\xd1\x2b\xac\xa7\xbb\xf0\x4e\x9f\xf1\x8d\x3c\xe3\x1b\x37\xf5\
479
+ \x9d\xdf\x60\x56\xde\x1b\x4a\xa6\xbe\x4f\x2e\xe0\xb3\xf9\x44\xb1\
480
+ \xc5\xf9\xe5\x83\x6c\x87\x0d\xc6\xee\xb4\xf0\x31\x36\xa1\x4f\xcb\
481
+ \xf0\x7d\x1b\x79\xb3\xdf\x3a\x57\x1a\x59\x91\x9d\xb9\xe2\x6a\x33\
482
+ \x62\x06\xbf\x15\xc3\xcc\x87\x90\x0b\xfb\xe1\x6b\x6a\x2f\xfc\x8e\
483
+ \xfc\xd4\x6c\x7c\x2f\xe6\x99\x9f\x85\x8f\x7c\x13\x8f\x36\xbf\xe3\
484
+ \x1c\xf0\x16\x3f\x76\x7d\xb9\x93\x78\x2e\xd7\x84\x1b\xc6\x08\x27\
485
+ \x61\x29\x2c\x16\x97\x93\x73\xc9\x0d\xe9\x59\x5e\xe2\x38\xb8\xca\
486
+ \xa7\xf0\x04\x73\x80\xea\x43\x9e\xe1\x4d\x47\xfc\x6f\xcc\xb6\xe9\
487
+ \x04\x9e\x93\xb3\xeb\xb8\xf7\x8a\xff\xe2\xe0\x78\x3c\x1c\x86\x8d\
488
+ \xbe\xc7\xeb\xe0\x80\x3c\x13\xbe\xc9\x11\x9d\x9b\xbe\x71\x09\xfe\
489
+ \x08\x73\x9c\xd3\x6f\xe2\x10\x1f\xb0\x3f\xbd\xb2\x1f\xbf\xc1\x2f\
490
+ \x39\x04\x59\xb0\x77\xba\x84\x17\xfa\x6e\xfd\x32\x1b\x24\x1f\x7e\
491
+ \x03\xdf\x93\xc3\xd4\x1c\x96\x0c\x66\xf1\xb1\xf5\xf8\x3f\x9c\xc6\
492
+ \x3f\xc2\x9f\xb5\x3a\xbf\x48\x3e\xf5\x38\x9c\x88\x5f\x92\x35\x3f\
493
+ \x80\x53\xfa\x4c\x77\xbe\x17\x0f\xe9\x47\x0c\xe5\x83\xf6\xa1\x63\
494
+ \x1c\xd7\xbf\xf5\x9d\x7c\xcd\xa1\xa8\xf1\xd0\xbd\x58\x49\x5f\x64\
495
+ \x66\xcc\xce\x25\x87\xb2\xc6\x83\x3f\xf8\x4e\xde\xc4\x9e\x34\x78\
496
+ \x61\x5e\xc8\x1c\x96\x1a\xa8\xd8\x49\x2e\x6c\x4d\x5c\xc6\x1b\x70\
497
+ \x77\xd8\x92\x63\x6a\x7e\x13\x59\xc2\x64\x75\x38\x5c\x05\x16\xc9\
498
+ \x01\x61\x19\xdd\x9b\xdf\x17\xa3\xe5\x20\xfa\x6d\x0c\xb8\x1d\x5d\
499
+ \x1b\x23\xcc\x91\x87\xca\xff\x70\x7e\xb1\xdc\xbf\x33\x57\x20\x1e\
500
+ \x64\xbd\x28\xee\x07\x2b\x9d\x1b\xe7\x20\x2f\xfd\x55\x33\x80\x3d\
501
+ \x30\x93\x9d\xf1\xff\xe4\x11\xc6\x94\x67\x7c\x46\x2f\x70\x4f\xdf\
502
+ \x96\xe1\xfb\xd1\x3f\x19\x8b\x3f\x63\xfa\x67\xc7\xf5\x59\xbd\xb0\
503
+ \x82\x5e\xe8\x02\x3f\x61\xa7\x64\x86\xab\xa9\xb7\xe0\x5d\x62\x63\
504
+ \x9e\xed\xcd\x77\x61\x18\x3f\xe3\xfb\x6c\x5c\x8e\xcd\x9f\x8d\x19\
505
+ \x6f\x76\x1e\x1c\xdb\x1a\x7c\xb1\x38\x73\x6c\xe2\x23\x6c\x57\xdb\
506
+ \x17\x9f\xe9\x83\x6e\x35\x35\x13\xf8\x6f\xae\x8d\x1f\xf9\x37\xdb\
507
+ \xe3\x57\x6c\x23\x7a\x12\x47\xab\x0f\xd5\x06\x87\x61\x03\x5b\x63\
508
+ \xa3\x64\x6e\x7d\x37\xce\x61\x4c\x6c\x28\xef\xf9\x80\x81\xfc\x91\
509
+ \x9d\x1a\x63\xfc\x9f\xbe\xf9\x34\xee\x4e\x56\xf0\x20\x6b\x89\xe9\
510
+ \x98\xde\xf3\xcc\x50\xf6\x6e\x8c\x30\x05\x46\xf2\x79\x31\x00\x7e\
511
+ \x88\x6f\x62\xa7\xcf\xf2\xcc\x3c\xa3\x2a\x6b\xc1\x34\x75\x8e\xdc\
512
+ \xcf\xb8\x8c\x7b\x6d\x6b\x0d\x88\x2f\x8f\xe9\xdf\x35\xe5\x23\xf6\
513
+ \x33\xff\xa3\xc6\x41\x56\xfa\x41\x36\xfc\x80\x6e\x7d\x27\x2f\x22\
514
+ \x3f\x3a\x16\x13\xd8\x2a\xd9\x1a\xbb\xf1\xc0\x3d\x18\x00\x6b\xe8\
515
+ \x84\x7c\xe4\x5e\xec\x05\x0e\xfa\x4d\x0d\x1f\xff\xe3\x37\xb8\x24\
516
+ \x5b\x87\xed\x72\x62\xfd\x70\x7d\x7e\xc6\xb6\x70\x64\x76\xa4\x66\
517
+ \x47\x96\xfc\xc5\x5a\x0a\x9c\xdb\xbf\xe5\x7e\xf0\x40\xff\xc2\xa3\
518
+ \x6b\x3d\x58\xdc\xd7\x27\x3a\x61\xff\x70\x5d\x9f\xe9\xc1\x5a\x0f\
519
+ \xe3\x15\xb7\x8c\x93\xaf\xf2\x5d\xe3\x60\x57\xf4\x0f\x37\xe8\x3f\
520
+ \xcf\x61\xa0\x73\x73\x87\xe2\x96\x3e\xe3\x73\xb8\x2b\xf9\x9a\xff\
521
+ \x65\xe3\xce\x01\x17\xf5\x5d\x9c\x61\x7f\x36\x76\xad\xce\x98\x67\
522
+ \xbd\x39\x37\x5c\x88\x1e\xc4\x61\x1c\x2a\xf7\x29\x2c\xa3\x0e\x9b\
523
+ \x73\x88\xd9\xc6\x34\xa6\x7f\xd8\x19\xfd\x8b\x13\x7c\x0c\x17\x27\
524
+ \x33\xfe\x02\xbf\x8d\x83\x7c\xe8\x14\x76\xf1\x79\xf8\xef\x33\xb9\
525
+ \xfa\x9d\x7f\xb0\x67\xd8\x01\xe7\x7c\x26\x7b\x7a\x25\x4b\xd8\x48\
526
+ \x46\xec\x8d\x3e\xfd\xee\x1c\x74\xe0\x7b\x18\xc2\x6e\x70\x67\xb2\
527
+ \xc1\x1f\xf4\x87\x4c\x5d\x83\x6f\xf1\x79\xba\x23\x47\xb6\x44\xbf\
528
+ \xfa\x82\x33\xe2\x22\xa9\x05\xf1\x27\x75\x17\x78\x85\xe3\x91\xbd\
529
+ \x79\x7b\x38\x62\x7f\x76\xe7\xfa\x79\x96\x07\xfb\x65\x67\x38\x1a\
530
+ \x3e\xc9\xa6\xb3\xfe\x27\xcf\xe9\x90\x8b\xea\xa7\xcd\x7e\x79\x3e\
531
+ \xa3\xb8\xe0\xbc\x62\x07\xdb\x55\x33\x30\xe7\x2a\xfe\xb1\x4d\x32\
532
+ \xc3\x37\x83\x61\xf0\x1f\xcf\x60\x53\xf1\x7b\xe3\xc0\x4b\xc4\xa8\
533
+ \x65\xe9\xbe\x9e\x47\x1c\x85\xb1\x63\xfa\x87\x6d\xb8\x54\x9e\xa5\
534
+ \x8a\x97\xc9\x83\x6d\xb0\x9f\xec\xc5\x73\x7d\x26\x0b\xff\xc6\x19\
535
+ \xf4\x17\x5f\x77\x5e\xdc\x87\x5f\x19\xab\x58\x8a\xd7\x67\xdd\x01\
536
+ \x9d\x88\xff\xb8\x3b\x9f\x0e\x5f\xd6\xe8\x10\xe6\x93\x3f\xbb\x21\
537
+ \x3b\xe7\x82\xf1\x59\x43\x81\x27\xfb\x8e\xbe\xe8\x9d\x5d\xd2\x2b\
538
+ \xf9\xe3\xe1\xfc\xc9\xf7\xf4\x42\xbe\x99\x13\xa0\x63\x36\xcb\xf6\
539
+ \xec\x9b\x7b\x08\xd9\x01\xbd\xb3\x27\xdf\xb1\x75\xba\x49\x5d\x17\
540
+ \xc7\xc3\xd7\x82\xff\xec\x28\xb1\x85\x1e\x73\x3f\x90\x6b\x8b\x77\
541
+ \xc6\x0c\x7b\xe8\x90\xdd\xc0\x7b\xf2\x51\xcf\xc0\x11\x60\x94\x3e\
542
+ \xb1\x5b\xf6\xee\x7c\xb0\x2f\xcf\x75\x86\xa3\x64\x99\xfa\xeb\x46\
543
+ \x70\x3f\xb9\x5b\x8e\x0f\x7f\x98\xa7\x7f\xfe\x2f\x27\x66\x03\xe2\
544
+ \x61\xea\x2c\xe4\xc4\xdf\xf8\x01\x1b\xe7\x1f\xf0\x5f\xdf\x8d\x83\
545
+ \x4e\xf9\x36\x4c\xcd\x7b\x95\xec\x4b\xae\xe4\x98\x7a\x7d\xea\x78\
546
+ \xf0\xda\xf1\xe4\x66\x8b\xed\xc3\x25\xba\x83\xc7\xfa\x09\xdf\xe5\
547
+ \x1c\x62\x32\x5e\x2d\xd6\xc3\x59\x3a\xd3\x27\xd8\x4b\x9e\x15\xe7\
548
+ \xf1\x6e\x3a\x14\x57\xf1\x85\x70\x4c\x7e\x9f\xfb\x86\xc4\x1d\xb6\
549
+ \xc8\xde\xd9\x9a\x73\x8b\xe3\xf6\x87\x47\x38\xae\x3c\x58\x6c\x91\
550
+ \xe7\xd8\xe8\x9f\xce\xd9\x2b\x7b\x12\x97\xf8\x80\xeb\x39\x17\x3b\
551
+ \xf1\xef\xd4\x71\xeb\xfc\x4a\xe5\x22\x64\x41\x46\x62\x28\xfd\x8b\
552
+ \x37\xec\x82\xee\x71\xcc\xd4\x78\xd7\xab\xfb\xb1\x63\x6a\x1e\x3f\
553
+ \x4f\xff\x72\x7a\xbe\x29\xb6\xd1\x2b\xfb\x67\xbb\xf2\x25\xbe\x0c\
554
+ \x8f\xf9\x08\xde\x06\x03\xed\x8b\x8f\xe3\x87\x6a\x3e\x38\x1c\xd9\
555
+ \xe1\x40\xe2\x7c\x6d\x63\xf5\xed\xd4\x65\xf2\x1b\x9f\xc1\x27\xd4\
556
+ \xf9\xd8\x1b\xb9\xfb\x2b\xa6\xd2\x05\x9d\xcb\x01\xe8\x0b\xae\xe6\
557
+ \x19\x3f\xd1\x7f\x9e\x7b\x02\x6f\xb2\x0e\x07\x2f\xf7\x6f\xba\xd6\
558
+ \x27\xf6\x83\xb3\x1b\x9f\x71\xd0\x1f\x5b\xb4\x6f\xde\x01\x00\xbf\
559
+ \xec\x03\x73\xb2\xce\xcf\xf5\xf4\x0f\x7e\xd0\x93\xfe\xe0\xb4\x70\
560
+ \x31\x6b\x52\xb2\x5e\x51\x9c\x21\x8b\xf0\x1f\xb1\xcf\xf7\xfa\x89\
561
+ \x37\xe6\x3d\x62\xf4\xcf\x86\xed\xe7\x9c\x70\x6e\x4c\x87\xb3\x74\
562
+ \x9a\xcf\x6a\xf1\xb6\x7c\xe7\x2f\xee\x40\x6e\xe6\xd6\x86\xf1\x9f\
563
+ \x1f\x8d\xe9\x5f\xfe\xc1\xf7\x71\x76\x72\x16\xf3\xf9\x4a\xe2\xb1\
564
+ \xdc\x5b\xfe\xa0\xff\xec\x95\xee\x61\x2e\x9d\xe1\x4e\x64\x40\x67\
565
+ \xf2\x01\xb9\x6d\xf4\x0e\x07\xf9\x29\x7c\x21\xf3\xd4\x0d\xe1\xa7\
566
+ \xf3\xe4\xde\x0d\xfb\xc9\xbd\xc8\x3a\xf5\x45\xbc\xd1\xfc\x30\x7f\
567
+ \xf4\x3d\xb9\xf3\x67\xf2\xca\xf3\x52\x1c\xe7\x3a\xf1\x39\xf9\x03\
568
+ \x7f\x87\xc9\x64\x8f\xbf\xb2\x23\xf6\xcb\xff\xc4\x67\x36\x1d\x5e\
569
+ \xce\xae\x9c\x4f\x8c\x36\x4e\x72\xc8\x7b\xe1\xc9\x2a\xfa\xd1\x5f\
570
+ \x31\x8b\xef\xc2\x3b\x18\x23\x3f\x86\x99\x7c\x06\xf7\xc0\x21\xe0\
571
+ \x0c\x1c\xcb\x3d\x84\xf6\xc1\x89\xf4\x95\x8f\x91\x2b\xbb\x85\x85\
572
+ \x72\x29\xf5\x64\xf5\xcc\xdc\x0b\x65\xbc\xb6\xaa\xcf\x31\xfd\xd7\
573
+ \xf5\x53\xe6\xf6\xf2\x6c\x24\x75\x32\xb6\x2c\x97\x56\xb7\x61\x57\
574
+ \x72\x39\x36\xc2\x26\x8c\x79\x4c\xff\x74\x24\x5f\xc9\x73\x09\xf5\
575
+ \x19\xe7\x33\xff\x61\x83\x9d\x38\xbf\x38\xcc\xc6\x71\x3b\xd8\xcf\
576
+ \x97\xf0\x71\x63\x0a\xce\xa7\x4e\x86\xe3\xb1\x1b\x9c\xcf\x9c\x57\
577
+ \xee\x81\x56\x87\x24\x17\xb2\x70\x6e\x32\xe7\xbf\xb8\x34\xae\x97\
578
+ \xf7\xdf\xc8\x19\x8d\x45\x5c\x27\x4f\xfe\xc2\xbe\xe4\x50\xec\x03\
579
+ \x46\xe9\x83\x6b\x45\xff\x7e\xb3\x7f\xe2\xaa\x31\xe0\x1b\xf2\x39\
580
+ \xd8\x2b\x47\xa0\x17\x38\x45\x36\xc6\x2c\xfe\x1b\x03\x6e\xc3\xd6\
581
+ \x5c\x47\xac\x73\x2d\xe7\xc7\x43\xd8\xae\xb1\xc1\x79\xd7\x4d\xed\
582
+ \x40\xac\xe4\xd7\xe2\x03\x6c\x22\x77\x3a\xf5\x97\x9f\xc3\x4c\xfd\
583
+ \xe1\xef\x7c\x80\x6d\xe0\x05\x6c\x5f\x5e\xcb\x77\xc8\x05\x9e\x9a\
584
+ \x5b\x11\x03\xe0\xb4\xcf\xea\xdd\x79\x5f\x4d\x7d\x2f\x2a\x7e\x26\
585
+ \x77\x32\x7f\x42\x57\x3e\xb3\x25\xd7\xc1\xe1\xc9\x10\x7e\xf1\x77\
586
+ \x98\x06\xc7\xd8\x49\x9e\x11\x35\xa6\x7f\xe3\x22\x13\x72\xc2\x7d\
587
+ \xf5\x17\xae\xeb\x0b\x2e\x08\xff\xe0\x01\xb9\x8a\x93\x6c\x09\x06\
588
+ \x88\x5f\x7c\x4b\x7e\xe4\x9c\xd9\xd8\x85\x39\xd6\x3c\xef\x10\x26\
589
+ \xe1\xb5\x74\xaf\xcf\xfa\xe3\x3b\xb6\xab\xaf\xd6\x64\xd3\x83\x7c\
590
+ \x89\xbe\xf0\x8f\x3c\xf7\x89\xcf\x1a\x07\x9b\xe3\x5f\x74\x05\x97\
591
+ \xd8\x32\x7e\x96\x67\x61\x6b\x38\x07\x1b\xc8\x5a\x27\x1c\x9d\xaf\
592
+ \xea\x8b\x3e\xdb\xe4\x57\x62\x1b\x99\xb1\x4f\xbe\x29\xa6\xbb\x8e\
593
+ \xb1\xb3\xe5\xdc\x9b\x67\xcc\x78\x19\x3d\xe2\xff\x64\x02\x53\xe0\
594
+ \x24\x3b\xc5\x7d\xf5\x5b\x4c\x64\x33\x62\x0e\xdd\xe3\x0c\x64\xc6\
595
+ \xae\x9d\x4b\x83\x49\xf4\xaf\xbf\xea\x51\x62\x18\x3e\x23\x86\xb0\
596
+ \x53\xba\x23\x2b\x7a\xd7\x4f\x72\x87\xc5\xf4\xaf\x16\x6b\xa3\xfb\
597
+ \xac\x29\x36\x2f\xc0\x7e\xed\x9f\xe7\x9c\xcb\x4b\xfd\xae\xc6\x46\
598
+ \xbe\x6a\x7a\xfa\x9b\x7b\xa8\xc5\xb7\xaa\xff\x5a\xff\x27\x27\xfe\
599
+ \xc9\x0f\xc8\xcd\xb8\x8c\x9d\x5c\xe4\x4b\xce\x0b\x5f\xd9\xb1\x7e\
600
+ \xb3\x7b\x31\x9f\x9d\x89\xaf\xb1\x25\x3e\x46\x3e\x74\x8f\xbf\xe1\
601
+ \x64\xe2\xac\x31\x8b\x19\xfe\xc2\xf1\xac\xef\x84\xa1\xd6\xa8\x92\
602
+ \x87\x3c\x80\x3c\x72\x3f\x18\xdc\x60\x67\xb0\x98\x4d\xb1\x71\xb9\
603
+ \x60\x72\x29\xba\x0a\x8f\x88\xff\xe3\xfb\xd1\xbf\xeb\xd0\x99\x78\
604
+ \x41\x36\x70\x9a\x1e\x8c\x97\x8d\x67\xbd\x97\x73\xf8\x2e\xef\x62\
605
+ \xcd\xf9\xec\x2b\x1f\x11\x1b\xe8\x92\xdd\xd1\x21\xec\x82\x91\xfc\
606
+ \x45\x9f\xd9\x12\x5b\x84\x13\xfc\x9e\x5f\xd4\x7b\x03\x71\x0d\x3a\
607
+ \xc6\x2d\x9c\x87\xae\xd8\x37\x99\xaa\x39\xa9\x1d\xb2\x25\x31\x8e\
608
+ \x6e\xe5\x5a\xfc\x05\x76\xf3\x11\x38\xc8\x86\xe1\x38\xbd\xc3\x0d\
609
+ \xf2\xd2\x3f\xb1\x4a\xac\x27\x23\xf9\x24\xbe\x03\xbb\xe0\x10\xbd\
610
+ \xa7\x86\xec\xfc\xe2\xd9\x58\xfd\x5f\x83\x69\xf0\x86\x9d\x19\x23\
611
+ \xd9\xd1\x9b\x8d\x3e\x5c\x97\x2e\xe8\x8f\xef\xd1\xa5\xd8\xe7\xfa\
612
+ \x62\x82\xc6\xd6\xf5\x9f\xee\xfd\xd5\x3f\x39\xd1\x70\x7e\x33\xf3\
613
+ \xf7\x7c\x4a\x9f\x61\x2c\x5b\x17\x0b\xf1\xcd\xbc\xab\x97\x3f\xd3\
614
+ \xbb\x9c\x1a\xc7\x10\x8b\xc5\x2a\x1c\x03\x27\xc8\x3c\x4d\x6c\x8f\
615
+ \x4d\x88\x51\x59\x17\xec\x1a\xb0\xc9\xe6\x18\xdf\x67\xfd\xc0\x58\
616
+ \xb3\x3f\x8c\xcb\x73\x59\xf3\xcc\x5f\xf8\xa4\xa5\x8e\x97\x39\x24\
617
+ \xfb\x8a\x07\xe1\x07\x62\x91\x73\xb0\x2b\xd7\x4c\x8e\xeb\x38\xf9\
618
+ \x14\x6e\xe1\xfa\xf0\x86\x7f\xb3\xfd\xbc\x0b\x00\xf6\xab\xcf\x89\
619
+ \x83\x62\x77\xde\x4f\x06\xb7\x61\x0b\xae\x45\x97\xf0\xd1\x31\x30\
620
+ \x02\x3e\xf2\x1d\x71\x48\x4c\x64\x5f\xec\x91\xff\xf2\x53\x39\x94\
621
+ \x7d\xe8\x5f\x9d\x5c\x5f\x87\xeb\xce\x62\x03\xf4\xe5\x5c\x30\x56\
622
+ \x4c\x26\x47\xfd\x70\x5d\xe3\x63\x07\xe4\xc1\x87\xc4\x2e\x5c\x88\
623
+ \xee\xe8\x38\x18\x97\xe7\xb3\xd5\xda\x46\xde\x87\x5b\xe7\x65\xb2\
624
+ \xd5\xb5\x5a\x7c\x87\x9f\xb2\x6b\xd8\xe5\xaf\x3e\xc0\x6b\xb8\x0c\
625
+ \x17\xc8\x26\xef\xd5\x66\x13\xb9\xff\x2f\xe7\x61\x1f\x6c\x34\x73\
626
+ \x81\x6c\x55\x3f\xc9\xc2\x77\xf8\x46\xee\xdd\xe4\x83\xb9\x17\x2b\
627
+ \xb5\x1d\xd8\x81\xc7\xc1\x71\xba\x35\x06\x36\xe8\x38\xe3\xc0\xed\
628
+ \xc5\x79\xf5\x07\x9c\xc8\xb8\x53\x5f\xca\x3d\x9f\x6c\x83\xcd\xf0\
629
+ \x3f\x75\x34\xf6\x60\x3f\xb9\x08\xbe\xe9\xdf\x30\x22\xcf\x9b\x24\
630
+ \x57\x98\xa6\x46\x2a\x3e\xf2\x53\xf8\x0d\xb7\x70\x59\xb6\xc1\xf7\
631
+ \xd8\x81\x35\x72\xae\x45\x57\x7c\x95\x8d\x88\x09\xfa\x63\xac\xfc\
632
+ \x86\xce\xd8\x11\xbc\x81\xd3\xf6\xa5\x7f\xf5\xc8\xcc\x91\x8d\xdd\
633
+ \xf3\x9d\xe7\x55\xe4\xde\x29\xfc\x19\x26\xc0\x54\xf2\x66\x17\xf0\
634
+ \xcf\x39\xc5\x1b\x36\x31\xb4\x21\xe7\xc0\x8b\xf8\xac\x36\xcc\xfd\
635
+ \xea\xfd\xd5\xd5\x0e\xb2\x0f\x1f\x72\x2d\x58\x07\x1f\x61\x1a\xd9\
636
+ \xb3\xed\xcc\xc7\xb0\x15\x71\xc3\x77\xb9\xf7\x23\xe7\x24\x47\xb9\
637
+ \x58\x9e\x07\x63\x7f\xbc\x4f\xfc\x26\x6b\x71\x99\xfc\xf5\x1d\x8f\
638
+ \x60\xcb\x79\x96\x28\x2c\xa6\x7b\x3e\xaa\xe6\x07\xff\xd8\x8d\xf1\
639
+ \xe7\xfd\xaf\xea\x04\xf2\x14\x76\x0a\xfb\xd8\x83\x6b\xe2\x94\x38\
640
+ \x8b\xd8\xa7\xf6\x81\x57\x38\x8f\x6b\x67\x1d\x1b\x9d\xe8\x37\x4c\
641
+ \x10\x2b\x1c\x2f\x9e\xaa\x43\xd0\x1f\xfd\xaa\x3f\x19\x3b\xcc\x17\
642
+ \x0b\xec\xa7\x6f\xfc\x5f\x2c\x87\x11\x74\xc2\x97\xc9\x87\x8e\xc2\
643
+ \x43\xd8\x39\xdc\xb7\xf9\x9c\x1a\x5c\xde\xcd\xc2\x76\xc6\x9e\x09\
644
+ \x94\x58\x20\xb6\xf2\x7f\x7d\x26\x4f\xb6\xc2\x27\x61\x15\x59\x89\
645
+ \x47\x6c\x58\x6c\x63\x83\xf5\x7e\x62\x8d\x0f\x79\xde\x5e\xe6\x05\
646
+ \x72\x6e\x98\x11\x4e\x59\xed\x25\xf7\xc1\xe5\x73\xfa\x01\x2b\xf1\
647
+ \x3d\x38\x26\xc7\x26\x3f\xfa\xe2\xfb\xf0\x2b\x76\x9d\xdc\xaf\xda\
648
+ \x0f\x5d\xf0\xe3\x3c\xa7\x25\x6b\x12\xe4\x94\x7e\x33\x0e\xb1\x1c\
649
+ \x76\xf0\x0b\xf2\xb6\x0f\x9d\x9a\x0b\xc2\x81\xe8\x92\x0c\xc4\x51\
650
+ \x18\xc1\x87\xd9\x20\xbe\xc3\xbe\x1d\xcf\xd7\xe8\x8f\x3f\xe0\x15\
651
+ \x74\x21\x66\xe6\x1e\x33\x76\x91\xb5\x4c\xc6\x6d\x63\xcb\x6c\x04\
652
+ \x7e\xb9\x26\xee\x24\xe7\x96\x57\xe1\xd9\xb8\x57\x9e\x27\xac\x2f\
653
+ \x7e\x67\x9b\x6c\x58\xed\xd3\x98\xf3\x0e\x03\xbe\x8f\x2f\x8a\xe7\
654
+ \x6c\xc7\xbe\x70\x84\xef\xc2\x30\xe3\x85\x4f\xb8\x1f\x2c\x51\x47\
655
+ \x57\x5b\x19\xbb\xff\x23\x72\x97\x1b\x64\xed\x45\x5d\xb7\x4a\xfe\
656
+ \x72\x08\xe3\xca\x3a\x95\xb1\xe3\xc9\x85\xfc\xd8\x73\x1a\x99\x89\
657
+ \xd3\x64\x8a\x4b\xf2\xc1\xfa\xac\xa6\xda\xaa\x1f\x93\x29\x6e\x65\
658
+ \xec\xce\xcf\xb6\xf8\x3b\xb9\xc3\x56\xe3\xce\xfd\x54\x75\x3c\xf4\
659
+ \x46\x7e\xa9\x07\xf1\x45\xf9\x27\xbf\xcc\x73\xbc\xd9\x03\x7d\xb1\
660
+ \x55\x58\x2e\x4f\xc5\x1b\x32\xf7\x8f\x73\xf9\x9e\xbf\xb3\x3b\xfa\
661
+ \x4f\x3c\xb5\x0e\xdf\xb9\xf8\x25\x7e\x02\x13\xc9\x98\x6f\xf9\xeb\
662
+ \x3c\x62\x2e\x59\x3a\x1f\x1c\x81\x37\x38\x03\x7d\xf8\x9d\xfe\x71\
663
+ \x01\xf6\xc7\x9e\xe0\x44\xee\x67\x61\x87\xf2\x29\xe7\x70\x1d\x72\
664
+ \x27\x07\x76\x24\x26\xb3\x81\xe4\x34\x74\xca\x5e\xe4\xa8\xec\x84\
665
+ \x4f\xc2\x5e\x9c\x99\x2e\xf8\xad\xfe\xc1\x00\xf5\x01\x9f\xab\xbe\
666
+ \x86\xfa\xcb\x9a\x44\x39\x70\xf8\x5c\x6a\xb4\xfc\xa9\xde\x6b\x55\
667
+ \xf9\x43\x8e\xc7\x11\xc5\x05\x3a\x8b\x1f\xc3\x49\x3e\xc6\xef\xc8\
668
+ \x5e\x7d\x58\x1e\x27\x9f\x20\x03\x32\x0d\x37\xac\xbc\x54\xfc\xc5\
669
+ \x2b\xf9\x7f\xbd\x86\x9c\x8a\xfe\xe0\xe9\x70\x0d\x5b\xde\x49\x92\
670
+ \xd8\x23\xde\xb3\x15\xdc\xdc\xf5\x8d\xcb\xa6\x0f\x62\x2d\xbc\xd5\
671
+ \x17\xbe\xe2\x77\x3e\x0e\x8f\xf1\x32\xbc\x83\x9d\xb2\x0d\xf8\x4f\
672
+ \x1f\xe4\xcf\x2e\xf8\x35\x5f\xe3\x77\xfc\xdd\xe6\x78\xf3\x17\xec\
673
+ \xc2\xb8\xe1\x72\x9e\x1b\xa1\xb1\x25\x7e\xc9\x96\xa2\x7f\xfb\xfb\
674
+ \x9d\xbc\xfc\xdb\x78\xe1\x1e\x6c\x10\x2b\xfc\x65\x33\x6c\x8b\xde\
675
+ \x61\x0a\xfc\xd0\x5f\xf1\x28\xcf\x20\x62\x1b\x36\xb9\x2a\xfb\x87\
676
+ \xe3\xb9\xbf\x55\x9c\x90\x1b\xb0\xad\xac\xff\x1f\x3e\x0f\x24\xf2\
677
+ \x83\x51\x79\xff\x99\x31\x6a\xc1\x68\x76\x30\xeb\x9e\xf5\xd8\x02\
678
+ \xdc\x20\xff\xdc\x6b\xac\x3f\x62\x81\xda\x1a\x9f\x94\x2f\xb1\x77\
679
+ \x9c\x97\xbd\xd3\x45\xee\xed\x8b\xbf\xd6\x67\x10\xb0\x63\x98\x51\
680
+ \xfb\x91\xf7\xaa\xd7\xe7\x5c\xd7\x35\x4c\xec\x26\xef\x7c\x82\x5b\
681
+ \x3e\xe3\x50\x74\x45\x1f\x6c\x83\xac\xc4\x46\x39\x17\x4e\x41\xb6\
682
+ \xb0\x1c\xa6\xf0\x77\xf1\x33\xeb\x31\x8c\x85\xde\xf4\x47\xec\x34\
683
+ \xa6\xc4\x16\x0d\x2e\xc1\x38\xb1\x82\xdf\x26\xc6\x89\x91\xbe\x0b\
684
+ \x27\xcc\x7b\x02\xf9\x03\xfe\x4f\xbe\x78\xbc\xf9\x0e\xf6\xc8\x0f\
685
+ \xf8\x3a\x9f\xc5\x5f\xc4\x5a\xfc\x10\xe6\xd9\xd7\xb9\xf5\x9b\x1f\
686
+ \x93\x89\xb8\x04\x4b\x5d\x03\xbe\xe3\x76\x62\x11\x9b\x11\x1f\xd9\
687
+ \xa7\xf1\xd9\x1f\xf7\x53\x63\x4a\x5d\x7e\xe8\xff\x55\xa7\x8e\x91\
688
+ \x77\xf3\x83\xfc\x16\xbf\x0c\xde\xd6\xfb\x08\xab\x0f\xea\xaf\x18\
689
+ \xcd\x0f\xc9\x8a\x5c\x9d\xcf\x78\x7c\x26\x43\xb5\x04\x32\x80\x15\
690
+ \xf6\xc7\x69\x70\x83\x3a\x67\xab\x19\xaf\x98\xc6\xa6\x6a\x3f\xf3\
691
+ \xec\xeb\x6a\xc3\xe9\x03\x7d\xab\xf5\xc2\x4d\xbf\xeb\xc3\x90\xe7\
692
+ \xfa\x37\x9d\xd0\x0f\x19\xf2\x71\x32\xe3\x2f\xbe\xe3\xbb\xb9\x47\
693
+ \x0c\xde\x91\xbf\xbe\xb2\x2b\xbf\x8b\x7f\x8e\xb3\xb1\x15\x7f\xe9\
694
+ \x8e\x7e\x6d\x3e\xdb\xc7\x86\xab\xb0\x17\x5c\xdf\xb8\xd9\x9c\xb8\
695
+ \xe6\x37\xfe\x0b\x17\xc5\x72\x3c\x2f\xef\x2d\x0b\xf6\xdb\x17\x76\
696
+ \xe9\x97\x63\xf2\x5c\x62\xb6\xe2\x7c\x30\x50\xad\x8c\xad\xe2\x32\
697
+ \x79\x5e\x8a\x1c\x1a\xde\xf1\x29\x72\xca\x9a\x2e\xf5\x98\xf0\xf5\
698
+ \xb1\xdc\x37\xdf\xe1\xc7\x72\xaf\xd4\x29\xaa\xdc\xc2\xd1\x52\x1f\
699
+ \xa9\xb6\xc0\xf7\xb2\x0e\x40\x63\x97\xc6\x95\x78\x62\xae\x2b\x79\
700
+ \x13\x0c\x83\xff\x6c\xc2\x5a\xbf\xca\x25\xa3\x2f\xe7\x97\xcb\xe1\
701
+ \xba\x59\x0b\x5c\xeb\xfc\x63\xeb\xd7\xe9\x0b\x26\x8a\xb9\xe1\xc1\
702
+ \xe4\x49\x27\x99\x7f\xad\x9b\xfc\x8e\xdc\xc5\x4f\x7f\xc5\x4c\xbe\
703
+ \x26\x0e\xc0\x5f\xf6\x0a\x3b\xd4\x9e\x71\x05\x7e\x27\x86\xe2\x33\
704
+ \xe4\x24\x96\xeb\x63\xe6\x0e\xd9\x88\xcd\x67\x79\x5e\xd6\x13\xe6\
705
+ \x5e\x11\x7f\xc5\x7c\xe7\xc0\xe9\xf3\x4c\x41\xf9\x22\x9c\x17\x93\
706
+ \x60\x76\xe6\x93\xf5\x9d\xac\xf0\x11\x7f\xf5\x99\x8e\xe1\x8d\xf3\
707
+ \xc0\xe9\xbc\xf7\x43\x73\x0c\xdd\xc3\x5c\x18\x40\x0e\x62\x9c\x3a\
708
+ \xb1\x98\x16\x7d\x8e\x61\x78\xce\xc1\x77\xf0\x05\xbe\x97\xf7\x26\
709
+ \x46\xee\xa9\x65\xc2\x3c\x5b\xe6\x5f\xe0\x99\xf8\x06\xe7\xd9\x9c\
710
+ \xe6\x7b\x7d\x8d\x9f\x5b\x0b\x97\x9c\x0e\xe7\xc5\xc5\xf4\xdf\xbf\
711
+ \x53\xab\x1f\xde\xbb\x41\x17\x64\x9f\xb5\xa0\xd5\xee\x6a\xcb\x71\
712
+ \x30\x84\x5c\xe4\xd0\xf0\x9c\x0e\xd8\x5b\xee\xf7\x83\xbf\x36\x7a\
713
+ \xc1\xb3\x12\x13\x6c\xec\x9d\x5e\xe9\x9b\x5d\xca\xf9\xe1\x16\x4c\
714
+ \x66\xc7\xfc\x08\x0f\x20\x6f\xf6\x2a\xa7\x51\x7b\xcc\xbb\xe0\x6c\
715
+ \xc6\x41\x0e\x64\x03\x63\x72\xdf\x5a\x38\x94\x7e\xd2\x21\x4c\xe3\
716
+ \xbb\x6a\x36\x7c\x86\xef\xe2\x0d\x3e\xcb\xdb\xd8\x86\x1c\x9e\xcd\
717
+ \xb0\x81\xe4\xbf\x64\x46\x9f\x30\x01\x0f\x86\xf1\xc6\x5c\xe5\x22\
718
+ \x5e\xd1\x4b\x7d\x7e\x1b\x7f\x36\xde\x59\xbe\x5f\xbf\xa7\x73\x1c\
719
+ \x40\x7d\x27\x35\xaf\xac\x9f\x66\x5f\xec\x9e\x6c\xc5\x72\xfe\xc0\
720
+ \xdf\xd9\x2f\xec\xe3\x7b\xfa\x14\x9d\x64\x0d\xb4\xfe\x90\x0d\x9b\
721
+ \xd4\x2f\x7a\x91\x8b\xb8\x0e\x4e\x12\x2e\x37\xe4\x73\x59\xd7\x65\
722
+ \xdf\xc8\x6f\xde\x73\xec\xd2\x7f\x7d\xa4\x33\xb1\x5e\x1e\xe3\xfc\
723
+ \xf0\xdc\x67\x39\x2d\x5d\xe9\x33\xec\xcf\xf3\xbe\x6c\xa9\xdd\x65\
724
+ \x63\xd7\x79\xbf\x33\x1d\xf1\x73\xc7\xe7\xfb\xac\xff\x1e\x3e\x43\
725
+ \x6e\x58\xd7\xb0\x8f\x63\x9c\x9f\x6d\xf0\x31\xf9\x9d\x5c\x5b\x7c\
726
+ \xe6\xf3\xb0\x99\x7c\xd8\x0f\xdb\xe3\x23\x78\x0e\xbd\x8b\x8f\xe1\
727
+ \xf2\xf0\x94\x0d\xc2\x83\xac\x81\x88\xfe\x72\x2d\x4d\x8c\xe1\xf3\
728
+ \xf4\xef\x5a\xf2\x84\xea\xe7\xb3\xe4\xe7\x77\xf9\x92\x3a\x2c\x7c\
729
+ \x8b\x2f\xc3\x6b\x38\xa4\xfe\x88\x6f\xe0\xf2\x70\x1d\x47\x83\x15\
730
+ \xfc\x47\xee\x14\xff\xaf\xf1\x22\x7f\xb3\x5e\x82\x3e\xc8\x9f\x2c\
731
+ \xd9\xc6\x2c\x7f\xce\x9c\x30\xdc\x48\xec\x9a\xf7\x2c\xbb\xc8\x01\
732
+ \x3f\xc3\xa9\x1d\x2b\x76\xb2\xc9\xa1\x9e\xc6\xee\xb7\xaa\x35\xc9\
733
+ \x6c\x89\x77\xfc\x8d\xff\xab\xa5\xca\xb5\xf4\x87\x3f\xa4\x86\x28\
734
+ \xfe\xd9\x8c\x27\xf6\x64\xbc\x6c\x87\x5e\xe5\xc4\xec\x1e\xd6\xc0\
735
+ \x1d\x3e\x4e\x56\x62\x0c\xdf\xa0\x73\x1c\x4d\xfc\xc8\xdc\x38\x9c\
736
+ \x61\xc7\x70\x32\xef\x29\x12\x2f\xf4\x45\x9e\x07\xa7\xc3\x53\x33\
737
+ \x96\xaa\x7f\xf5\x47\xfa\xa7\x23\x5c\x24\xf2\x99\x27\x3b\xcd\x38\
738
+ \xd5\x19\xd8\x17\x5d\xc1\x71\x78\x45\xef\xfc\xdd\xb9\xc4\x54\x63\
739
+ \x87\x83\xf8\x5c\xb0\xcc\xbf\xd3\xf4\x01\x37\xc9\x7c\xfc\xd4\xf7\
740
+ \xd4\xd5\x67\x1e\xa9\x01\x1b\x2b\x7b\x21\x67\x98\x34\xef\x79\xc6\
741
+ \xd1\x21\x5f\x83\x1f\x7c\x87\x0d\x88\xd3\xfa\x53\x7f\x27\xe3\x3c\
742
+ \xf7\x9f\x2e\xe4\xd5\xec\x9c\x4e\xe0\x12\xfb\x97\x4f\xc1\x5d\xbc\
743
+ \x4b\x6e\x26\x47\xe3\x57\x89\x21\x7c\x12\x2e\x88\x1d\xe1\x05\xc6\
744
+ \x2b\xce\x88\xc5\xfc\x84\x6f\xe0\xd3\xfa\x6e\x4c\xfa\x05\x07\xc8\
745
+ \x50\x6c\x62\xab\xf0\x05\xc7\x50\x37\x8c\x0e\xd9\x12\xbb\x11\x07\
746
+ \xe8\xc0\x5f\xba\xc4\xff\x70\x7d\x35\x06\x3e\x32\x56\xcb\x33\x6e\
747
+ \x76\x63\xbe\x88\x3f\x8f\xf1\xa6\x59\x72\x77\x2d\xb5\x0d\x31\x4f\
748
+ \x3c\x12\x0f\xf9\xbe\x73\x8e\xbd\x5f\x08\xb6\xc2\x29\xe3\xa9\xcf\
749
+ \x4f\x70\x1e\xf1\xd8\x79\x60\x3d\x9c\x50\x3f\x71\x3e\x31\xcc\x38\
750
+ \xd8\xf8\xac\x7b\xdf\x12\x07\xf9\x8d\xf3\xe2\x67\xfc\x63\xea\x33\
751
+ \x33\xf5\x03\xc6\xf3\x3f\xf1\x0a\x07\x8e\xbe\xc8\x9d\xfe\xfc\xc5\
752
+ \xa5\x9d\x97\xbe\xe9\x3d\xcf\x9c\xc0\xc3\xd9\x84\xdf\xe9\x5e\x8c\
753
+ \x33\x4e\x31\x99\x0f\xe4\xd9\xdf\xf9\x9c\xcd\x7e\x79\x77\xbc\x63\
754
+ \x1d\xc3\x77\xeb\x5c\x05\x39\xf2\x69\x9c\xcf\x7e\x8e\x61\x87\x99\
755
+ \xcf\x8a\x3e\xf2\x7c\x41\x1c\x38\xcf\xc5\x73\x8d\xdc\x77\x34\xf6\
756
+ \x2c\x31\xf2\x31\x46\x35\x42\x73\x44\xb9\x7f\x7d\xd1\xf3\x26\x22\
757
+ \x53\xfd\xcc\x7b\x51\xe9\xcf\x06\xf7\xb2\xce\x62\x98\xfb\xcd\xb2\
758
+ \x23\xf6\x4e\x6e\x64\xcb\x37\xc8\x42\x3c\x4f\x0d\x46\xee\x2b\x66\
759
+ \x04\xc3\xea\xb1\xc6\x0c\x7f\xf8\x3e\xf9\x92\x0b\x1e\x88\x73\xd4\
760
+ \x5a\xf1\xbc\x96\x7d\xd8\x98\x79\x11\xb9\x91\x1c\x0a\x9f\x12\x13\
761
+ \x60\x29\x1b\x94\xf7\xd3\x29\x5d\xc2\x5e\xf8\x6a\xe3\xa3\xbe\x37\
762
+ \x06\xbe\x49\x5f\xea\x05\x6a\x2e\xc3\x7b\xd2\xc7\x64\x49\xe7\xce\
763
+ \x33\x9c\x6b\xcb\x7c\x33\x1b\xc9\xba\xa3\xa1\x0f\x0c\x1b\x2c\xd0\
764
+ \xdf\xac\x6f\x1e\xe3\x4b\xb9\x0e\xfb\xc8\xb3\x9b\xf9\xb1\xf1\x55\
765
+ \x79\x2c\xea\xb7\xc6\x66\xd4\xa3\xd5\x21\xe4\xa2\xae\xab\x8d\xc5\
766
+ \xdf\xb1\x5a\x80\x06\xcb\xc4\x2f\xbe\x04\x17\xe1\x2a\xff\xc3\x5d\
767
+ \x82\x9d\xf0\xb1\xd6\x94\x33\x06\x1c\x8d\xcd\xd1\xbf\x6b\x93\x3b\
768
+ \xde\x9c\x7b\x29\xa7\x3c\x3f\x27\xfd\xe0\xc3\xf8\x54\x9e\xe3\xb3\
769
+ \x48\xd6\xb5\xb9\x36\xdc\x30\x87\x02\xfb\x7d\xc6\x47\x60\x99\x98\
770
+ \xad\x9f\x55\x06\xb3\xfa\x31\xac\x53\x6b\x64\x89\xaf\xcf\x7b\x4f\
771
+ \xc3\xac\xb1\x0e\x39\x66\xdd\x8f\xac\xe0\x84\x39\x1f\xb6\xbb\x96\
772
+ \xf7\x41\xe5\x1c\xe4\x6c\xfe\x45\xed\x50\xde\x3a\xbc\x6f\x78\x5e\
773
+ \xcb\x3e\x62\x1a\xec\x20\x77\xf5\x54\xfa\x97\x87\xc9\xad\xe9\x1e\
774
+ \xce\xaa\x81\x85\xdb\xd5\xc6\x56\xf9\x19\xfb\x51\x27\x91\x5b\xc8\
775
+ \x91\xb3\x5e\x70\x6a\x1f\xf8\x30\xdc\x11\x47\x72\x7f\xd0\x70\xfe\
776
+ \x71\xc8\xdf\xe3\x27\xf8\x8d\x63\xe5\xa0\xe6\x55\xd4\x55\x33\x4f\
777
+ \x90\xf5\x09\x70\x4c\x7c\xc1\xf5\xea\x75\xf3\x79\x8a\x9d\x4e\x1d\
778
+ \xcb\xac\xdf\xea\x75\xc4\x04\xb1\x2e\x6b\xc3\xc8\xac\x8e\x79\xea\
779
+ \xb5\xc2\xbd\xcd\x3d\xb3\x21\xe3\x9b\xaa\xff\x34\xfe\xaf\x2e\x89\
780
+ \x2f\x91\x1b\xee\x4b\xef\xfc\x1a\x9e\xf2\x21\xdc\x0c\x0f\x1b\xe3\
781
+ \xe3\x1a\x6e\x24\x5e\x90\xf9\x5a\xde\x75\x9e\xf1\xe2\x75\xe2\x8c\
782
+ \x3e\x4c\x1d\x43\x7e\x97\xab\xc2\xbe\xd4\xc2\x6b\x63\x1b\xea\xb1\
783
+ \xd6\xe5\xe8\x9f\x58\x47\x66\x6b\x69\xb3\x70\x61\x56\x7f\x86\x9f\
784
+ \x6b\x8b\xcd\x1a\x6f\xde\x39\xc0\x6f\x86\xcf\x7e\x9e\xda\x2f\x4d\
785
+ \x9c\x94\x93\xa8\x05\x88\x3d\x6b\x3d\x8f\xfc\x1b\x7e\x93\x11\x1f\
786
+ \xa2\x03\x36\xc0\x3e\xf3\x4e\x44\x31\x37\x73\x0b\xb5\xe5\x3a\xf8\
787
+ \x8f\xf8\x91\xb5\x3e\x53\x9e\x9f\x57\xd7\x12\xe0\x8e\xb0\x3b\xf1\
788
+ \x6b\x2a\x07\x72\x5d\xf6\xaf\xbf\xa9\x4f\x8c\xcd\x37\xe2\x16\x30\
789
+ \x8c\x0d\x90\xfd\xbc\x79\x92\x55\xb6\xe0\x16\xbc\xb2\x76\x00\x6e\
790
+ \xcb\x5d\x16\xe5\xcb\xb3\xce\xa5\xe1\x2e\x7c\x5f\x8d\x42\x0e\x33\
791
+ \xf5\xf9\x95\x19\x3b\xfe\xa3\x56\x21\x2f\xa0\xbb\xdc\x3b\x3f\xcc\
792
+ \x21\x16\xf1\x48\x36\x9c\x39\x43\xe7\x58\xf4\x8e\xd3\xe8\x48\xdc\
793
+ \x97\x2f\x19\xc3\x58\xce\x3f\xef\x9a\xec\x85\xee\x53\xcf\x1e\xfa\
794
+ \x60\xd6\xb9\x66\x4e\x02\x96\xc9\x13\x87\x35\xf6\x45\x5c\x79\x19\
795
+ \x2d\xd7\x92\x63\xc3\x3a\xbe\x8f\xa3\xe0\x95\xf5\xf7\xa9\xad\xf6\
796
+ \x55\xdd\xc8\x9a\x20\x18\x30\x8c\x9f\x1b\x69\xa9\x0b\xc2\x7e\x31\
797
+ \x7a\x16\x37\xa5\x6f\xfa\x87\x15\x30\x44\xed\x4c\xce\x3e\x4b\xa6\
798
+ \xe9\x1b\x3d\xc8\x97\xf2\xbe\xbe\x29\xfd\xae\xf9\x8f\x7a\x01\x8c\
799
+ \x92\x9b\xc0\x28\x39\x5c\xea\xbd\xea\x56\xc9\xbd\x12\x53\xd4\xe7\
800
+ \xac\x71\xc8\x7c\x75\x3d\x67\x5d\x07\xba\x8a\x16\xde\x02\x23\xd5\
801
+ \x14\xf1\x3e\x35\xa6\xb1\xe7\x61\xac\xe5\x9c\x5a\xde\xad\x0a\x53\
802
+ \xf8\xe0\x5a\x9e\x61\xeb\xba\x7c\x15\xff\xe4\xf7\x79\x9e\x1b\x2e\
803
+ \x89\x33\xe1\x54\x7c\x33\xeb\x79\x73\x4c\xed\xaf\xba\x38\x1f\xb6\
804
+ \x2e\x1a\x0e\x89\x47\x70\xa0\xae\xd1\xad\xd7\x4b\xdf\xe5\x9c\xf8\
805
+ \x0f\x0c\x9c\x2a\x83\xfa\xfe\x08\xc7\xcb\x81\xe4\xa0\xc6\x6e\x4e\
806
+ \xd4\xda\x2b\x6b\x75\xe8\xd9\x5a\x54\x39\x2a\xfd\xa7\xae\x09\x2f\
807
+ \xd4\x7e\xc8\x8c\x8d\xb0\xed\xd4\x04\x93\x3b\x8f\xe5\xeb\x1b\x69\
808
+ \x39\x97\x1c\x99\xcf\xf3\x7d\xf3\xeb\xa9\xdd\xaf\xf7\x5a\x35\x97\
809
+ \x23\x0f\x75\x5f\xf3\x2a\xf0\x7c\x11\xaf\xad\x7a\xe0\x37\xea\x3d\
810
+ \x99\x7f\xc9\x73\x73\xf1\x2a\xb9\x14\x0e\x2d\x7e\xca\x37\xc6\x6a\
811
+ \x54\x38\x98\x5a\x64\xee\x0f\x57\x83\x12\x97\xc6\xfc\xbf\xea\x8f\
812
+ \x9e\xc4\x64\x3e\x3b\x45\x0e\x15\x37\xf8\x0e\xee\xaa\x36\xa0\xe6\
813
+ \xa6\xcf\x6a\xf4\xe6\x21\xe0\x20\x5b\x64\x13\xb0\x36\xef\x61\x97\
814
+ \xd3\xe2\xba\x72\x66\xb9\x57\xde\xfd\x18\x8e\xab\x46\x0a\x9f\xb3\
815
+ \xf6\x78\x59\x36\x10\x9b\xc2\x73\x72\x0f\x99\xfe\xe7\x1e\xac\x8d\
816
+ \x60\x4e\x9d\x53\x51\xb7\xc3\x29\xc8\x62\x6c\x0e\x6e\xec\x38\x63\
817
+ \x95\xf3\x91\x13\xbe\x8f\x07\xaa\xf7\xc8\x09\x33\xc7\xc6\x4e\xe1\
818
+ \xac\xfc\xb0\x3e\x9f\x36\xe7\xe0\x4b\xe6\x9b\xd8\xb6\xfa\x58\xe6\
819
+ \xbb\xc6\xe4\xa0\xc9\x17\xd8\x0a\xd9\x3b\xf7\x14\x59\xe7\x5a\x59\
820
+ \x3f\xa4\x3f\x6c\x2c\xcf\x1f\xcb\xfb\x62\x70\x42\x75\x3a\x36\x99\
821
+ \x7b\x5b\xe0\xad\xb5\xb9\xe6\x4b\xac\xc3\x95\x77\x65\x73\x1f\x97\
822
+ \x1a\x5c\xec\x85\x5d\xe0\x51\x79\xe7\xdf\x46\x6d\x20\xe7\xe0\x93\
823
+ \x38\x2e\xdd\xe7\x5d\x09\x75\x5c\x1b\x6d\xae\x21\xae\xb1\x6d\x6b\
824
+ \x4d\x9d\xbf\xce\xc5\x8f\xb5\x5c\x5b\x9d\x0d\x2f\x52\x57\x85\xdb\
825
+ \xea\xe0\x70\x9f\x9c\x71\x2b\x79\xbd\x79\x05\xf5\xca\xa1\xfe\x83\
826
+ \x33\xea\x08\xb0\xdc\x5a\x01\x5c\x60\x58\x6b\x8a\x3d\xa8\xd5\x99\
827
+ \x4f\x36\x47\xa6\x06\x32\xa5\x56\x50\xcf\x05\xbb\xc5\xb8\xfa\x8e\
828
+ \x86\xb1\x39\xa3\x3c\x4b\x0c\x47\xa0\x7f\xba\xce\x7d\x80\xc9\x6b\
829
+ \xc4\x0f\xf3\xf0\xea\x70\x74\x43\xff\xec\x41\x0c\x33\x17\x8e\x2f\
830
+ \x2c\xf2\xa3\x45\x2d\xdc\x82\x0c\xd9\x98\x7b\x08\xc5\xbb\x7a\xaf\
831
+ \xfa\x46\x5b\xce\x21\x3e\xab\x55\x9a\x4f\x90\x57\xf2\x8b\x79\x9c\
832
+ \xa6\x62\x87\x39\x0c\xf5\x3f\x18\xc5\xcf\xe9\x3e\xcf\x08\x83\x99\
833
+ \xce\x4b\x77\xc3\x77\x39\xa4\xe1\x0a\xea\x2d\xd6\x41\xc2\xe0\xd4\
834
+ \x3f\xab\x0d\x66\xed\xa9\x98\x02\x73\xb2\xc6\x74\x58\x93\x1c\xf6\
835
+ \x31\xdf\xab\x51\xe9\x87\x6b\xc5\x6e\xe6\x6d\x1a\x3c\x10\x8f\x70\
836
+ \x01\xf3\x31\xb8\xa1\xef\x32\xd7\x9c\x7b\x43\xf2\x0c\x05\xb5\x98\
837
+ \xbc\xe7\xc2\xba\x1f\x39\xf5\x7a\xdf\x09\x90\xb1\xcb\x53\xf2\x6e\
838
+ \x6e\xf8\x6a\xce\x65\xd6\x78\xd7\xdb\xe2\x63\xc6\xc8\xce\xdd\xbb\
839
+ \x87\x1b\x8d\xe5\xed\xf5\x18\x8d\xae\x92\x4b\x19\x3f\xfb\xe4\xef\
840
+ \xe6\x26\xe1\x02\x2c\x65\x23\xf5\x3d\x3e\xc3\x86\xbf\xe3\x89\x62\
841
+ \x29\x2e\x80\x13\x56\xdf\x81\x23\xf0\x9e\xfe\x61\xc5\xf0\xdd\x5b\
842
+ \x63\xf2\xa8\x32\x37\x47\x99\x75\x97\xa9\xe1\xcc\x3b\xb6\xda\x40\
843
+ \xee\x6d\x99\xd2\xd8\x95\x78\x06\x9b\x8c\x45\x4c\xc4\x09\xe6\x8d\
844
+ \x7d\xac\xc5\xf6\xd5\x8e\xad\x0d\x75\xbf\x96\xf8\xa3\x9e\x3a\xd6\
845
+ \xff\x8d\xb6\xc8\x2a\xef\xa0\x72\x2d\x3a\x64\xd7\xf3\xec\x37\x7d\
846
+ \xc0\xed\xcc\x0d\xe7\x1d\x8a\x64\xad\xaf\x6a\x27\x43\xd9\xc1\x15\
847
+ \x5b\xad\xf3\xb0\x69\xbc\x03\x5f\x80\xa7\xf8\x94\xdf\xf8\x97\x9a\
848
+ \xac\x39\x04\x39\x0a\xfd\xd5\x5a\xf7\x18\x47\xac\x71\x17\x27\x87\
849
+ \xf9\x74\xc1\x8f\xc7\xde\x99\x9e\xba\xca\x2c\xfc\xa8\x9f\x6b\x9c\
850
+ \x18\xc6\x8d\x61\x33\xf7\x43\x0e\xe2\x5e\xbd\x2f\x62\x51\xcb\x98\
851
+ \x60\x25\x5f\x52\x9f\xe5\xfb\xd6\x59\xca\x8b\x87\xfd\x5a\x46\xab\
852
+ \x72\x24\x73\xbe\x2b\x0e\xc8\x8d\xe6\x3d\xc3\x3a\xdf\xc1\x42\xf8\
853
+ \x6a\xcd\xaf\x1c\x35\x35\x92\xba\x8f\x3c\x09\x57\x10\x3f\xe9\x34\
854
+ \x6b\xcf\x34\xf1\x38\x1c\x5a\xfc\x70\x9f\x0e\x5b\x10\x6f\xf1\x71\
855
+ \x71\x16\x2f\x1b\xf6\x35\xf3\x6c\x43\x3d\xf8\x2b\x7e\x8b\x49\xe2\
856
+ \x0a\xfc\xce\xfd\x6b\x63\xbe\xbe\x68\xde\x6c\x8a\xbc\x2b\x9f\x49\
857
+ \x5f\x32\xa7\xcb\x16\xa6\xcc\xcd\xe5\x3c\xc6\xc4\xd6\x71\x31\xf7\
858
+ \x83\xcb\xcb\x0e\x38\xe0\x80\x75\xd5\xe8\xa7\xb6\x6a\x77\xf4\x24\
859
+ \x0f\xc7\x39\xc4\xf1\x59\xb2\x4b\x33\x36\xb1\x31\xef\xa4\xcf\x77\
860
+ \xe4\x40\xef\x62\x37\x2e\x05\x23\xac\x55\xb0\x56\xb4\xde\xc3\x85\
861
+ \x17\xca\xaf\xd4\x72\xe4\x8d\xee\x69\x95\x8b\x18\xbf\x7a\xa7\xfa\
862
+ \x91\x36\xd4\xf1\x90\xa3\x06\x33\xd4\x90\xd8\x13\x3b\xb6\x4e\x3f\
863
+ \xeb\x84\x37\xab\x66\x1b\x1d\xc2\x3e\x9c\x43\x3c\x18\xae\x81\x9b\
864
+ \x77\x1c\xdb\x85\xfb\x78\x27\x2c\xe6\x5b\x63\x31\x6f\x15\xfd\x26\
865
+ \x63\x18\xcb\xff\x70\x5f\x39\x8d\xf9\x91\xb1\xf9\xaf\x79\xe7\xb0\
866
+ \xc1\x01\xbe\x27\xff\xc7\x2b\xd4\xdb\xe5\x6c\x74\x2d\x47\x14\xcb\
867
+ \xc3\x31\xd4\x72\x8d\x15\xd6\xa9\xc3\xe0\x82\xf5\x3e\x9f\x8a\x41\
868
+ \xc3\xfc\x80\x7d\xe0\x61\x78\x03\xbc\x17\x2b\x70\x8f\x7a\x2f\xec\
869
+ \x66\xe9\x3e\x2d\xeb\x69\xf9\x8f\x79\x24\xfc\x7a\x9e\xfe\x63\xcf\
870
+ \x6a\x4e\xfa\x8e\xeb\xcb\x27\x60\x70\xee\x55\x5e\x16\xdf\x5f\x64\
871
+ \x83\x36\xf6\x86\xcb\xf2\x43\xeb\x2a\xac\x89\x9b\xc7\x07\x6b\x1c\
872
+ \xc5\x83\x52\xd3\xb7\x46\xca\x9c\x20\x7b\xb2\xbe\x42\xee\x64\xae\
873
+ \x10\x97\xc5\xf5\x53\x17\x14\x0f\xd4\x7f\xe5\x4f\x30\x1b\x66\xca\
874
+ \xc9\xc7\xb8\x17\x1f\xa1\x73\xf6\x95\xfb\xe6\x70\x0f\x58\xeb\x5a\
875
+ \x6a\x04\xe1\x00\xcb\xac\xc5\xad\xa5\x45\xff\x72\xe1\xac\xed\x9e\
876
+ \x25\xfb\x7c\x0f\x2b\xe5\xd1\xc9\xf5\xe4\x4e\xf2\xa6\xb5\xbc\x53\
877
+ \x6a\x51\x9b\x82\x83\xf1\x19\x31\x57\x6d\x27\x76\xa8\x3e\x33\x2f\
878
+ \xa7\xcd\x71\xd6\x7b\xe0\xbe\x38\x0b\xdd\xe0\x04\xf4\xaf\xbe\x27\
879
+ \x16\xc0\x01\x31\x00\x4e\xd7\x63\x8d\x15\xee\xa9\xb7\xe4\x59\xd0\
880
+ \x72\x28\x98\x9e\x35\xd8\xf8\x08\x5e\xea\xbc\xf2\x6c\xeb\x9f\xc4\
881
+ \x09\x5c\x0b\xd7\xae\x35\xd8\xad\xd2\xbd\x16\xfd\xb3\x77\xf8\x9d\
882
+ \xfb\x2d\x67\xe5\x1a\x7c\x06\x06\xaa\xc1\xa8\xef\xcb\x21\x71\x56\
883
+ \xb1\x6b\x2b\xf0\x2b\xdc\x0a\x17\x70\x8f\x99\x58\xa4\x46\x2a\xce\
884
+ \xcf\x92\x6d\x30\x8c\x9d\xa8\x21\xd0\x91\xdc\xcd\xb8\xe4\x93\xf2\
885
+ \x44\xf1\x1f\xf6\xe7\x79\xee\xc3\x78\x6e\xed\xa4\x7a\x02\x2c\x50\
886
+ \x83\xe3\x03\x6c\x41\x6d\x48\x1c\x61\x1f\xe6\xbf\x7d\x9f\xe7\xab\
887
+ \xb8\x9e\xf8\x14\x99\xaf\x67\x4e\x74\xd9\x2d\x6b\xea\x71\x57\xe3\
888
+ \x1f\xcb\x3d\x32\x7e\xfb\x8a\x5d\x62\x24\xdd\xcb\xbf\xc5\x0c\xbc\
889
+ \x6b\x99\xbe\xbf\x96\x96\x7e\xb1\x4b\xfc\x85\x5d\xaa\x75\x5a\x4f\
890
+ \x39\xeb\xdd\x46\xf9\x4e\x8e\x6a\x5e\xd1\x73\x8a\xf8\x3c\x19\xe0\
891
+ \x7b\xd6\x77\xd9\xd4\x19\xc6\xe6\xda\x73\x4d\xfc\x03\xbe\xf3\x19\
892
+ \x31\xdc\x3d\x7e\x64\x68\xad\xaa\x5c\x11\xbe\xe8\x83\x5a\x4c\x9e\
893
+ \x3d\x52\x9f\x4d\x54\xd7\xf9\x6c\x95\xec\x5c\x1f\x56\x89\x71\xec\
894
+ \x73\x88\xbb\x55\x7e\xc6\x94\x77\x20\xe0\x40\x38\xa3\xf1\xaf\xb5\
895
+ \x6e\xb0\xec\x16\x7d\xb0\x5d\x18\x06\x93\x3c\x8b\xca\x5c\x4f\xbd\
896
+ \xff\x7f\xec\x18\x39\xbe\xba\x25\x7d\xc3\x6b\x35\x41\xb2\xc8\x73\
897
+ \x76\x86\x5c\x3e\x78\x13\xde\x9c\x7b\x6a\x7c\xcf\x8f\x72\xff\x46\
898
+ \xe6\x1b\xcd\x55\xcb\x17\xcd\x85\x58\x6f\x24\xd6\xc0\x27\x6b\x8a\
899
+ \xc5\x81\x6a\x9b\xeb\xc5\xcf\xf5\xe4\x0c\x43\xbf\xd1\xa7\xf8\xcb\
900
+ \x70\xbc\x1a\x5e\x25\x8e\xc1\x57\x5c\x0b\x8f\xc1\xf7\xb6\x02\xf3\
901
+ \xc7\x5a\xfa\xca\x1e\xc5\xe3\xbc\xcb\x63\x91\x0d\x38\x86\x1e\x60\
902
+ \x36\x3e\x8e\x3f\xf0\xe3\xba\xb6\xb5\xe6\x0a\x8b\xfa\x90\xbf\xd6\
903
+ \x1c\x89\x2d\x6a\xa2\xd6\xae\x8a\x05\xf8\xa2\xeb\xa8\x3d\xa9\x11\
904
+ \xe6\x79\x4b\xb0\x27\xeb\xad\x37\x2b\x0f\xc8\xb8\x60\x93\x18\x26\
905
+ \xdf\xa9\xf7\xa9\x56\x3b\xe0\xf7\xe6\x30\xf1\x2b\xef\x5f\x31\x6f\
906
+ \x3a\xbc\xdf\x63\x3b\xb4\xf4\x85\x5d\xd2\xbb\xbc\xd0\x7c\xb1\xdc\
907
+ \x3c\xef\x65\x1a\x8b\x05\x7c\xd5\x3c\xab\x3a\x0e\xae\x37\xac\xdd\
908
+ \x55\x8e\x8e\x6b\xd2\x2d\x9e\x68\x0d\xb8\x1a\x11\xfd\x91\x91\xd8\
909
+ \xae\x56\x60\x1d\x01\x2e\x62\xc3\xf7\xcc\x03\xc0\x13\xf5\x47\x35\
910
+ \x24\xfb\xe6\x99\x9c\xf6\x65\x0f\xd6\xb8\xe2\xe0\x8b\xd6\x73\x2f\
911
+ \x43\x46\xf5\xf9\x26\xe2\xa4\xb9\xe5\xf8\x72\xc6\x19\x59\xe2\x55\
912
+ \xfa\x47\xf7\x9e\xf3\x20\x77\xc9\xbd\x35\xdb\x49\xf7\x69\xe9\x93\
913
+ \x3c\xc6\x3c\x8f\x35\x43\xe6\xbc\xf2\xac\x6f\x6d\x88\xe9\xc9\x69\
914
+ \xcc\x85\x0d\x75\x9f\x26\xbe\xcb\x0f\xf0\x3a\x73\xea\xee\x49\x60\
915
+ \x5f\x62\x8d\xda\x83\xb5\x21\xe2\xa1\x7b\x4c\xdd\x1b\x29\x9f\x54\
916
+ \x37\xc8\x73\x87\x67\x35\x98\xeb\x9e\x6a\x79\x88\xfa\x99\xfa\xf2\
917
+ \xd8\xb3\x4d\x36\x2a\x93\x21\x7e\xc1\x49\xdc\x4d\x4c\x92\xcf\x24\
918
+ \x67\xae\xeb\xc5\xac\x29\x50\xdf\x50\x63\x8d\xee\xed\x9b\xdf\xb7\
919
+ \x6b\xab\xeb\x06\xd5\xb5\xd9\x80\x98\x65\xac\x79\xff\x71\xdd\x6f\
920
+ \x56\x8b\x0d\xc8\xed\x60\xa4\x75\x0d\xea\xdc\xd6\x74\xc0\x73\x73\
921
+ \x3d\xb8\x70\xde\x55\x96\x79\x76\x38\xcf\xc7\x87\x36\x36\x36\x87\
922
+ \x9b\x86\x7b\xa8\x29\xb2\x29\x71\xa8\xde\xbf\xb6\xcc\xc6\xbe\xf3\
923
+ \x0c\xa2\xbc\x27\xa6\xde\x1b\xa9\xe1\x51\x38\x81\xf1\xa9\xeb\x06\
924
+ \xf3\xd5\x3a\xea\x78\xb6\x73\x8b\x6e\xf3\xac\x73\x3e\x49\x37\xe6\
925
+ \x58\xe4\x30\xf5\x99\x02\xda\x30\x4f\xc8\xf8\xf0\x37\x31\x1b\x86\
926
+ \xf0\x7d\x35\x21\xb8\xad\xd6\xa8\xd6\x2d\x57\x14\x6b\xe0\x37\x3b\
927
+ \xa3\x7b\x5c\x69\xd1\xbc\x4b\xbd\x66\xe4\x6e\x8d\x10\x4e\xc0\xce\
928
+ \xac\x51\x18\xf6\x65\xbd\x72\x80\x6d\xce\xad\x56\x8f\x8b\xe2\xb8\
929
+ \xfc\x82\xcd\x69\xb5\x56\xc2\x67\xc4\x34\xf7\x74\xb2\x69\x3c\x5a\
930
+ \x1e\x1c\xbf\xd9\xee\x7a\xaf\x2d\x63\xc2\xad\xe4\xf5\xe2\x31\x1f\
931
+ \x55\xbf\x97\xf7\xd5\x5a\xc7\x30\xe7\xd1\xf0\x21\x75\x3a\xb5\x1b\
932
+ \x3e\x19\xec\x1b\x6b\x7c\x83\x9d\xd9\x27\xf9\xd0\x54\x59\xd5\x98\
933
+ \xec\x5e\x3f\x71\x64\xd6\x7b\xe4\xa6\x9e\x4f\xd3\x0f\xe7\xc9\x3b\
934
+ \x20\x70\x7c\xf7\x2f\x88\x4b\x99\xab\xa8\xf7\xb3\xe3\xc1\xc6\x9b\
935
+ \xe7\x74\xfa\x2b\x2f\x0a\x16\x4d\x9d\x1b\xda\x4e\x2d\x36\x90\x77\
936
+ \x68\x7b\x4e\x2d\x1c\x10\xb7\x73\x2f\x6e\x5d\x2b\x5f\x71\x40\xfc\
937
+ \x33\xc7\x67\x7e\x26\x7c\x37\x73\x39\x75\x1b\xab\x95\xad\xa7\x2d\
938
+ \xb3\x76\xaa\xc1\x7a\x18\x6f\xcc\xe6\x18\xd9\x42\xea\x3b\xc1\x9d\
939
+ \xe0\x83\x38\x00\xe7\xc4\xf9\xbc\xa3\x07\x7f\x82\x07\x5a\x7d\x47\
940
+ \xc2\x94\xeb\x6f\x27\x9c\xa8\x75\x96\xe4\x32\xe2\xb8\x75\x72\xd6\
941
+ \x01\xaa\xc3\x67\xed\x77\xe5\xc0\xb8\x5c\xde\x29\xa2\xcd\xaa\xd7\
942
+ \x0d\x63\xfb\x46\x5a\xb5\xc3\x8d\x9e\x47\x53\xa3\xe4\xf7\x59\x33\
943
+ \x5f\x9f\x9b\x43\xa7\x79\x87\x9a\x71\xe6\x9d\x2b\xee\xd7\x96\xd3\
944
+ \x64\x2e\x70\x8c\xaf\xec\x6c\xad\x8e\x03\x27\x87\x83\xf0\x8d\xbd\
945
+ \x5b\xd3\x87\x0b\x5b\xb7\x90\x7b\x20\xc5\x0c\xd8\xc7\x06\xd6\x73\
946
+ \xef\xd2\x56\xb7\xf8\xaa\xb8\xa4\x96\x6d\x3d\x83\x96\xda\x15\x9f\
947
+ \x57\xdf\x84\x6d\xf0\xd0\x3c\x8e\xf9\x6c\xb9\x1e\xbe\x9b\xda\xd7\
948
+ \x56\x8e\x79\xd9\x36\x57\xf9\x16\x7f\x97\x77\x59\xa7\x8a\xdf\x5a\
949
+ \x43\xab\xb6\x29\xfe\xd2\x3d\x19\xc9\xe5\xf3\x7e\x95\x9d\xad\x55\
950
+ \xb9\x99\x9f\x56\x03\xc9\x73\xe0\xf3\xbc\x07\x18\x8f\x0f\xc9\xef\
951
+ \xe4\x1d\x78\x2c\xdf\x98\x15\xd7\x36\xbb\xad\xaa\x36\x5e\xeb\xf7\
952
+ \x78\xb1\xba\xbf\x67\x13\xc1\x3e\x1c\xde\xfd\x81\xb8\x72\xde\xb5\
953
+ \x5a\x63\xe5\xce\xd2\x32\x46\x7d\x36\x0e\x6b\xbb\x0e\x3c\xf0\xc0\
954
+ \xbe\xee\x80\xcd\xcb\x87\xf9\xbc\x31\xab\x3d\xc8\x65\x12\x03\x97\
955
+ \x15\x83\x96\x35\x8e\x55\x9d\x37\x7a\x35\x5f\x2b\x8f\xb3\x2e\x4c\
956
+ \x3c\x48\x4c\xc8\x7d\x5e\x75\x0d\x6f\xe4\xba\x1d\x64\x33\x6c\xe9\
957
+ \xdb\xb0\x7f\xd1\xbb\x39\x72\x35\xf1\xbc\xef\x5c\x1d\x4b\xae\x97\
958
+ \x67\x9f\xae\xa7\xee\xbc\x1d\xe5\x30\xb5\x55\x3b\x17\xf7\x61\x81\
959
+ \x3c\xd1\xda\xed\xd4\xbc\xd4\xf6\xe0\x81\x35\xc3\x79\x9e\x68\x3d\
960
+ \x7e\xd5\xf7\xd4\x2d\x6a\xb3\xb0\x49\xcc\xc2\x75\xe1\x3c\xbd\x5b\
961
+ \xaf\xcc\xdf\xf3\x5e\xc5\xbc\x57\x86\xcf\x6f\x27\x7f\xdf\x8a\x56\
962
+ \xc7\x9e\xe7\x4c\xc9\x0d\xd5\x09\xd8\x01\x5f\x21\x33\xdc\xc8\xfd\
963
+ \x14\x79\x6f\xda\xb0\x55\x5d\xac\xc2\x26\x86\xb1\x68\x2c\xef\xb4\
964
+ \x96\xd3\xfa\x25\xb5\x4e\x76\x9c\x7b\xb1\xf2\xde\x8d\x3c\x5f\x38\
965
+ \xf3\x21\xc3\xf1\xff\xaf\xb6\xa1\x0c\xf8\x85\xb9\x8f\xd4\xfc\xf3\
966
+ \xfc\x5a\x7f\xdd\x33\xa1\x26\x66\xbd\xbe\xe7\xf8\xe4\x3e\xc0\x59\
967
+ \xe7\x1d\xbb\x87\x67\x2d\xdb\x3c\xdd\x88\xed\x72\x3b\x35\x1d\x1c\
968
+ \xcf\xfa\x13\x6b\x62\xf1\xba\xd4\xa4\xdd\x87\x24\x07\x54\xb7\xcc\
969
+ \xda\xec\xb1\x31\xef\x6a\xff\x29\x13\x1c\x51\x9d\xd4\x5c\x9f\xb5\
970
+ \x60\xe6\x68\x22\xdb\xbc\xd7\x88\x2d\xc0\x0b\x3a\x50\x63\x11\x6f\
971
+ \x67\x3d\x5b\x7e\x23\x4d\x4e\x92\xe7\xf1\xa9\x3f\x67\x5d\x81\x9a\
972
+ \xb3\x7e\xe1\x72\xf1\x75\xf5\x6e\xbc\xce\x1a\x36\x1c\x26\x6b\x33\
973
+ \x33\xc6\x9d\x89\xcb\x6e\x45\x1b\x93\x11\xdf\xa1\x63\xf5\x59\xf3\
974
+ \xf7\x9e\x67\x29\x67\x26\x6f\x9c\xca\x3c\xbf\xfa\xbd\x79\x64\x71\
975
+ \x42\xed\x05\xaf\x34\xdf\x60\xee\x37\xef\x1b\x34\x27\x91\xfb\xb3\
976
+ \xf2\xbc\x46\x78\x23\xef\xa4\x27\x39\x18\x4e\xc6\xaf\xf3\x2c\x6d\
977
+ \xb5\x4b\x5c\x4d\xdd\x42\xce\x6e\x5d\x19\x2e\x17\x7d\xb3\x49\x3a\
978
+ \x67\x8f\xd6\xc3\xe2\x31\x6a\xf6\x75\x5d\xea\xaa\xf3\xf9\xff\x46\
979
+ \x2c\x19\x5b\x8f\xe1\xdf\xe2\xac\xbc\xda\xbc\xb2\xf8\xe0\xfe\x0f\
980
+ \x73\xc2\x79\xd7\x65\x74\xa2\xce\x6c\x8e\xd0\x3e\xe6\xf7\xac\x07\
981
+ \xc8\xbb\x16\xf2\x9c\x46\x9b\xb9\x03\xf9\x37\x7f\x55\xb3\xa5\x43\
982
+ \x7e\x6d\x5e\xd9\xbc\x05\x5d\xe7\xfd\xa9\x36\x35\x1b\x39\xbb\xdf\
983
+ \xec\x63\x7f\x75\x7e\x58\x55\x9f\xff\x33\x75\xed\xca\xae\x36\xbf\
984
+ \x0d\xe7\xea\x6a\xcb\x73\x24\xdc\x13\x64\xfe\x1e\xee\xb2\x07\x6b\
985
+ \x7f\xd8\x04\x0e\x66\x1e\x4d\x8d\x09\x46\xe3\x94\x79\xcf\x66\x7d\
986
+ \x87\xa6\xcd\xf7\x7e\xcf\x5a\x1b\x75\x6a\xba\x77\xaf\x81\x9c\x14\
987
+ \xce\x5b\x93\x2e\xe6\xe4\x3d\x3f\x59\xeb\x5a\xdb\x56\xae\x2b\xfc\
988
+ \x5f\x68\x43\x1e\x5e\x37\x9c\x41\xac\xc0\x05\xcc\xe3\x9a\x33\x76\
989
+ \x9f\x8f\xb8\x00\xbb\xd5\x19\xc4\x89\x3c\x1f\x00\x66\xfb\xcb\x8f\
990
+ \xe9\xd6\xbd\xe3\xd6\x0c\x9b\x73\x54\x9b\x82\x13\xd6\xa5\x8a\x03\
991
+ \x62\x88\x78\x31\x76\xdd\x65\xd5\xed\x76\xf1\xc2\xb5\xb5\xba\x26\
992
+ \xb4\xea\x25\x73\x2d\x62\xb0\x7c\x3c\xcf\xf3\xae\xef\xea\xc6\x01\
993
+ \xf2\x5c\x07\x9f\xf3\xac\xf6\x3c\x03\x3c\xcf\xf8\xae\xcf\x56\xcf\
994
+ \xf9\xeb\x35\x77\xe6\xb6\x63\x57\xdb\xd5\x76\xb5\x5d\x6d\x57\xdb\
995
+ \xd5\x76\xb5\xff\xb9\xf6\x7f\xec\x05\xb4\xfe\
996
+ "
997
+
998
+ qt_resource_name = "\
999
+ \x00\x04\
1000
+ \x00\x06\xfa\x5e\
1001
+ \x00\x69\
1002
+ \x00\x63\x00\x6f\x00\x6e\
1003
+ \x00\x09\
1004
+ \x09\xc6\xa7\x5f\
1005
+ \x00\x6d\
1006
+ \x00\x6f\x00\x73\x00\x65\x00\x73\x00\x2e\x00\x69\x00\x63\x00\x6f\
1007
+ "
1008
+
1009
+ qt_resource_struct = "\
1010
+ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
1011
+ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
1012
+ \x00\x00\x00\x0e\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\
1013
+ "
1014
+
1015
+ def qInitResources():
1016
+ QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
1017
+
1018
+ def qCleanupResources():
1019
+ QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
1020
+
1021
+ qInitResources()
mosesdecoder/mingw/MosesGUI/main.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ from PyQt4.QtGui import QApplication
4
+
5
+ import os
6
+ import sys
7
+
8
+ from mainWindow import MainWindow
9
+ from datamodel import DataModel
10
+ from moses import Moses
11
+
12
+ if __name__ == "__main__":
13
+ app = QApplication(sys.argv)
14
+ workdir = os.path.join(os.path.join(os.path.expanduser('~'), 'mosesgui'))
15
+ if not os.path.exists(workdir):
16
+ os.makedirs(workdir)
17
+ dm = DataModel(filename=os.path.join(workdir, "models.sqlite"))
18
+ moses = Moses()
19
+ if not moses.detect():
20
+ sys.exit(1)
21
+ MainWindow = MainWindow(dm=dm, moses=moses, workdir=workdir)
22
+ MainWindow.setupUi(MainWindow)
23
+ MainWindow.show()
24
+ sys.exit(app.exec_())
mosesdecoder/mingw/MosesGUI/mainWindow.py ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ Module implementing MainWindow.
5
+ """
6
+
7
+ from PyQt4.QtCore import (
8
+ pyqtSignature,
9
+ QObject,
10
+ Qt,
11
+ SIGNAL,
12
+ )
13
+ from PyQt4.QtGui import (
14
+ QMainWindow,
15
+ QMessageBox,
16
+ QProgressDialog,
17
+ )
18
+
19
+ import sys
20
+ import threading
21
+
22
+ from Ui_mainWindow import Ui_MainWindow
23
+ from addMTModel import AddMTModelDialog
24
+ from chooseMTModel import ChooseMTModelDialog
25
+ from engine import Engine
26
+ from credits import DlgCredits
27
+ from util import doAlert
28
+
29
+
30
+ class MainWindow(QMainWindow, Ui_MainWindow):
31
+ """
32
+ Class documentation goes here.
33
+ """
34
+ def setupUi(self, mainWindow):
35
+ super(MainWindow, self).setupUi(mainWindow)
36
+ self.tableView.setModel(self.datamodel)
37
+ self.tableView.hideColumn(0)
38
+ # Change status and keep the column.
39
+ QObject.connect(
40
+ self.datamodel, SIGNAL("recordUpdated(bool)"),
41
+ self.on_datamodel_recordUpdated)
42
+ QObject.connect(
43
+ self.datamodel, SIGNAL("messageBox(QString)"),
44
+ self.on_datamodel_messageBox)
45
+ # The response to change model.
46
+ for obj in (self.editModelName, self.editSrcLang, self.editTrgLang):
47
+ obj.installEventFilter(self)
48
+
49
+ def __init__(self, parent=None, dm=None, moses=None, workdir=None):
50
+ """
51
+ Constructor
52
+ """
53
+ QMainWindow.__init__(self, parent)
54
+ self.moses = moses
55
+ self.datamodel = dm
56
+ self.engine = None
57
+ self.progress = None
58
+ self.workdir = workdir
59
+
60
+ @pyqtSignature("")
61
+ def on_delModelBtn_clicked(self):
62
+ """
63
+ Slot documentation goes here.
64
+ """
65
+ current = self.tableView.currentIndex()
66
+ if not current or current.row() < 0:
67
+ return
68
+ model_in_use = (
69
+ self.engine and
70
+ self.datamodel.getRowID(current.row()) == self.engine.model['ID']
71
+ )
72
+ if model_in_use:
73
+ text = (
74
+ "The model is still in use, do you want to "
75
+ "stop and delete it?\n"
76
+ "It might take a while..."
77
+ )
78
+ reply = QMessageBox.question(
79
+ None, 'Message', text, QMessageBox.Yes, QMessageBox.No)
80
+ if reply == QMessageBox.No:
81
+ return
82
+ t = self.stopEngine(self.engine)
83
+ t.join()
84
+ self.engine = None
85
+ self.clearPanel()
86
+ self.datamodel.delModel(current.row())
87
+
88
+ @pyqtSignature("")
89
+ def on_newModelBtn_clicked(self):
90
+ """
91
+ Slot documentation goes here.
92
+ """
93
+ dialog = AddMTModelDialog(self, self.workdir)
94
+ if dialog.exec_():
95
+ installParam = {
96
+ 'modelName': dialog.modelName,
97
+ 'source': dialog.source,
98
+ 'sourceMode': dialog.sourceMode,
99
+ 'dest': dialog.dest,
100
+ }
101
+ self.datamodel.installModel(installParam)
102
+ self.tableView.selectRow(self.tableView.model().rowCount() - 1)
103
+ # self.datamodel.newEntry()
104
+
105
+ def on_datamodel_recordUpdated(self, bRecord):
106
+ # Deal with the selection changed problem.
107
+ try:
108
+ if bRecord:
109
+ current = self.tableView.currentIndex()
110
+ if current and current.row() != -1:
111
+ self.curSelection = current.row()
112
+ else:
113
+ self.curSelection = None
114
+ else:
115
+ if self.curSelection is not None:
116
+ self.tableView.selectRow(self.curSelection)
117
+ except Exception, e:
118
+ print >> sys.stderr, str(e)
119
+
120
+ def on_datamodel_messageBox(self, str):
121
+ doAlert(str)
122
+
123
+ def closeEvent(self, event):
124
+ # Clear up.
125
+ if self.datamodel.destroy():
126
+ event.accept()
127
+ else:
128
+ event.reject()
129
+
130
+ def eventFilter(self, obj, event):
131
+ for obj in (self.editModelName, self.editSrcLang, self.editTrgLang):
132
+ if self.gridLayout.indexOf(obj) != -1:
133
+ if event.type() == event.MouseButtonPress:
134
+ dialog = ChooseMTModelDialog(self, self.datamodel)
135
+ if dialog.exec_():
136
+ # Get the model.
137
+ model = {
138
+ 'ID': dialog.ID,
139
+ 'name': dialog.modelName,
140
+ 'srclang': dialog.srcLang,
141
+ 'trglang': dialog.trgLang,
142
+ 'path': dialog.path,
143
+ 'mosesini': dialog.mosesini,
144
+ }
145
+ self.startEngine(model)
146
+ return True # We handle it here.
147
+ return super(MainWindow, self).eventFilter(obj, event)
148
+
149
+ def stopEngine(self, engine):
150
+ # Stop the engine with another thread.
151
+ def stopEngineThread():
152
+ engine.stop()
153
+ t = threading.Thread(target=stopEngineThread)
154
+ t.start()
155
+ return t
156
+
157
+ def startEngine(self, model):
158
+ self.editModelName.setText(model['name'])
159
+ self.editSrcLang.setText(model['srclang'])
160
+ self.editTrgLang.setText(model['trglang'])
161
+ self.editSrc.setText("")
162
+ self.editTrg.setText("")
163
+ try:
164
+ if self.engine:
165
+ self.stopEngine(self.engine)
166
+ self.engine = None
167
+ # Create engine.
168
+ self.engine = Engine(model, self.moses)
169
+
170
+ # Create progress bar dialog.
171
+ if self.progress:
172
+ self.progress.close()
173
+ self.progress = None
174
+ self.progress = QProgressDialog(
175
+ "Model: %s" % model['name'], "Cancel", 0,
176
+ self.engine.countSteps(), self)
177
+ self.progress.setAutoReset(True)
178
+ self.progress.setAutoClose(True)
179
+ self.progress.setWindowModality(Qt.WindowModal)
180
+ self.progress.setWindowTitle('Loading Model...')
181
+ QObject.connect(
182
+ self.progress, SIGNAL("canceled()"), self.progressCancelled)
183
+ self.progress.show()
184
+
185
+ # Connect engine signal.
186
+ QObject.connect(
187
+ self.engine, SIGNAL("stepFinished(int)"),
188
+ self.engineStepFinished)
189
+ QObject.connect(
190
+ self.engine, SIGNAL("loaded(bool, QString)"),
191
+ self.engineLoaded)
192
+
193
+ def startEngineThread():
194
+ self.engine.start()
195
+ t = threading.Thread(target=startEngineThread)
196
+ t.start()
197
+ except Exception, e:
198
+ if self.engine:
199
+ self.stopEngine(self.engine)
200
+ self.engine = None
201
+ self.clearPanel()
202
+ doAlert("Error start MT engine: " + str(e))
203
+
204
+ def clearPanel(self):
205
+ if self.engine:
206
+ self.stopEngine(self.engine)
207
+ self.engine = None
208
+ self.editModelName.setText("")
209
+ self.editSrcLang.setText("")
210
+ self.editTrgLang.setText("")
211
+ self.editSrc.setText("")
212
+ self.editTrg.setText("")
213
+
214
+ def progressCancelled(self):
215
+ self.clearPanel()
216
+ if self.engine:
217
+ self.stopEngine(self.engine)
218
+ self.engine = None
219
+ if self.progress:
220
+ self.progress = None
221
+
222
+ def engineStepFinished(self, nStep):
223
+ if self.progress:
224
+ self.progress.setValue(nStep)
225
+
226
+ def engineLoaded(self, success, message):
227
+ if not success:
228
+ self.clearPanel()
229
+ if message:
230
+ doAlert(message)
231
+ else:
232
+ if self.progress:
233
+ self.progress.setValue(self.progress.maximum())
234
+ self.progress = None
235
+
236
+ @pyqtSignature("")
237
+ def on_btnTranslate_clicked(self):
238
+ """
239
+ Slot documentation goes here.
240
+ """
241
+ if self.engine is None:
242
+ doAlert("Please load MT model first.")
243
+ return
244
+ self.btnTranslate.setEnabled(False)
245
+ self.editTrg.setText("")
246
+ try:
247
+ texts = str(self.editSrc.toPlainText().toUtf8()).split('\n')
248
+ trans = []
249
+ for text in texts:
250
+ if text.strip() == "":
251
+ trans.append(text)
252
+ else:
253
+ trans.append(
254
+ self.engine.translate(
255
+ text.replace('\r', ' ').strip()).decode('utf8'))
256
+ self.editTrg.setText('\n'.join(trans))
257
+ except Exception, e:
258
+ print >> sys.stderr, str(e)
259
+ doAlert("Translation failed!")
260
+ self.btnTranslate.setEnabled(True)
261
+ self.btnTranslate.setFocus()
262
+
263
+ @pyqtSignature("QString")
264
+ def on_labelInfo_linkActivated(self, link):
265
+ """
266
+ Slot documentation goes here.
267
+ """
268
+ dialog = DlgCredits(self)
269
+ dialog.exec_()
mosesdecoder/mingw/MosesGUI/mainWindow.ui ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>MainWindow</class>
4
+ <widget class="QMainWindow" name="MainWindow">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>705</width>
10
+ <height>491</height>
11
+ </rect>
12
+ </property>
13
+ <property name="sizePolicy">
14
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
15
+ <horstretch>0</horstretch>
16
+ <verstretch>0</verstretch>
17
+ </sizepolicy>
18
+ </property>
19
+ <property name="windowTitle">
20
+ <string>Moses Machine Translation System</string>
21
+ </property>
22
+ <property name="windowIcon">
23
+ <iconset resource="icons.qrc">
24
+ <normaloff>:/icon/moses.ico</normaloff>:/icon/moses.ico</iconset>
25
+ </property>
26
+ <property name="layoutDirection">
27
+ <enum>Qt::LeftToRight</enum>
28
+ </property>
29
+ <property name="locale">
30
+ <locale language="English" country="UnitedKingdom"/>
31
+ </property>
32
+ <widget class="QWidget" name="centralWidget">
33
+ <property name="sizePolicy">
34
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
35
+ <horstretch>0</horstretch>
36
+ <verstretch>0</verstretch>
37
+ </sizepolicy>
38
+ </property>
39
+ <layout class="QVBoxLayout" name="verticalLayout_3">
40
+ <item>
41
+ <widget class="QTabWidget" name="tabWidget">
42
+ <property name="autoFillBackground">
43
+ <bool>true</bool>
44
+ </property>
45
+ <property name="currentIndex">
46
+ <number>0</number>
47
+ </property>
48
+ <widget class="QWidget" name="tab">
49
+ <property name="autoFillBackground">
50
+ <bool>true</bool>
51
+ </property>
52
+ <attribute name="title">
53
+ <string>Machine Translation</string>
54
+ </attribute>
55
+ <layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,8">
56
+ <item>
57
+ <widget class="QGroupBox" name="groupBox">
58
+ <property name="title">
59
+ <string>Current MT Model</string>
60
+ </property>
61
+ <layout class="QGridLayout" name="gridLayout">
62
+ <item row="2" column="0">
63
+ <widget class="QLabel" name="label">
64
+ <property name="text">
65
+ <string>Translate From:</string>
66
+ </property>
67
+ </widget>
68
+ </item>
69
+ <item row="2" column="1">
70
+ <widget class="QLineEdit" name="editSrcLang">
71
+ <property name="readOnly">
72
+ <bool>true</bool>
73
+ </property>
74
+ </widget>
75
+ </item>
76
+ <item row="2" column="4">
77
+ <widget class="QLineEdit" name="editTrgLang">
78
+ <property name="readOnly">
79
+ <bool>true</bool>
80
+ </property>
81
+ </widget>
82
+ </item>
83
+ <item row="2" column="3">
84
+ <widget class="QLabel" name="label_3">
85
+ <property name="text">
86
+ <string>Translate Into:</string>
87
+ </property>
88
+ </widget>
89
+ </item>
90
+ <item row="3" column="2">
91
+ <widget class="QPushButton" name="btnTranslate">
92
+ <property name="enabled">
93
+ <bool>true</bool>
94
+ </property>
95
+ <property name="minimumSize">
96
+ <size>
97
+ <width>120</width>
98
+ <height>30</height>
99
+ </size>
100
+ </property>
101
+ <property name="text">
102
+ <string>Translate</string>
103
+ </property>
104
+ <property name="flat">
105
+ <bool>false</bool>
106
+ </property>
107
+ </widget>
108
+ </item>
109
+ <item row="1" column="2">
110
+ <widget class="QLineEdit" name="editModelName">
111
+ <property name="readOnly">
112
+ <bool>true</bool>
113
+ </property>
114
+ </widget>
115
+ </item>
116
+ <item row="1" column="1">
117
+ <widget class="QLabel" name="label_2">
118
+ <property name="text">
119
+ <string>Model Name:</string>
120
+ </property>
121
+ <property name="alignment">
122
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
123
+ </property>
124
+ </widget>
125
+ </item>
126
+ </layout>
127
+ </widget>
128
+ </item>
129
+ <item>
130
+ <widget class="QSplitter" name="splitter">
131
+ <property name="orientation">
132
+ <enum>Qt::Horizontal</enum>
133
+ </property>
134
+ <widget class="QTextEdit" name="editSrc"/>
135
+ <widget class="QTextEdit" name="editTrg">
136
+ <property name="readOnly">
137
+ <bool>true</bool>
138
+ </property>
139
+ </widget>
140
+ </widget>
141
+ </item>
142
+ </layout>
143
+ </widget>
144
+ <widget class="QWidget" name="tab_2">
145
+ <property name="autoFillBackground">
146
+ <bool>true</bool>
147
+ </property>
148
+ <attribute name="title">
149
+ <string>Model Management</string>
150
+ </attribute>
151
+ <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1000">
152
+ <item>
153
+ <widget class="QLabel" name="label_5">
154
+ <property name="autoFillBackground">
155
+ <bool>true</bool>
156
+ </property>
157
+ <property name="text">
158
+ <string>TextLabel</string>
159
+ </property>
160
+ </widget>
161
+ </item>
162
+ <item>
163
+ <widget class="QSplitter" name="splitter_4">
164
+ <property name="orientation">
165
+ <enum>Qt::Horizontal</enum>
166
+ </property>
167
+ <widget class="QGroupBox" name="groupBox_3">
168
+ <property name="minimumSize">
169
+ <size>
170
+ <width>200</width>
171
+ <height>0</height>
172
+ </size>
173
+ </property>
174
+ <property name="maximumSize">
175
+ <size>
176
+ <width>200</width>
177
+ <height>16777215</height>
178
+ </size>
179
+ </property>
180
+ <property name="autoFillBackground">
181
+ <bool>true</bool>
182
+ </property>
183
+ <property name="title">
184
+ <string>Management</string>
185
+ </property>
186
+ <layout class="QFormLayout" name="formLayout">
187
+ <item row="0" column="0" colspan="2">
188
+ <widget class="QPushButton" name="newModelBtn">
189
+ <property name="locale">
190
+ <locale language="English" country="UnitedKingdom"/>
191
+ </property>
192
+ <property name="text">
193
+ <string>Install New Model ...</string>
194
+ </property>
195
+ </widget>
196
+ </item>
197
+ <item row="1" column="0" colspan="2">
198
+ <widget class="QPushButton" name="delModelBtn">
199
+ <property name="text">
200
+ <string>Uninstall Selected Model ...</string>
201
+ </property>
202
+ </widget>
203
+ </item>
204
+ </layout>
205
+ </widget>
206
+ <widget class="QTableView" name="tableView">
207
+ <property name="font">
208
+ <font>
209
+ <pointsize>7</pointsize>
210
+ </font>
211
+ </property>
212
+ <property name="mouseTracking">
213
+ <bool>false</bool>
214
+ </property>
215
+ <property name="contextMenuPolicy">
216
+ <enum>Qt::DefaultContextMenu</enum>
217
+ </property>
218
+ <property name="autoFillBackground">
219
+ <bool>true</bool>
220
+ </property>
221
+ <property name="locale">
222
+ <locale language="English" country="UnitedKingdom"/>
223
+ </property>
224
+ <property name="frameShape">
225
+ <enum>QFrame::StyledPanel</enum>
226
+ </property>
227
+ <property name="frameShadow">
228
+ <enum>QFrame::Plain</enum>
229
+ </property>
230
+ <property name="editTriggers">
231
+ <set>QAbstractItemView::NoEditTriggers</set>
232
+ </property>
233
+ <property name="selectionMode">
234
+ <enum>QAbstractItemView::SingleSelection</enum>
235
+ </property>
236
+ <property name="selectionBehavior">
237
+ <enum>QAbstractItemView::SelectRows</enum>
238
+ </property>
239
+ <property name="gridStyle">
240
+ <enum>Qt::DashLine</enum>
241
+ </property>
242
+ <property name="sortingEnabled">
243
+ <bool>true</bool>
244
+ </property>
245
+ <property name="wordWrap">
246
+ <bool>false</bool>
247
+ </property>
248
+ <property name="cornerButtonEnabled">
249
+ <bool>false</bool>
250
+ </property>
251
+ <attribute name="verticalHeaderVisible">
252
+ <bool>false</bool>
253
+ </attribute>
254
+ <attribute name="verticalHeaderShowSortIndicator" stdset="0">
255
+ <bool>true</bool>
256
+ </attribute>
257
+ </widget>
258
+ </widget>
259
+ </item>
260
+ </layout>
261
+ </widget>
262
+ </widget>
263
+ </item>
264
+ <item>
265
+ <widget class="QLabel" name="labelInfo">
266
+ <property name="text">
267
+ <string>&lt;qt&gt;&lt;a href=&quot;www&quot;&gt;Credits and Support&lt;/a&gt;&lt;/qt&gt;</string>
268
+ </property>
269
+ <property name="textFormat">
270
+ <enum>Qt::AutoText</enum>
271
+ </property>
272
+ <property name="alignment">
273
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
274
+ </property>
275
+ </widget>
276
+ </item>
277
+ </layout>
278
+ </widget>
279
+ </widget>
280
+ <resources>
281
+ <include location="icons.qrc"/>
282
+ </resources>
283
+ <connections/>
284
+ </ui>
mosesdecoder/mingw/MosesGUI/moses.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ import os
4
+ import platform
5
+ import sys
6
+ from PyQt4.QtGui import QFileDialog
7
+
8
+ from util import (
9
+ doAlert,
10
+ doQuestion,
11
+ )
12
+
13
+
14
+ class Moses():
15
+ def __init__(self):
16
+ pass
17
+
18
+ def findRegistryPath(self):
19
+ import _winreg
20
+ key = None
21
+ path = None
22
+ try:
23
+ reg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER)
24
+ key = _winreg.OpenKey(
25
+ reg, r'Software\Moses Core Team\MosesDecoder')
26
+ value, type = _winreg.QueryValueEx(key, 'Path')
27
+ path = value
28
+ except Exception, e:
29
+ print >> sys.stderr, str(e)
30
+ return None
31
+ finally:
32
+ if key:
33
+ _winreg.CloseKey(key)
34
+ return path
35
+
36
+ def checkMosesInstall(self):
37
+ for func in (self.getMosesCmd, self.getTokenizer, self.getDetokenizer, self.getTruecase, self.getDetruecase):
38
+ if not os.path.exists(func()):
39
+ doAlert(
40
+ "Missing executables in Moses installation path [%s], "
41
+ "exit." % self.mosesPath)
42
+ return False
43
+ return True
44
+
45
+ def detect(self):
46
+ pf = platform.system()
47
+ if pf == 'Windows':
48
+ self.mosesPath = self.findRegistryPath()
49
+ if self.mosesPath:
50
+ return self.checkMosesInstall()
51
+ else:
52
+ if not doQuestion(
53
+ 'Cannot find Moses installation, click "Yes" to '
54
+ 'manually set the Moses path, click "No" to exit.'):
55
+ return False
56
+ # If not found, use a dialog.
57
+ startdir = 'C:\\'
58
+ if "ProgramFiles(x86)" in os.environ:
59
+ startdir = os.environ["ProgramFiles(x86)"]
60
+ elif "ProgramFiles" in os.environ:
61
+ startdir = os.environ["ProgramFiles"]
62
+ else:
63
+ pass
64
+ dialog = QFileDialog(None, directory=startdir)
65
+ dialog.setFileMode(QFileDialog.Directory)
66
+ dialog.setViewMode(QFileDialog.Detail)
67
+ dialog.setOptions(QFileDialog.ShowDirsOnly)
68
+ if dialog.exec_():
69
+ self.mosesPath = str(dialog.selectedFiles()[0])
70
+ return self.checkMosesInstall()
71
+ else:
72
+ doAlert("Failed to find Moses Installation path, exit.")
73
+ return False
74
+ else:
75
+ doAlert("Platform %s not supported yet" % pf)
76
+ return False
77
+
78
+ def getMosesCmd(self):
79
+ return os.path.join(self.mosesPath, 'moses-cmd.exe')
80
+
81
+ def getTokenizer(self):
82
+ return os.path.join(self.mosesPath, 'tokenizer.exe')
83
+
84
+ def getDetokenizer(self):
85
+ return os.path.join(self.mosesPath, 'detokenizer.exe')
86
+
87
+ def getTruecase(self):
88
+ return os.path.join(self.mosesPath, 'truecase.exe')
89
+
90
+ def getDetruecase(self):
91
+ return os.path.join(self.mosesPath, 'detruecase.exe')
mosesdecoder/mingw/MosesGUI/util.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ import sys
4
+
5
+ from PyQt4.QtGui import (
6
+ QApplication,
7
+ QMessageBox,
8
+ )
9
+
10
+
11
+ def doAlert(text):
12
+ msgBox = QMessageBox()
13
+ msgBox.setText(text)
14
+ msgBox.setWindowTitle("Message")
15
+ msgBox.setIcon(QMessageBox.Warning)
16
+ msgBox.exec_()
17
+
18
+
19
+ def doQuestion(text):
20
+ reply = QMessageBox.question(
21
+ None, 'Message', text, QMessageBox.Yes, QMessageBox.No)
22
+ if reply == QMessageBox.Yes:
23
+ return True
24
+ else:
25
+ return False
26
+
27
+
28
+ if __name__ == '__main__':
29
+ app = QApplication(sys.argv)
30
+ doAlert("doAlert")
31
+ print doQuestion("doQuestion")
mosesdecoder/misc/1-1-Extraction.cpp ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <fstream>
2
+ #include <iostream>
3
+ #include <vector>
4
+ #include <sstream>
5
+ #include <map>
6
+ #include <set>
7
+ #include <cstdlib>
8
+
9
+
10
+ using namespace std;
11
+
12
+
13
+ int stringToInteger(string s)
14
+ {
15
+
16
+ istringstream buffer(s);
17
+ int some_int;
18
+ buffer >> some_int;
19
+ return some_int;
20
+ }
21
+
22
+ void loadInput(const char * fileName, vector <string> & input)
23
+ {
24
+
25
+ ifstream sr (fileName);
26
+ string line;
27
+
28
+ if(sr.is_open()) {
29
+ while(getline(sr , line )) {
30
+ input.push_back(line);
31
+ }
32
+
33
+ sr.close();
34
+ } else {
35
+ cout<<"Unable to read "<<fileName<<endl;
36
+ exit(1);
37
+ }
38
+
39
+ }
40
+
41
+ void getWords(string s, vector <string> & currInput)
42
+ {
43
+ istringstream iss(s);
44
+ currInput.clear();
45
+ do {
46
+ string sub;
47
+ iss >> sub;
48
+ currInput.push_back(sub);
49
+
50
+ } while (iss);
51
+
52
+ currInput.pop_back();
53
+ }
54
+
55
+ void getMeCepts ( set <int> & eSide , set <int> & fSide , map <int , vector <int> > & tS , map <int , vector <int> > & sT)
56
+ {
57
+ set <int> :: iterator iter;
58
+
59
+ int sz = eSide.size();
60
+ vector <int> t;
61
+
62
+ for (iter = eSide.begin(); iter != eSide.end(); iter++) {
63
+ t = tS[*iter];
64
+
65
+ for (int i = 0; i < t.size(); i++) {
66
+ fSide.insert(t[i]);
67
+ }
68
+
69
+ }
70
+
71
+ for (iter = fSide.begin(); iter != fSide.end(); iter++) {
72
+
73
+ t = sT[*iter];
74
+
75
+ for (int i = 0 ; i<t.size(); i++) {
76
+ eSide.insert(t[i]);
77
+ }
78
+
79
+ }
80
+
81
+ if (eSide.size () > sz) {
82
+ getMeCepts(eSide,fSide,tS,sT);
83
+ }
84
+
85
+ }
86
+
87
+ void constructCepts(vector < pair < set <int> , set <int> > > & ceptsInPhrase, set <int> & sourceNullWords, set <int> & targetNullWords, vector <string> & alignment, int eSize, int fSize)
88
+ {
89
+
90
+ ceptsInPhrase.clear();
91
+ sourceNullWords.clear();
92
+ targetNullWords.clear();
93
+
94
+ vector <int> align;
95
+ vector <string> mAlign;
96
+
97
+ std::map <int , vector <int> > sT;
98
+ std::map <int , vector <int> > tS;
99
+ std::set <int> eSide;
100
+ std::set <int> fSide;
101
+ std::set <int> :: iterator iter;
102
+ std :: map <int , vector <int> > :: iterator iter2;
103
+ std :: pair < set <int> , set <int> > cept;
104
+ int src;
105
+ int tgt;
106
+ ceptsInPhrase.clear();
107
+ int res;
108
+
109
+ for (int j=0; j<alignment.size(); j+=1) {
110
+ res = alignment[j].find("-");
111
+ mAlign.push_back(alignment[j].substr(0,res));
112
+ mAlign.push_back(alignment[j].substr(res+1));
113
+ }
114
+
115
+ for (int j=0; j<mAlign.size(); j+=2) {
116
+ align.push_back(stringToInteger(mAlign[j+1]));
117
+ align.push_back(stringToInteger(mAlign[j]));
118
+ }
119
+
120
+ for (int i = 0; i < align.size(); i+=2) {
121
+ src = align[i];
122
+ tgt = align[i+1];
123
+ tS[tgt].push_back(src);
124
+ sT[src].push_back(tgt);
125
+ }
126
+
127
+ for (int i = 0; i< fSize; i++) {
128
+ if (sT.find(i) == sT.end()) {
129
+ targetNullWords.insert(i);
130
+ }
131
+ }
132
+
133
+ for (int i = 0; i< eSize; i++) {
134
+ if (tS.find(i) == tS.end()) {
135
+ sourceNullWords.insert(i);
136
+ }
137
+ }
138
+
139
+
140
+ while (tS.size() != 0 && sT.size() != 0) {
141
+
142
+ iter2 = tS.begin();
143
+
144
+ eSide.clear();
145
+ fSide.clear();
146
+ eSide.insert (iter2->first);
147
+
148
+ getMeCepts(eSide, fSide, tS , sT);
149
+
150
+ for (iter = eSide.begin(); iter != eSide.end(); iter++) {
151
+ iter2 = tS.find(*iter);
152
+ tS.erase(iter2);
153
+ }
154
+
155
+ for (iter = fSide.begin(); iter != fSide.end(); iter++) {
156
+ iter2 = sT.find(*iter);
157
+ sT.erase(iter2);
158
+ }
159
+
160
+ cept = make_pair (fSide , eSide);
161
+ ceptsInPhrase.push_back(cept);
162
+ }
163
+
164
+ }
165
+
166
+ void getOneToOne(vector < pair < set <int> , set <int> > > & ceptsInPhrase , vector <string> & currF , vector <string> & currE, set <string> & one)
167
+ {
168
+ string temp;
169
+
170
+ for (int i = 0; i< ceptsInPhrase.size(); i++) {
171
+ if (ceptsInPhrase[i].first.size() == 1 && ceptsInPhrase[i].second.size() == 1) {
172
+ temp = currF[(*ceptsInPhrase[i].second.begin())] + "\t" + currE[(*ceptsInPhrase[i].first.begin())];
173
+
174
+ if (one.find(temp) == one.end())
175
+ one.insert(temp);
176
+ }
177
+ }
178
+
179
+ }
180
+
181
+ void printOneToOne ( set <string> & one)
182
+ {
183
+ set <string> :: iterator iter;
184
+
185
+ for (iter = one.begin(); iter != one.end(); iter++) {
186
+ cout<<*iter<<endl;
187
+ }
188
+ }
189
+
190
+ int main(int argc, char * argv[])
191
+ {
192
+
193
+ vector <string> e;
194
+ vector <string> f;
195
+ vector <string> a;
196
+ vector < pair < set <int> , set <int> > > ceptsInPhrase;
197
+ vector < pair < string , vector <int> > > gCepts;
198
+
199
+ set <int> sourceNullWords;
200
+ set <int> targetNullWords;
201
+
202
+ vector <string> currE;
203
+ vector <string> currF;
204
+ vector <string> currA;
205
+ set <string> one;
206
+
207
+ loadInput(argv[1],f);
208
+ loadInput(argv[2],e);
209
+ loadInput(argv[3],a);
210
+
211
+
212
+ for (int i=0; i<a.size(); i++) {
213
+
214
+
215
+ getWords(e[i],currE);
216
+ getWords(f[i],currF);
217
+ getWords(a[i],currA);
218
+
219
+ if (i % 100000 == 0) {
220
+ cerr<<"Processing "<<i<<endl;
221
+ }
222
+ constructCepts(ceptsInPhrase, sourceNullWords , targetNullWords, currA , currE.size(), currF.size());
223
+ getOneToOne(ceptsInPhrase , currF , currE, one);
224
+
225
+ /*
226
+ cout<<"________________________________________"<<endl;
227
+
228
+ cout<<"Press any integer to continue ..."<<endl;
229
+ int xx;
230
+ cin>>xx;
231
+ */
232
+
233
+ }
234
+
235
+ printOneToOne(one);
236
+
237
+
238
+ return 0;
239
+
240
+ }
mosesdecoder/misc/GenerateSequences.cpp ADDED
@@ -0,0 +1,514 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <fstream>
2
+ #include <iostream>
3
+ #include <vector>
4
+ #include <sstream>
5
+ #include <map>
6
+ #include <set>
7
+ #include <cstdlib>
8
+
9
+
10
+ using namespace std;
11
+
12
+
13
+ int stringToInteger(string s)
14
+ {
15
+
16
+ istringstream buffer(s);
17
+ int some_int;
18
+ buffer >> some_int;
19
+ return some_int;
20
+ }
21
+
22
+ void loadInput(const char * fileName, vector <string> & input)
23
+ {
24
+
25
+ ifstream sr (fileName);
26
+ string line;
27
+
28
+ if(sr.is_open()) {
29
+ while(getline(sr , line )) {
30
+ input.push_back(line);
31
+ }
32
+
33
+ sr.close();
34
+ } else {
35
+ cout<<"Unable to read "<<fileName<<endl;
36
+ exit(1);
37
+ }
38
+
39
+ }
40
+
41
+ void getWords(string s, vector <string> & currInput)
42
+ {
43
+ istringstream iss(s);
44
+ currInput.clear();
45
+ do {
46
+ string sub;
47
+ iss >> sub;
48
+ currInput.push_back(sub);
49
+
50
+ } while (iss);
51
+
52
+ currInput.pop_back();
53
+ }
54
+
55
+ string getTranslation(int index, vector < pair <string , vector <int> > > & gCepts , vector <string> & currF , map <string,int> & singletons)
56
+ {
57
+
58
+ string translation = "";
59
+
60
+ vector <int> fSide = gCepts[index].second;
61
+ vector <int> :: iterator iter;
62
+
63
+ for (iter = fSide.begin(); iter != fSide.end(); iter++) {
64
+ if (iter != fSide.begin())
65
+ translation += "^_^";
66
+
67
+ translation+= currF[*iter];
68
+ }
69
+
70
+ if(singletons.find(translation)==singletons.end()) {
71
+ return "_TRANS_" + gCepts[index].first + "_TO_" + translation + " ";
72
+ }
73
+
74
+ else {
75
+
76
+ return "_TRANS_SLF_ ";
77
+ }
78
+ }
79
+
80
+
81
+
82
+ int closestGap(map <int,string> gap,int j1, int & gp)
83
+ {
84
+
85
+ int dist=1172;
86
+ int value=-1;
87
+ int temp=0;
88
+ gp=0;
89
+ int opGap=0;
90
+
91
+ map <int,string> :: iterator iter;
92
+
93
+ iter=gap.end();
94
+
95
+ do {
96
+ iter--;
97
+ //cout<<"Trapped "<<iter->first<<endl;
98
+
99
+ if(iter->first==j1 and iter->second=="Unfilled") {
100
+ opGap++;
101
+ gp = opGap;
102
+ return j1;
103
+ }
104
+
105
+ if(iter->second =="Unfilled") {
106
+ opGap++;
107
+ temp = iter->first - j1;
108
+
109
+ if(temp<0)
110
+ temp=temp * -1;
111
+
112
+ if(dist>temp && iter->first < j1) {
113
+ dist=temp;
114
+ value=iter->first;
115
+ gp=opGap;
116
+ }
117
+ }
118
+
119
+
120
+ } while(iter!=gap.begin());
121
+
122
+ //cout<<"Out"<<endl;
123
+ return value;
124
+ }
125
+
126
+
127
+ void generateStory(vector <pair <string , vector <int> > > & gCepts, set <int> & targetNullWords, vector<string> & currF, map <string,int> & singletons)
128
+ {
129
+
130
+ int fl = 0;
131
+ int i = 0; // Current English string position
132
+ int j = 0; // Current French Position
133
+ int N = gCepts.size(); // Total number of English words
134
+ int k = 0; // Number of already generate French words
135
+ int E = 0; // Position after most rightward French word generate so far
136
+ int j1 = 0; // Next french translation;
137
+ int Li =0; // Links of word i
138
+ int Lj=0; // Links of word j
139
+ map <int,int > generated;
140
+ map <int,string> gap;
141
+ map <int,int> :: iterator iter;
142
+ int gp=0;
143
+ //vector <string> iterator :: iterF;
144
+
145
+ while (targetNullWords.find(j) != targetNullWords.end()) {
146
+ cout<<"_INS_"<<currF[j]<<" ";
147
+ generated[j]=-1; // This word is generated -1 means unlinked ...
148
+ j=j+1;
149
+ }
150
+
151
+ while (i < gCepts.size() && gCepts[i].second.size() == 0) {
152
+ cout<<"_DEL_"<<gCepts[i].first<<" ";
153
+ i=i+1;
154
+ }
155
+
156
+ E=j; // Update the position of most rightward French word
157
+
158
+ while (i<N) {
159
+
160
+ //cout<<"I am sending to the link "<<i<<" with 0 "<<endl;
161
+ //j1 = getLink(i,0,Li,k);
162
+
163
+ Li = gCepts[i].second.size();
164
+ j1 = gCepts[i].second[k];
165
+
166
+ //cout<<"i = "<<i<<" j1 = "<<j1<<" j = "<<j<<" E = "<<E<<endl;
167
+
168
+ if(j<j1) { // reordering needed ...
169
+ iter = generated.find(j);
170
+ if( iter == generated.end()) { // fj is not generated ...
171
+ cout<<"_INS_GAP_ ";
172
+ gap[j] = "Unfilled";
173
+ }
174
+
175
+ if (j==E) {
176
+ j=j1;
177
+ } else {
178
+ cout<<"_JMP_FWD_ ";
179
+ j=E;
180
+ }
181
+
182
+ }
183
+
184
+ if(j1<j) {
185
+ iter = generated.find(j);
186
+ if(j<E && iter == generated.end()) { // fj is not generated ...
187
+
188
+ cout<<"_INS_GAP_ ";
189
+ gap[j]="Unfilled";
190
+ }
191
+
192
+ j=closestGap(gap,j1,gp);
193
+ //cout<<j<<endl;
194
+ cout<<"_JMP_BCK_"<<gp<<" ";
195
+
196
+ if(j==j1)
197
+ gap[j]="Filled";
198
+
199
+ }
200
+
201
+ if(j<j1) {
202
+ cout<<"_INS_GAP_ ";
203
+ gap[j] = "Unfilled";
204
+ j=j1;
205
+ }
206
+
207
+ if(k==0) {
208
+ cout<<getTranslation(i, gCepts,currF,singletons);
209
+ } else {
210
+ cout<<"_CONT_CEPT_ ";
211
+ }
212
+ generated[j]=i;
213
+ j=j+1;
214
+ k=k+1;
215
+
216
+ while(targetNullWords.find(j) != targetNullWords.end()) { // fj is unlinked word ...
217
+ //cout<<"Came here"<<j<<k<<endl;
218
+ cout<<"_INS_"<<currF[j]<<" ";
219
+ generated[j]=-1; // This word is generated -1 means unlinked ...
220
+ j=j+1;
221
+ }
222
+
223
+ if(E<j)
224
+ E=j;
225
+ //cout<<" Li "<<Li<<endl;
226
+ if(k==Li) {
227
+ i=i+1;
228
+ k=0;
229
+
230
+ while(i < gCepts.size() && gCepts[i].second.size() == 0) { // ei is unliked word ...
231
+ cout<<"_DEL_"<<gCepts[i].first<<" ";
232
+ i=i+1;
233
+
234
+ }
235
+
236
+ }
237
+
238
+ }
239
+
240
+ cout<<endl;
241
+ }
242
+
243
+
244
+
245
+ void ceptsInGenerativeStoryFormat(vector < pair < set <int> , set <int> > > & ceptsInPhrase , vector < pair < string , vector <int> > > & gCepts , set <int> & sourceNullWords, vector <string> & currE)
246
+ {
247
+
248
+ gCepts.clear();
249
+ set <int> eSide;
250
+ set <int> fSide;
251
+ std::set <int> :: iterator iter;
252
+ string english;
253
+ vector <int> germanIndex;
254
+ int engIndex = 0;
255
+ int prev=0;
256
+ int curr;
257
+ set <int> engDone;
258
+
259
+
260
+ for (int i = 0; i< ceptsInPhrase.size(); i++) {
261
+ english = "";
262
+ germanIndex.clear();
263
+ fSide = ceptsInPhrase[i].first;
264
+ eSide = ceptsInPhrase[i].second;
265
+
266
+
267
+ while(engIndex < *eSide.begin()) {
268
+ // cout<<engIndex<<" "<<*eSide.begin()<<endl;
269
+
270
+ while(engDone.find(engIndex) != engDone.end())
271
+ engIndex++;
272
+
273
+ while(sourceNullWords.find(engIndex) != sourceNullWords.end()) {
274
+ english = currE[engIndex];
275
+ engIndex++;
276
+ gCepts.push_back(make_pair (english , germanIndex));
277
+ english = "";
278
+ }
279
+ }
280
+
281
+ for (iter = eSide.begin(); iter != eSide.end(); iter++) {
282
+ curr = *iter;
283
+
284
+ if(iter != eSide.begin()) {
285
+ english += "^_^";
286
+
287
+ if (prev == curr-1) {
288
+ prev++;
289
+ engIndex++;
290
+ } else
291
+ engDone.insert(curr);
292
+ } else {
293
+ prev = curr;
294
+ //engIndex++;
295
+ engIndex = prev+1;
296
+ }
297
+ english +=currE[curr];
298
+
299
+ }
300
+
301
+ for (iter = fSide.begin(); iter != fSide.end(); iter++) {
302
+ germanIndex.push_back(*iter);
303
+ }
304
+
305
+ gCepts.push_back(make_pair (english , germanIndex));
306
+ // cout<<engIndex<<endl;
307
+
308
+ }
309
+
310
+ english = "";
311
+ germanIndex.clear();
312
+
313
+ //for (int i = 0; i< currE.size(); i++)
314
+ // cout<<i<<" "<<currE[i]<<endl;
315
+
316
+ while(engIndex < currE.size()) {
317
+ // cout<<engIndex<<" "<<currE.size()-1<<endl;
318
+ while(engDone.find(engIndex) != engDone.end())
319
+ engIndex++;
320
+
321
+ while(sourceNullWords.find(engIndex) != sourceNullWords.end()) {
322
+ english = currE[engIndex];
323
+ //cout<<"Here "<<engIndex<<english<<" "<<germanIndex.size()<<endl;
324
+ engIndex++;
325
+ gCepts.push_back(make_pair (english , germanIndex));
326
+ english = "";
327
+ }
328
+ }
329
+
330
+ }
331
+
332
+ void printCepts(vector < pair < string , vector <int> > > & gCepts , vector <string> & currF)
333
+ {
334
+
335
+ string eSide;
336
+ vector <int> fSide;
337
+
338
+ for (int i = 0; i < gCepts.size(); i++) {
339
+
340
+ fSide = gCepts[i].second;
341
+ eSide = gCepts[i].first;
342
+
343
+ cout<<eSide;
344
+ cout<<" <---> ";
345
+
346
+ for (int j = 0; j < fSide.size(); j++) {
347
+ cout<<currF[fSide[j]]<<" ";
348
+ }
349
+
350
+ cout<<endl;
351
+ }
352
+
353
+ }
354
+
355
+ void getMeCepts ( set <int> & eSide , set <int> & fSide , map <int , vector <int> > & tS , map <int , vector <int> > & sT)
356
+ {
357
+ set <int> :: iterator iter;
358
+
359
+ int sz = eSide.size();
360
+ vector <int> t;
361
+
362
+ for (iter = eSide.begin(); iter != eSide.end(); iter++) {
363
+ t = tS[*iter];
364
+
365
+ for (int i = 0; i < t.size(); i++) {
366
+ fSide.insert(t[i]);
367
+ }
368
+
369
+ }
370
+
371
+ for (iter = fSide.begin(); iter != fSide.end(); iter++) {
372
+
373
+ t = sT[*iter];
374
+
375
+ for (int i = 0 ; i<t.size(); i++) {
376
+ eSide.insert(t[i]);
377
+ }
378
+
379
+ }
380
+
381
+ if (eSide.size () > sz) {
382
+ getMeCepts(eSide,fSide,tS,sT);
383
+ }
384
+
385
+ }
386
+
387
+ void constructCepts(vector < pair < set <int> , set <int> > > & ceptsInPhrase, set <int> & sourceNullWords, set <int> & targetNullWords, vector <string> & alignment, int eSize, int fSize)
388
+ {
389
+
390
+ ceptsInPhrase.clear();
391
+ sourceNullWords.clear();
392
+ targetNullWords.clear();
393
+
394
+ vector <int> align;
395
+
396
+ std::map <int , vector <int> > sT;
397
+ std::map <int , vector <int> > tS;
398
+ std::set <int> eSide;
399
+ std::set <int> fSide;
400
+ std::set <int> :: iterator iter;
401
+ std :: map <int , vector <int> > :: iterator iter2;
402
+ std :: pair < set <int> , set <int> > cept;
403
+ int src;
404
+ int tgt;
405
+ ceptsInPhrase.clear();
406
+
407
+ for (int j=0; j<alignment.size(); j+=2) {
408
+ align.push_back(stringToInteger(alignment[j+1]));
409
+ align.push_back(stringToInteger(alignment[j]));
410
+ }
411
+
412
+ for (int i = 0; i < align.size(); i+=2) {
413
+ src = align[i];
414
+ tgt = align[i+1];
415
+ tS[tgt].push_back(src);
416
+ sT[src].push_back(tgt);
417
+ }
418
+
419
+ for (int i = 0; i< fSize; i++) {
420
+ if (sT.find(i) == sT.end()) {
421
+ targetNullWords.insert(i);
422
+ }
423
+ }
424
+
425
+ for (int i = 0; i< eSize; i++) {
426
+ if (tS.find(i) == tS.end()) {
427
+ sourceNullWords.insert(i);
428
+ }
429
+ }
430
+
431
+
432
+ while (tS.size() != 0 && sT.size() != 0) {
433
+
434
+ iter2 = tS.begin();
435
+
436
+ eSide.clear();
437
+ fSide.clear();
438
+ eSide.insert (iter2->first);
439
+
440
+ getMeCepts(eSide, fSide, tS , sT);
441
+
442
+ for (iter = eSide.begin(); iter != eSide.end(); iter++) {
443
+ iter2 = tS.find(*iter);
444
+ tS.erase(iter2);
445
+ }
446
+
447
+ for (iter = fSide.begin(); iter != fSide.end(); iter++) {
448
+ iter2 = sT.find(*iter);
449
+ sT.erase(iter2);
450
+ }
451
+
452
+ cept = make_pair (fSide , eSide);
453
+ ceptsInPhrase.push_back(cept);
454
+ }
455
+
456
+ }
457
+
458
+ int main(int argc, char * argv[])
459
+ {
460
+
461
+ vector <string> e;
462
+ vector <string> f;
463
+ vector <string> a;
464
+ vector <string> singletons;
465
+ map <string,int> sTons;
466
+ vector < pair < set <int> , set <int> > > ceptsInPhrase;
467
+ vector < pair < string , vector <int> > > gCepts;
468
+
469
+ set <int> sourceNullWords;
470
+ set <int> targetNullWords;
471
+
472
+ vector <string> currE;
473
+ vector <string> currF;
474
+ vector <string> currA;
475
+
476
+ loadInput(argv[4],singletons);
477
+
478
+ for(int i=0; i<singletons.size(); i++)
479
+ sTons[singletons[i]]=i;
480
+
481
+ loadInput(argv[1],e);
482
+ loadInput(argv[2],f);
483
+ loadInput(argv[3],a);
484
+
485
+
486
+ for (int i=0; i<a.size(); i++) {
487
+
488
+
489
+ getWords(e[i],currE);
490
+ getWords(f[i],currF);
491
+ getWords(a[i],currA);
492
+
493
+ constructCepts(ceptsInPhrase, sourceNullWords , targetNullWords, currA , currE.size(), currF.size());
494
+ //cout<<"CC done"<<endl;
495
+ ceptsInGenerativeStoryFormat(ceptsInPhrase , gCepts , sourceNullWords, currE);
496
+ //cout<<"format done"<<endl;
497
+ // printCepts(gCepts, currF);
498
+ generateStory(gCepts, targetNullWords ,currF,sTons);
499
+
500
+
501
+ /*
502
+ cout<<"________________________________________"<<endl;
503
+
504
+ cout<<"Press any integer to continue ..."<<endl;
505
+ int xx;
506
+ cin>>xx;
507
+ */
508
+
509
+ }
510
+
511
+
512
+ return 0;
513
+
514
+ }
mosesdecoder/misc/GenerateTuples.cpp ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ////////////////////////////////////////////////////////////
3
+ //
4
+ // generate set of target candidates for confusion net
5
+ //
6
+ ////////////////////////////////////////////////////////////
7
+
8
+
9
+
10
+ #include <numeric>
11
+ #include "moses/Word.h"
12
+ #include "moses/Phrase.h"
13
+ #include "moses/ConfusionNet.h"
14
+ #include "moses/WordsRange.h"
15
+ #include "moses/TranslationModel/PhraseDictionaryTree.h"
16
+
17
+ using namespace Moses;
18
+
19
+ #if 0
20
+ // Generates all tuples from n indexes with ranges 0 to card[j]-1, respectively..
21
+ // Input: number of indexes and ranges: ranges[0] ... ranges[num_idx-1]
22
+ // Output: number of tuples and monodimensional array of tuples.
23
+ // Reference: mixed-radix generation algorithm (D. E. Knuth, TAOCP v. 4.2)
24
+
25
+ size_t GenerateTuples(unsigned num_idx,unsigned* ranges,unsigned *&tuples)
26
+ {
27
+ unsigned* single_tuple= new unsigned[num_idx+1];
28
+ unsigned num_tuples=1;
29
+
30
+ for (unsigned k=0; k<num_idx; ++k) {
31
+ num_tuples *= ranges[k];
32
+ single_tuple[k]=0;
33
+ }
34
+
35
+ tuples=new unsigned[num_idx * num_tuples];
36
+
37
+ // we need this additional element for the last iteration
38
+ single_tuple[num_idx]=0;
39
+ unsigned j=0;
40
+ for (unsigned n=0; n<num_tuples; ++n) {
41
+ memcpy((void *)((tuples + n * num_idx)),(void *)single_tuple,num_idx * sizeof(unsigned));
42
+ j=0;
43
+ while (single_tuple[j]==ranges[j]-1) {
44
+ single_tuple[j]=0;
45
+ ++j;
46
+ }
47
+ ++single_tuple[j];
48
+ }
49
+ delete [] single_tuple;
50
+ return num_tuples;
51
+ }
52
+
53
+
54
+ typedef PhraseDictionaryTree::PrefixPtr PPtr;
55
+ typedef std::vector<PPtr> vPPtr;
56
+ typedef std::vector<std::vector<Factor const*> > mPhrase;
57
+
58
+ std::ostream& operator<<(std::ostream& out,const mPhrase& p)
59
+ {
60
+ for(size_t i=0; i<p.size(); ++i) {
61
+ out<<i<<" - ";
62
+ for(size_t j=0; j<p[i].size(); ++j)
63
+ out<<p[i][j]->ToString()<<" ";
64
+ out<<"|";
65
+ }
66
+
67
+ return out;
68
+ }
69
+
70
+ struct State {
71
+ vPPtr ptrs;
72
+ WordsRange range;
73
+ float score;
74
+
75
+ State() : range(0,0),score(0.0) {}
76
+ State(size_t b,size_t e,const vPPtr& v,float sc=0.0) : ptrs(v),range(b,e),score(sc) {}
77
+
78
+ size_t begin() const {
79
+ return range.GetStartPos();
80
+ }
81
+ size_t end() const {
82
+ return range.GetEndPos();
83
+ }
84
+ float GetScore() const {
85
+ return score;
86
+ }
87
+
88
+ };
89
+
90
+ std::ostream& operator<<(std::ostream& out,const State& s)
91
+ {
92
+ out<<"["<<s.ptrs.size()<<" ("<<s.begin()<<","<<s.end()<<") "<<s.GetScore()<<"]";
93
+
94
+ return out;
95
+ }
96
+
97
+ typedef std::map<mPhrase,float> E2Costs;
98
+
99
+
100
+ struct GCData {
101
+ const std::vector<PhraseDictionaryTree const*>& pdicts;
102
+ const std::vector<std::vector<float> >& weights;
103
+ std::vector<FactorType> inF,outF;
104
+ size_t distinctOutputFactors;
105
+ vPPtr root;
106
+ size_t totalTuples,distinctTuples;
107
+
108
+
109
+ GCData(const std::vector<PhraseDictionaryTree const*>& a,
110
+ const std::vector<std::vector<float> >& b)
111
+ : pdicts(a),weights(b),totalTuples(0),distinctTuples(0) {
112
+
113
+ CHECK(pdicts.size()==weights.size());
114
+ std::set<FactorType> distinctOutFset;
115
+ inF.resize(pdicts.size());
116
+ outF.resize(pdicts.size());
117
+ root.resize(pdicts.size());
118
+ for(size_t i=0; i<pdicts.size(); ++i) {
119
+ root[i]=pdicts[i]->GetRoot();
120
+ inF[i]=pdicts[i]->GetInputFactorType();
121
+ outF[i]=pdicts[i]->GetOutputFactorType();
122
+ distinctOutFset.insert(pdicts[i]->GetOutputFactorType());
123
+ }
124
+ distinctOutputFactors=distinctOutFset.size();
125
+ }
126
+
127
+ FactorType OutFT(size_t i) const {
128
+ return outF[i];
129
+ }
130
+ FactorType InFT(size_t i) const {
131
+ return inF[i];
132
+ }
133
+ size_t DistinctOutFactors() const {
134
+ return distinctOutputFactors;
135
+ }
136
+
137
+ const vPPtr& GetRoot() const {
138
+ return root;
139
+ }
140
+
141
+ };
142
+
143
+ typedef std::vector<Factor const*> vFactor;
144
+ typedef std::vector<std::pair<float,vFactor> > TgtCandList;
145
+
146
+ typedef std::vector<TgtCandList> OutputFactor2TgtCandList;
147
+ typedef std::vector<OutputFactor2TgtCandList*> Len2Cands;
148
+
149
+ void GeneratePerFactorTgtList(size_t factorType,PPtr pptr,GCData& data,Len2Cands& len2cands)
150
+ {
151
+ std::vector<FactorTgtCand> cands;
152
+ data.pdicts[factorType]->GetTargetCandidates(pptr,cands);
153
+
154
+ for(std::vector<FactorTgtCand>::const_iterator cand=cands.begin(); cand!=cands.end(); ++cand) {
155
+ CHECK(data.weights[factorType].size()==cand->second.size());
156
+ float costs=std::inner_product(data.weights[factorType].begin(),
157
+ data.weights[factorType].end(),
158
+ cand->second.begin(),
159
+ 0.0);
160
+
161
+ size_t len=cand->first.size();
162
+ if(len>=len2cands.size()) len2cands.resize(len+1,0);
163
+ if(!len2cands[len]) len2cands[len]=new OutputFactor2TgtCandList(data.DistinctOutFactors());
164
+ OutputFactor2TgtCandList &outf2tcandlist=*len2cands[len];
165
+
166
+ outf2tcandlist[data.OutFT(factorType)].push_back(std::make_pair(costs,cand->first));
167
+ }
168
+ }
169
+
170
+ void GenerateTupleTgtCands(OutputFactor2TgtCandList& tCand,E2Costs& e2costs,GCData& data)
171
+ {
172
+ // check if candidates are non-empty
173
+ bool gotCands=1;
174
+ for(size_t j=0; gotCands && j<tCand.size(); ++j)
175
+ gotCands &= !tCand[j].empty();
176
+
177
+ if(gotCands) {
178
+ // enumerate tuples
179
+ CHECK(data.DistinctOutFactors()==tCand.size());
180
+ std::vector<unsigned> radix(data.DistinctOutFactors());
181
+ for(size_t i=0; i<tCand.size(); ++i) radix[i]=tCand[i].size();
182
+
183
+ unsigned *tuples=0;
184
+ size_t numTuples=GenerateTuples(radix.size(),&radix[0],tuples);
185
+
186
+ data.totalTuples+=numTuples;
187
+
188
+ for(size_t i=0; i<numTuples; ++i) {
189
+ mPhrase e(radix.size());
190
+ float costs=0.0;
191
+ for(size_t j=0; j<radix.size(); ++j) {
192
+ CHECK(tuples[radix.size()*i+j]<tCand[j].size());
193
+ std::pair<float,vFactor> const& mycand=tCand[j][tuples[radix.size()*i+j]];
194
+ e[j]=mycand.second;
195
+ costs+=mycand.first;
196
+ }
197
+ #ifdef DEBUG
198
+ bool mismatch=0;
199
+ for(size_t j=1; !mismatch && j<e.size(); ++j)
200
+ if(e[j].size()!=e[j-1].size()) mismatch=1;
201
+ CHECK(mismatch==0);
202
+ #endif
203
+ std::pair<E2Costs::iterator,bool> p=e2costs.insert(std::make_pair(e,costs));
204
+ if(p.second) ++data.distinctTuples;
205
+ else {
206
+ // entry known, take min of costs, alternative: sum probs
207
+ if(costs<p.first->second) p.first->second=costs;
208
+ }
209
+ }
210
+ delete [] tuples;
211
+ }
212
+ }
213
+
214
+ void GenerateCandidates_(E2Costs& e2costs,const vPPtr& nextP,GCData& data)
215
+ {
216
+ Len2Cands len2cands;
217
+ // generate candidates for each element of nextP:
218
+ for(size_t factorType=0; factorType<nextP.size(); ++factorType)
219
+ if(nextP[factorType])
220
+ GeneratePerFactorTgtList(factorType,nextP[factorType],data,len2cands);
221
+
222
+ // for each length: enumerate tuples, compute score, and insert in e2costs
223
+ for(size_t len=0; len<len2cands.size(); ++len) if(len2cands[len])
224
+ GenerateTupleTgtCands(*len2cands[len],e2costs,data);
225
+ }
226
+
227
+ void GenerateCandidates(const ConfusionNet& src,
228
+ const std::vector<PhraseDictionaryTree const*>& pdicts,
229
+ const std::vector<std::vector<float> >& weights,
230
+ int verbose)
231
+ {
232
+ GCData data(pdicts,weights);
233
+
234
+ std::vector<State> stack;
235
+ for(size_t i=0; i<src.GetSize(); ++i) stack.push_back(State(i,i,data.GetRoot()));
236
+
237
+ std::map<WordsRange,E2Costs> cov2E;
238
+
239
+ // std::cerr<<"start while loop. initial stack size: "<<stack.size()<<"\n";
240
+
241
+ while(!stack.empty()) {
242
+ State curr(stack.back());
243
+ stack.pop_back();
244
+
245
+ //std::cerr<<"processing state "<<curr<<" stack size: "<<stack.size()<<"\n";
246
+
247
+ CHECK(curr.end()<src.GetSize());
248
+ const ConfusionNet::Column &currCol=src[curr.end()];
249
+ for(size_t colidx=0; colidx<currCol.size(); ++colidx) {
250
+ const Word& w=currCol[colidx].first;
251
+ vPPtr nextP(curr.ptrs);
252
+ for(size_t j=0; j<nextP.size(); ++j)
253
+ nextP[j]=pdicts[j]->Extend(nextP[j],
254
+ w.GetFactor(data.InFT(j))->GetString());
255
+
256
+ bool valid=1;
257
+ for(size_t j=0; j<nextP.size(); ++j) if(!nextP[j]) {
258
+ valid=0;
259
+ break;
260
+ }
261
+
262
+ if(valid) {
263
+ if(curr.end()+1<src.GetSize())
264
+ stack.push_back(State(curr.begin(),curr.end()+1,nextP,
265
+ curr.GetScore()+currCol[colidx].second));
266
+
267
+ E2Costs &e2costs=cov2E[WordsRange(curr.begin(),curr.end()+1)];
268
+ GenerateCandidates_(e2costs,nextP,data);
269
+ }
270
+ }
271
+
272
+ // check if there are translations of one-word phrases ...
273
+ //if(curr.begin()==curr.end() && tCand.empty()) {}
274
+
275
+ } // end while(!stack.empty())
276
+
277
+ if(verbose) {
278
+ // print statistics for debugging purposes
279
+ std::cerr<<"tuple stats: total: "<<data.totalTuples
280
+ <<" distinct: "<<data.distinctTuples<<" ("
281
+ <<(data.distinctTuples/(0.01*data.totalTuples))
282
+ <<"%)\n";
283
+ std::cerr<<"per coverage set:\n";
284
+ for(std::map<WordsRange,E2Costs>::const_iterator i=cov2E.begin();
285
+ i!=cov2E.end(); ++i) {
286
+ std::cerr<<i->first<<" -- distinct cands: "
287
+ <<i->second.size()<<"\n";
288
+ }
289
+ std::cerr<<"\n\n";
290
+ }
291
+
292
+ if(verbose>10) {
293
+ std::cerr<<"full list:\n";
294
+ for(std::map<WordsRange,E2Costs>::const_iterator i=cov2E.begin();
295
+ i!=cov2E.end(); ++i) {
296
+ std::cerr<<i->first<<" -- distinct cands: "
297
+ <<i->second.size()<<"\n";
298
+ for(E2Costs::const_iterator j=i->second.begin(); j!=i->second.end(); ++j)
299
+ std::cerr<<j->first<<" -- "<<j->second<<"\n";
300
+ }
301
+ }
302
+ }
303
+
304
+ #else
305
+
306
+ void GenerateCandidates(const ConfusionNet&,
307
+ const std::vector<PhraseDictionaryTree const*>&,
308
+ const std::vector<std::vector<float> >&,
309
+ int)
310
+ {
311
+ std::cerr<<"ERROR: GenerateCandidates is currently broken\n";
312
+ }
313
+
314
+ #endif
mosesdecoder/misc/GenerateTuples.h ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // $Id$
2
+ #ifndef GENERATETUPLES_H_
3
+ #define GENERATETUPLES_H_
4
+ #include "moses/PhraseDictionaryTree.h"
5
+
6
+ class ConfusionNet;
7
+
8
+ void GenerateCandidates(const ConfusionNet& src,
9
+ const std::vector<PhraseDictionaryTree const*>& pdicts,
10
+ const std::vector<std::vector<float> >& weights,
11
+ int verbose=0) ;
12
+ #endif
mosesdecoder/misc/Jamfile ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #exe processPhraseTable : GenerateTuples.cpp processPhraseTable.cpp ..//boost_filesystem ../moses//moses ;
2
+
3
+ exe processLexicalTable : processLexicalTable.cpp ..//boost_filesystem ../moses//moses ;
4
+
5
+ #exe queryPhraseTable : queryPhraseTable.cpp ..//boost_filesystem ../moses//moses ;
6
+
7
+ exe queryLexicalTable : queryLexicalTable.cpp ..//boost_filesystem ../moses//moses ;
8
+
9
+ exe generateSequences : GenerateSequences.cpp ..//boost_filesystem ../moses//moses ;
10
+
11
+ exe TMining : TransliterationMining.cpp ..//boost_filesystem ../moses//moses ;
12
+
13
+ exe 1-1-Extraction : 1-1-Extraction.cpp ..//boost_filesystem ../moses//moses ;
14
+
15
+ exe prunePhraseTable : prunePhraseTable.cpp ..//boost_filesystem ../moses//moses ..//boost_program_options ;
16
+
17
+ exe pruneGeneration : pruneGeneration.cpp ..//boost_filesystem ../moses//moses ..//boost_program_options ;
18
+
19
+ local with-cmph = [ option.get "with-cmph" ] ;
20
+ if $(with-cmph) {
21
+ exe processPhraseTableMin : processPhraseTableMin.cpp ..//boost_filesystem ../moses//moses ;
22
+ exe processLexicalTableMin : processLexicalTableMin.cpp ..//boost_filesystem ../moses//moses ;
23
+ exe queryPhraseTableMin : queryPhraseTableMin.cpp ..//boost_filesystem ../moses//moses ;
24
+ exe addLexROtoPT : addLexROtoPT.cpp ..//boost_filesystem ../moses//moses ;
25
+
26
+ alias programsMin : processPhraseTableMin processLexicalTableMin queryPhraseTableMin addLexROtoPT ;
27
+ # alias programsMin : processPhraseTableMin processLexicalTableMin ;
28
+ }
29
+ else {
30
+ alias programsMin ;
31
+ }
32
+
33
+ exe merge-sorted :
34
+ merge-sorted.cc
35
+ ../moses//moses
36
+ ../moses/TranslationModel/UG/generic//generic
37
+ $(TOP)//boost_iostreams
38
+ $(TOP)//boost_program_options
39
+ ;
40
+
41
+ alias programs : 1-1-Extraction TMining generateSequences processLexicalTable queryLexicalTable programsMin merge-sorted prunePhraseTable pruneGeneration ;
42
+ #processPhraseTable queryPhraseTable
43
+
mosesdecoder/misc/QueryProbingPT.cpp ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include "util/file_piece.hh"
2
+
3
+ #include "util/file.hh"
4
+ #include "util/scoped.hh"
5
+ #include "util/string_piece.hh"
6
+ #include "util/tokenize_piece.hh"
7
+ #include "util/murmur_hash.hh"
8
+ #include "util/probing_hash_table.hh"
9
+ #include "util/usage.hh"
10
+
11
+ #include "moses/TranslationModel/ProbingPT/quering.hh"
12
+
13
+ #include <cstdio>
14
+ #include <sys/types.h>
15
+ #include <sys/stat.h>
16
+
17
+ #include <fstream>
18
+ #include <iostream>
19
+ #include <sstream>
20
+ #include <string>
21
+ #include <sys/mman.h>
22
+ #include <sys/stat.h> //For finding size of file
23
+ #include <boost/functional/hash.hpp>
24
+ #include <sys/types.h>
25
+ #include <sys/stat.h>
26
+ #include <unistd.h>
27
+ #include <fcntl.h>
28
+
29
+ int main(int argc, char* argv[])
30
+ {
31
+ if (argc != 2) {
32
+ // Tell the user how to run the program
33
+ std::cerr << "Usage: " << argv[0] << " path_to_directory" << std::endl;
34
+ return 1;
35
+ }
36
+
37
+ Moses::QueryEngine queries(argv[1]);
38
+
39
+ //Interactive search
40
+ std::cout << "Please enter a string to be searched, or exit to exit." << std::endl;
41
+ while (true) {
42
+ std::string cinstr = "";
43
+ getline(std::cin, cinstr);
44
+ if (cinstr == "exit") {
45
+ break;
46
+ } else {
47
+ //Actual lookup
48
+ std::pair<bool, std::vector<target_text> > query_result;
49
+ query_result = queries.query(StringPiece(cinstr));
50
+
51
+ if (query_result.first) {
52
+ queries.printTargetInfo(query_result.second);
53
+ } else {
54
+ std::cout << "Key not found!" << std::endl;
55
+ }
56
+ }
57
+ }
58
+
59
+ util::PrintUsage(std::cout);
60
+
61
+ return 0;
62
+ }
mosesdecoder/misc/TransliterationMining.cpp ADDED
@@ -0,0 +1,605 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ########################################################################################
3
+
4
+ Transliteration Mining - A Program to Extract Transliteration Pairs from
5
+ a bilingual word list
6
+ Source Contributor: Nadir Durrani
7
+
8
+ ########################################################################################
9
+
10
+ */
11
+
12
+ #include <cstdlib>
13
+ #include <map>
14
+ #include <set>
15
+ #include <cmath>
16
+ #include <fstream>
17
+ #include <iostream>
18
+ #include <vector>
19
+ #include <sstream>
20
+
21
+
22
+ using namespace std;
23
+
24
+
25
+ double initTransitionProb;
26
+ double LAMBDA;
27
+
28
+ double addLogProbs(double A , double B) // this function adds probabilities ...
29
+ {
30
+
31
+ if (A == B)
32
+ return (A + log10(2.0));
33
+
34
+ if (A > B) {
35
+ if (A - B > 6) // A is a lot bigger ...
36
+ return A;
37
+ else
38
+ return (A + log10(1+pow(10,(B-A))));
39
+ }
40
+
41
+ else { // B > A
42
+ if (B - A > 6)
43
+ return B;
44
+ else
45
+ return (B + log10(1+pow(10,(A-B))));
46
+ }
47
+
48
+ }
49
+
50
+
51
+ class NodeStructure
52
+ {
53
+
54
+ public:
55
+
56
+ NodeStructure() {};
57
+ NodeStructure(vector <string> & s , vector <string> & t);
58
+ double getPosterior() {
59
+ return PPR;
60
+ }
61
+ void computeFwdBckProbs(map <string , double> & gammas, map <string, double> & alignmentCounts);
62
+ void computeNonTransliterationProb (map <string , double> & sourceUnigrams , map <string , double> & targetUnigrams);
63
+ void print();
64
+
65
+ vector <string> source;
66
+ vector <string> target;
67
+ ~NodeStructure() {};
68
+
69
+ private:
70
+
71
+ double NTR; // Non-transliteration probability of a sentence pair ...
72
+ double PPR; // Posterior Probability ...
73
+ double ALPHA;
74
+ double BETA;
75
+
76
+ void computeGammaForEdges(map < pair <int , int> , double > & parents, map < pair <int , int> , double > & children , map <string, double> & transitionProbs , map <string, double> & alignmentCounts);
77
+ double computeFwdProbs(pair <int , int> & ST, map <string , double> & gammas, map < pair <int , int> , double > & parents);
78
+ double FwdProb (pair <int , int> & TS, map <string , double> & gammas, map < pair <int , int> , double > & parents);
79
+ double BckProb (pair <int , int> & TS, map <string , double> & gammas, map < pair <int , int> , double > & chidren);
80
+ double computeBckProbs(pair <int , int> & ST, map <string , double> & gammas, map < pair <int , int> , double > & children);
81
+ void getIncomingEdges (pair <int , int> & ST , vector < pair < int , int> > & incomingEdges);
82
+ void getOutgoingEdges (pair <int , int> & ST , vector < pair < int , int> > & outgoingEdges);
83
+ double getTransitionProb(map <string, double> & transitionProbs , pair <int,int> & edge);
84
+ void updateAlignmentCount(map <string, double> & transitionProbs, map <string, double> & alignmentCounts , pair <int,int> & edge , double alpha , double beta);
85
+ void computePosteriorProb();
86
+ double scaleGamma(double g);
87
+ void getEdge (pair <int , int> & v1 , pair <int , int> & v2 , pair <int , int> & v3);
88
+
89
+ };
90
+
91
+ void NodeStructure :: print()
92
+ {
93
+
94
+ for (int i = 0; i < source.size(); i++)
95
+ cout<<source[i];
96
+
97
+ cout<<"\t";
98
+
99
+ for (int i = 0; i < target.size(); i++)
100
+ cout<<target[i];
101
+
102
+ cout<<"\t"<<pow(10,PPR)<<endl;
103
+
104
+ }
105
+
106
+ NodeStructure :: NodeStructure(vector <string> & s , vector <string> & t)
107
+ {
108
+ source = s;
109
+ target = t;
110
+ }
111
+
112
+
113
+ void NodeStructure :: getEdge (pair <int , int> & v1 , pair <int , int> & v2 , pair <int , int> & v3)
114
+ {
115
+ if (v2.first - v1.first == 0)
116
+ v3.first = -1;
117
+ else
118
+ v3.first = v2.first;
119
+
120
+ if (v2.second - v1.second == 0)
121
+ v3.second = -1;
122
+ else
123
+ v3.second = v2.second;
124
+ }
125
+
126
+ void NodeStructure :: computeGammaForEdges(map < pair <int , int> , double > & parents, map < pair <int , int> , double > & children , map <string, double> & transitionProbs , map <string, double> & alignmentCounts)
127
+ {
128
+
129
+ vector < pair < int , int> > incomingEdges;
130
+ map < pair <int , int> , double > :: iterator cIter;
131
+ map < pair <int , int> , double > :: iterator pIter;
132
+ pair <int , int> ST = make_pair (-1,-1);
133
+ pair <int , int> edge;
134
+
135
+ children.erase(ST);
136
+ double tProb;
137
+ double alpha;
138
+ double beta;
139
+
140
+ for (cIter = children.begin(); cIter != children.end(); cIter++) {
141
+ ST = cIter->first;
142
+
143
+ getIncomingEdges (ST , incomingEdges);
144
+ beta = cIter->second;
145
+
146
+ for (int i = 0; i< incomingEdges.size(); i++) {
147
+ pIter = parents.find(incomingEdges[i]);
148
+
149
+ alpha = pIter->second;
150
+ getEdge (incomingEdges[i] , ST , edge);
151
+
152
+ updateAlignmentCount(transitionProbs, alignmentCounts , edge , alpha , beta);
153
+ }
154
+ }
155
+
156
+ }
157
+
158
+ void NodeStructure :: computeNonTransliterationProb (map <string , double> & sourceUnigrams , map <string , double> & targetUnigrams)
159
+ {
160
+
161
+ NTR = 0.0;
162
+
163
+ for (int i = 0; i < source.size(); i++) {
164
+ NTR += sourceUnigrams[source[i]];
165
+ }
166
+
167
+ for (int i = 0; i < target.size(); i++) {
168
+
169
+ NTR += targetUnigrams[target[i]];
170
+ }
171
+
172
+ }
173
+
174
+ double NodeStructure :: scaleGamma(double g)
175
+ {
176
+ double translit = log10 (1 - pow (10, PPR));
177
+ return g + translit;
178
+ }
179
+ void NodeStructure :: computePosteriorProb()
180
+ {
181
+ double LAMBDA2 = log10(1 - pow(10, LAMBDA));
182
+ double transliterate = LAMBDA2 + ALPHA; // Transliteration Prob ...
183
+ double translate = LAMBDA + NTR; // Translation Prob ...
184
+ double trans = transliterate - translate;
185
+ //cout<<LAMBDA<<" "<<LAMBDA2<<endl;
186
+ //cout<<transliterate<<" "<<translate<<" "<<trans<<endl;
187
+ //cout<<pow(10 , trans)<<endl;
188
+ double prob = 1/(1+ pow(10 , trans));
189
+ PPR = log10(prob);
190
+
191
+ //cout<<"Posterior Prob "<<PPR<<endl;
192
+ }
193
+
194
+ void NodeStructure :: computeFwdBckProbs(map <string , double> & gammas , map <string, double> & alignmentCounts)
195
+ {
196
+ pair <int , int> START = make_pair (source.size()-1 , target.size()-1);
197
+ pair <int , int> END = make_pair (-1 , -1);
198
+
199
+ map < pair <int , int> , double > parents;
200
+ parents[make_pair(-1,-1)] = 0.0;
201
+ map < pair <int , int> , double > children;
202
+ children[make_pair(source.size()-1,target.size()-1)] = 0.0;
203
+
204
+ ALPHA = computeFwdProbs(START , gammas, parents);
205
+ BETA = computeBckProbs(END , gammas, children);
206
+
207
+ computePosteriorProb();
208
+ //cout<<"Alpha "<<ALPHA<<" Beta "<<BETA<<endl;
209
+ computeGammaForEdges(parents , children , gammas , alignmentCounts);
210
+
211
+ }
212
+
213
+ void NodeStructure :: getIncomingEdges (pair <int , int> & ST , vector < pair < int , int> > & incomingEdges)
214
+ {
215
+ incomingEdges.clear();
216
+
217
+ if (ST.first == -1) { // Source is NULL ..
218
+ incomingEdges.push_back(make_pair(ST.first , ST.second-1));
219
+ } else if (ST.second == -1) { // Target is NULL ...
220
+ incomingEdges.push_back(make_pair(ST.first-1 , ST.second));
221
+ } else {
222
+ incomingEdges.push_back(make_pair(ST.first , ST.second-1));
223
+ incomingEdges.push_back(make_pair(ST.first-1 , ST.second));
224
+ incomingEdges.push_back(make_pair(ST.first-1 , ST.second-1));
225
+ }
226
+
227
+ }
228
+
229
+ void NodeStructure :: getOutgoingEdges (pair <int , int> & ST , vector < pair < int , int> > & outgoingEdges)
230
+ {
231
+
232
+ if (ST.first == source.size()-1) { // Source is END ..
233
+ outgoingEdges.push_back(make_pair(ST.first , ST.second+1));
234
+ } else if (ST.second == target.size()-1) { // Target is END ...
235
+ outgoingEdges.push_back(make_pair(ST.first+1 , ST.second));
236
+ } else {
237
+ outgoingEdges.push_back(make_pair(ST.first , ST.second+1));
238
+ outgoingEdges.push_back(make_pair(ST.first+1 , ST.second));
239
+ outgoingEdges.push_back(make_pair(ST.first+1 , ST.second+1));
240
+ }
241
+
242
+ }
243
+
244
+ void NodeStructure :: updateAlignmentCount(map <string, double> & transitionProbs, map <string, double> & alignmentCounts , pair <int,int> & edge , double alpha , double beta)
245
+ {
246
+
247
+ double tProb;
248
+ double tgamma;
249
+ double gamma;
250
+ map <string , double> :: iterator aCounts;
251
+ string query;
252
+
253
+ if (edge.first == -1)
254
+ query = "NULL";
255
+ else
256
+ query = source[edge.first];
257
+
258
+ query += "-";
259
+
260
+ if (edge.second == -1)
261
+ query += "NULL";
262
+ else
263
+ query += target[edge.second];
264
+
265
+ //cout<<" Query "<<query<<endl;
266
+ if (transitionProbs.size() == 0)
267
+ tProb = initTransitionProb;
268
+ else
269
+ tProb = transitionProbs[query];
270
+
271
+
272
+ tgamma = alpha + tProb + beta - ALPHA;
273
+ gamma = scaleGamma(tgamma);
274
+ //cout<<alpha<<" "<<beta<<" "<<gamma<<endl;
275
+ //cout<<tProb<<" "<<ALPHA<<endl;
276
+
277
+ aCounts = alignmentCounts.find(query);
278
+
279
+ if (aCounts == alignmentCounts.end()) {
280
+ alignmentCounts[query] = gamma;
281
+ } else {
282
+ double temp = aCounts->second;
283
+ aCounts->second = addLogProbs(temp , gamma);
284
+ }
285
+
286
+ }
287
+
288
+ double NodeStructure :: getTransitionProb(map <string, double> & transitionProbs , pair <int,int> & edge)
289
+ {
290
+
291
+ if (transitionProbs.size() == 0)
292
+ return initTransitionProb;
293
+
294
+ string query;
295
+
296
+ if (edge.first == -1)
297
+ query = "NULL";
298
+ else
299
+ query = source[edge.first];
300
+
301
+ query += "-";
302
+
303
+ if (edge.second == -1)
304
+ query += "NULL";
305
+ else
306
+ query += target[edge.second];
307
+
308
+ //cout<<" Query "<<query<<endl;
309
+ return transitionProbs[query];
310
+ }
311
+
312
+ double NodeStructure :: FwdProb (pair <int , int> & TS, map <string , double> & gammas, map < pair <int , int> , double > & parents)
313
+ {
314
+
315
+ double thisAlpha;
316
+ double alpha = -2000;
317
+ vector < pair < int , int> > incomingEdges;
318
+ pair <int , int> edge;
319
+
320
+
321
+ getIncomingEdges (TS , incomingEdges);
322
+
323
+ for (int k = 0; k < incomingEdges.size(); k++) {
324
+ thisAlpha = parents[incomingEdges[k]];
325
+ getEdge (incomingEdges[k], TS , edge);
326
+ thisAlpha += getTransitionProb(gammas , edge); // Get Transition Prob ...
327
+ double temp = alpha;
328
+ alpha = addLogProbs(temp , thisAlpha); // Sum of all parents * transition prob ..
329
+ // cout<<temp<<"+"<<thisAlpha<<"="<<alpha<<endl;
330
+ }
331
+
332
+ return alpha;
333
+ }
334
+
335
+ double NodeStructure :: computeFwdProbs(pair <int , int> & ST, map <string , double> & gammas, map < pair <int , int> , double > & parents)
336
+ {
337
+
338
+ pair <int , int> TS;
339
+ double alpha;
340
+
341
+ for (int i = 0; i < source.size(); i++) {
342
+ TS = make_pair (i , -1);
343
+ alpha = FwdProb (TS, gammas, parents);
344
+ parents[TS] = alpha;
345
+ }
346
+
347
+ for (int i = 0; i < target.size(); i++) {
348
+ TS = make_pair (-1 , i);
349
+ alpha = FwdProb (TS, gammas, parents);
350
+ parents[TS] = alpha;
351
+ }
352
+
353
+ for (int i = 0; i < source.size(); i++) {
354
+ for (int j = 0; j < target.size(); j++) {
355
+ TS = make_pair (i , j);
356
+ alpha = FwdProb (TS, gammas, parents);
357
+ parents[TS] = alpha;
358
+ }
359
+ }
360
+
361
+ return parents[ST];
362
+ }
363
+
364
+ double NodeStructure :: BckProb (pair <int , int> & TS, map <string , double> & gammas, map < pair <int , int> , double > & children)
365
+ {
366
+
367
+ double thisBeta;
368
+ double beta = -2000;
369
+ vector < pair < int , int> > outgoingEdges;
370
+ pair <int , int> edge;
371
+
372
+ getOutgoingEdges (TS , outgoingEdges);
373
+
374
+ for (int k = 0; k < outgoingEdges.size(); k++) {
375
+ thisBeta = children[outgoingEdges[k]];
376
+ getEdge (TS , outgoingEdges[k], edge);
377
+ thisBeta += getTransitionProb(gammas , edge); // Get Transition Prob ...
378
+ double temp = beta;
379
+ beta = addLogProbs(temp , thisBeta); // Sum of all parents * transition prob ..
380
+ // cout<<temp<<"+"<<thisAlpha<<"="<<alpha<<endl;
381
+ }
382
+
383
+ return beta;
384
+ }
385
+
386
+
387
+ double NodeStructure :: computeBckProbs(pair <int , int> & ST, map <string , double> & gammas, map < pair <int , int> , double > & children)
388
+ {
389
+
390
+ pair <int , int> TS;
391
+ double beta;
392
+
393
+ for (int i = source.size()-2; i >= -1; i--) {
394
+ TS = make_pair (i , target.size()-1);
395
+ beta = BckProb (TS, gammas, children);
396
+ children[TS] = beta;
397
+ }
398
+
399
+ for (int i = target.size()-2; i >=-1; i--) {
400
+ TS = make_pair (source.size()-1 , i);
401
+ beta = BckProb (TS, gammas, children);
402
+ children[TS] = beta;
403
+ }
404
+
405
+ for (int i = source.size()-2 ; i >= -1 ; i--) {
406
+ for (int j = target.size()-2 ; j >= -1; j--) {
407
+ TS = make_pair (i , j);
408
+ beta = BckProb (TS, gammas, children);
409
+ children[TS] = beta;
410
+ }
411
+ }
412
+
413
+ return children[ST];
414
+ }
415
+
416
+
417
+
418
+ void loadInput(const char * fileName, vector <string> & input)
419
+ {
420
+
421
+ /* This function loads a file into a vector of strings */
422
+
423
+ ifstream sr (fileName);
424
+ string line;
425
+
426
+ if(sr.is_open()) {
427
+ while(getline(sr , line )) {
428
+ input.push_back(line);
429
+ }
430
+
431
+ sr.close();
432
+ } else {
433
+ cout<<"Unable to read "<<fileName<<endl;
434
+ exit(1);
435
+ }
436
+
437
+ }
438
+
439
+ void printGammas(map <string, double> & alignmentCounts)
440
+ {
441
+ map <string , double> :: iterator aCounts;
442
+
443
+ for (aCounts = alignmentCounts.begin(); aCounts != alignmentCounts.end(); aCounts++) {
444
+ cout<<aCounts->first<<" "<<aCounts->second<<endl;
445
+ }
446
+ }
447
+
448
+
449
+ void getWords(string s, vector <string> & currInput)
450
+ {
451
+
452
+ /* This function splits a string into vector of strings using space character as a delimiter */
453
+
454
+ istringstream iss(s);
455
+ currInput.clear();
456
+ do {
457
+ string sub;
458
+ iss >> sub;
459
+ currInput.push_back(sub);
460
+
461
+ } while (iss);
462
+
463
+ currInput.pop_back();
464
+ }
465
+
466
+ double getInitTransitionProb(int sourceToken, int targetToken)
467
+ {
468
+ double prod = sourceToken * targetToken;
469
+ return log10(1/prod);
470
+ }
471
+
472
+ void runIteration(map <int , NodeStructure> & graph , map <string , double> & gammas , int size)
473
+ {
474
+
475
+ map <string, double> alignmentCounts;
476
+ map <int , NodeStructure> :: iterator i;
477
+ map <string , double> :: iterator aCounts;
478
+ double sum = -2000.0;
479
+ double tPPR = -2000.0;
480
+
481
+ for (i = graph.begin(); i != graph.end(); i++) {
482
+
483
+ i->second.computeFwdBckProbs(gammas , alignmentCounts);
484
+ double temp = tPPR;
485
+
486
+ tPPR = addLogProbs(graph[i->first].getPosterior() , temp);
487
+
488
+ }
489
+
490
+ for (aCounts = alignmentCounts.begin(); aCounts != alignmentCounts.end(); aCounts++) {
491
+ double temp = sum;
492
+ sum = addLogProbs(aCounts->second, temp);
493
+ }
494
+
495
+
496
+ for (aCounts = alignmentCounts.begin(); aCounts != alignmentCounts.end(); aCounts++) { // Normalizing ...
497
+ aCounts->second = aCounts->second - sum;
498
+ }
499
+
500
+ gammas.clear();
501
+ gammas = alignmentCounts;
502
+
503
+ LAMBDA = tPPR - log10(size);
504
+ }
505
+
506
+
507
+ void setNTRProbabilities(map <int , NodeStructure> & graph , map <string , double> & sourceTypes , map <string , double > & targetTypes, double sourceTokens, double targetTokens)
508
+ {
509
+
510
+ map <string , double> :: iterator i;
511
+ map <int , NodeStructure> :: iterator j;
512
+
513
+
514
+ for (i = sourceTypes.begin(); i!= sourceTypes.end(); i++) {
515
+ i->second = log10(i->second/sourceTokens);
516
+ }
517
+
518
+ for (i = targetTypes.begin(); i!= targetTypes.end(); i++) {
519
+ i->second = log10(i->second/targetTokens);
520
+ }
521
+
522
+
523
+ for (j = graph.begin(); j != graph.end(); j++) {
524
+ j->second.computeNonTransliterationProb(sourceTypes , targetTypes);
525
+ }
526
+
527
+ }
528
+
529
+ void printPosterior(map <int , NodeStructure> & graph)
530
+ {
531
+
532
+ map <int , NodeStructure> :: iterator i;
533
+
534
+ for (i = graph.begin(); i != graph.end(); i++)
535
+ graph[i->first].print();
536
+ }
537
+
538
+
539
+ int main(int argc, char * argv[])
540
+ {
541
+
542
+ vector <string> input;
543
+ vector <string> source;
544
+ vector <string> target;
545
+ map <string , double> sourceTypes;
546
+ map <string , double> targetTypes;
547
+ set < vector <string> > tgt;
548
+ set < vector <string> > src;
549
+ double sourceTokens = 0;
550
+ double targetTokens = 0;
551
+ map <int , NodeStructure> graph;
552
+ map <string , double> gammas;
553
+
554
+ loadInput(argv[1],input);
555
+
556
+ cerr<<"Constructing Graph "<<endl;
557
+
558
+ for(int i=0; i<input.size(); i+=2) {
559
+
560
+ //cerr<<input[i]<<endl;
561
+ //cerr<<input[i+1]<<endl;
562
+
563
+
564
+ getWords(input[i],source);
565
+ getWords(input[i+1],target);
566
+
567
+ if (src.find(source) == src.end()) {
568
+ for (int j = 0; j< source.size(); j++)
569
+ sourceTypes[source[j]]++;
570
+ src.insert(source);
571
+ sourceTokens += source.size();
572
+ }
573
+
574
+ if (tgt.find(target) == tgt.end()) {
575
+ for (int j = 0; j< target.size(); j++)
576
+ targetTypes[target[j]]++;
577
+
578
+ tgt.insert(target);
579
+ targetTokens += target.size();
580
+ }
581
+
582
+ NodeStructure obj (source,target);
583
+ graph[i] = obj;
584
+
585
+ }
586
+
587
+ setNTRProbabilities(graph, sourceTypes, targetTypes, sourceTokens, targetTokens);
588
+ initTransitionProb = getInitTransitionProb(sourceTypes.size()+1, targetTypes.size()+1);
589
+
590
+ LAMBDA = log10(0.5);
591
+
592
+
593
+ for (int i = 0; i< 10; i++) {
594
+
595
+ cerr<<"Computing Probs : iteration "<<i+1<<endl;
596
+ runIteration(graph , gammas , input.size()/2);
597
+
598
+ }
599
+
600
+ printPosterior(graph);
601
+ cerr<<"Finished..."<<endl;
602
+
603
+ return 0;
604
+ }
605
+
mosesdecoder/misc/addLexROtoPT.cpp ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <iostream>
2
+ #include <string>
3
+
4
+ #include "moses/Phrase.h"
5
+ #include "moses/FactorCollection.h"
6
+ #include "moses/Timer.h"
7
+ #include "moses/InputFileStream.h"
8
+ #include "moses/TranslationModel/CompactPT/BlockHashIndex.h"
9
+ #include "moses/TranslationModel/CompactPT/CanonicalHuffman.h"
10
+ #include "moses/TranslationModel/CompactPT/StringVector.h"
11
+
12
+ using namespace Moses;
13
+ using namespace std;
14
+
15
+ Timer timer;
16
+
17
+ FactorList m_factorsF, m_factorsE, m_factorsC;
18
+
19
+ BlockHashIndex m_hash(10, 16);
20
+ size_t m_numScoreComponent;
21
+ bool m_multipleScoreTrees;
22
+ bool m_inMemory = false;
23
+
24
+ typedef CanonicalHuffman<float> ScoreTree;
25
+ std::vector<ScoreTree*> m_scoreTrees;
26
+
27
+ StringVector<unsigned char, unsigned long, MmapAllocator> m_scoresMapped;
28
+ StringVector<unsigned char, unsigned long, std::allocator> m_scoresMemory;
29
+
30
+ ////////////////////////////////////////////////////////////////////////////////////
31
+ void Load(const string &filePath)
32
+ {
33
+ std::FILE* pFile = std::fopen(filePath.c_str(), "r");
34
+ UTIL_THROW_IF2(pFile == NULL, "File " << filePath << " could not be opened");
35
+
36
+ //if(m_inMemory)
37
+ m_hash.Load(pFile);
38
+ //else
39
+ //m_hash.LoadIndex(pFile);
40
+
41
+ size_t read = 0;
42
+ read += std::fread(&m_numScoreComponent, sizeof(m_numScoreComponent), 1, pFile);
43
+ read += std::fread(&m_multipleScoreTrees,
44
+ sizeof(m_multipleScoreTrees), 1, pFile);
45
+
46
+ if(m_multipleScoreTrees) {
47
+ m_scoreTrees.resize(m_numScoreComponent);
48
+ for(size_t i = 0; i < m_numScoreComponent; i++)
49
+ m_scoreTrees[i] = new CanonicalHuffman<float>(pFile);
50
+ } else {
51
+ m_scoreTrees.resize(1);
52
+ m_scoreTrees[0] = new CanonicalHuffman<float>(pFile);
53
+ }
54
+
55
+ if(m_inMemory)
56
+ m_scoresMemory.load(pFile, false);
57
+ else
58
+ m_scoresMapped.load(pFile, true);
59
+
60
+ }
61
+
62
+ ////////////////////////////////////////////////////////////////////////////////////
63
+
64
+ std::string
65
+ MakeKey(const std::string& f,
66
+ const std::string& e,
67
+ const std::string& c)
68
+ {
69
+ std::string key;
70
+ if(!f.empty()) key += f;
71
+ if(!m_factorsE.empty()) {
72
+ if(!key.empty()) key += " ||| ";
73
+ key += e;
74
+ }
75
+ if(!m_factorsC.empty()) {
76
+ if(!key.empty()) key += " ||| ";
77
+ key += c;
78
+ }
79
+ key += " ||| ";
80
+ return key;
81
+ }
82
+
83
+ ////////////////////////////////////////////////////////////////////////////////////
84
+
85
+ std::vector<float>
86
+ GetScore(const std::string& f, const std::string& e, const std::string& c)
87
+ {
88
+ std::string key;
89
+ std::vector<float> probs;
90
+
91
+ key = MakeKey(f, e, c);
92
+
93
+ size_t index = m_hash[key];
94
+ if(m_hash.GetSize() != index) {
95
+ std::string scoresString;
96
+ if(m_inMemory)
97
+ scoresString = m_scoresMemory[index].str();
98
+ else
99
+ scoresString = m_scoresMapped[index].str();
100
+
101
+
102
+ BitWrapper<> bitStream(scoresString);
103
+ for(size_t i = 0; i < m_numScoreComponent; i++) {
104
+ float prob = m_scoreTrees[m_multipleScoreTrees ? i : 0]->Read(bitStream);
105
+ prob = exp(prob);
106
+ probs.push_back(prob);
107
+ }
108
+
109
+ return probs;
110
+ } else {
111
+ // return empty vector;
112
+ }
113
+
114
+ return probs;
115
+ }
116
+
117
+ ////////////////////////////////////////////////////////////////////////////////////
118
+
119
+ int main(int argc, char** argv)
120
+ {
121
+ string ptPath(argv[1]);
122
+ string roPath(argv[2]);
123
+
124
+ // lex reordering model
125
+ m_factorsF.push_back(0);
126
+ m_factorsE.push_back(0);
127
+
128
+ Load(roPath);
129
+
130
+ // phrase table
131
+ InputFileStream ptStrm(ptPath);
132
+
133
+ string line;
134
+ while (getline(ptStrm, line)) {
135
+ //cerr << line << endl;
136
+ std::vector<std::string> columns(7);
137
+ std::vector<std::string> toks = TokenizeMultiCharSeparator(line, "|||");
138
+ assert(toks.size() >= 2);
139
+
140
+ for (size_t i = 0; i < toks.size(); ++i) {
141
+ columns[i] = Trim(toks[i]);
142
+ }
143
+
144
+ std::vector<float> scores = GetScore(columns[0], columns[1], "");
145
+ // key-value pairs
146
+ if (scores.size()) {
147
+ if (!columns[6].empty()) {
148
+ columns[6] += " ";
149
+ }
150
+ columns[6] += "{{LexRO ";
151
+ for (size_t i = 0; i < scores.size() - 1; ++i) {
152
+ columns[6] += Moses::SPrint(scores[i]);
153
+ columns[6] += " ";
154
+ }
155
+ columns[6] += Moses::SPrint(scores[scores.size() - 1]);
156
+ columns[6] += "}}";
157
+ }
158
+
159
+ // output
160
+ for (size_t i = 0; i < columns.size() - 1; ++i) {
161
+ cout << columns[i] << " ||| ";
162
+ }
163
+ cout << columns[columns.size() - 1] << endl;
164
+ }
165
+
166
+ }
167
+
168
+
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/1-1-Extraction ADDED
Binary file (211 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/1-1-Extraction.o ADDED
Binary file (63.1 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/GenerateSequences.o ADDED
Binary file (94 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/TMining ADDED
Binary file (224 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/TransliterationMining.o ADDED
Binary file (81.7 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/addLexROtoPT ADDED
Binary file (874 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/addLexROtoPT.o ADDED
Binary file (196 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/generateSequences ADDED
Binary file (227 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/merge-sorted ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d45e266be66e1d188b9f8d52fe11a560c40523b4cb9dad93b63738b993b657f1
3
+ size 1365800
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/merge-sorted.o ADDED
Binary file (83.3 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTable ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c8f0f1f0cc0bbf3f2ce6f075b576b508b20537ab7540fe9a640586dbe560faf
3
+ size 9784056
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTable.o ADDED
Binary file (21.3 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTableMin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c613ee443bc70ea80a57e9643b73c1e8a854c86b60f8c2886061014691a38a7
3
+ size 1106832
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processLexicalTableMin.o ADDED
Binary file (123 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processPhraseTableMin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97f6cd2ec2613ff92ad2bc49c3a268947523e0bc37f3c1c5b9b0437ba49f222f
3
+ size 1048688
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/processPhraseTableMin.o ADDED
Binary file (127 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/pruneGeneration ADDED
Binary file (529 kB). View file
 
mosesdecoder/misc/bin/gcc-9/release/link-static/threading-multi/pruneGeneration.o ADDED
Binary file (54.1 kB). View file