line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::Ogmios::Config; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
16
|
|
|
16
|
|
71
|
use strict; |
|
16
|
|
|
|
|
27
|
|
|
16
|
|
|
|
|
346
|
|
5
|
16
|
|
|
16
|
|
66
|
use warnings; |
|
16
|
|
|
|
|
27
|
|
|
16
|
|
|
|
|
329
|
|
6
|
|
|
|
|
|
|
|
7
|
16
|
|
|
16
|
|
16960
|
use Config::General; |
|
16
|
|
|
|
|
469302
|
|
|
16
|
|
|
|
|
843
|
|
8
|
16
|
|
|
16
|
|
11828
|
use Sys::Hostname; |
|
16
|
|
|
|
|
33959
|
|
|
16
|
|
|
|
|
842
|
|
9
|
|
|
|
|
|
|
|
10
|
16
|
|
|
16
|
|
9182
|
use Lingua::Ogmios::Config::NLPTools; |
|
16
|
|
|
|
|
55
|
|
|
16
|
|
|
|
|
501
|
|
11
|
|
|
|
|
|
|
|
12
|
16
|
|
|
16
|
|
144
|
use Data::Dumper; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
113564
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $debug_devel_level = 0; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
18
|
0
|
|
|
|
|
|
my ($rcfile) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
warn "New Configuration\n" unless $debug_devel_level < 1; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $config = { |
23
|
|
|
|
|
|
|
'OldVersion' => 0, |
24
|
|
|
|
|
|
|
'ConfigFile' => $rcfile, |
25
|
|
|
|
|
|
|
'ConfigData' => undef, |
26
|
|
|
|
|
|
|
'NLPToolIndex' => undef, |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
bless $config, $class; |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
|
|
|
|
if (defined $rcfile) { |
32
|
0
|
|
|
|
|
|
$config->setConfigData($rcfile); |
33
|
0
|
|
|
|
|
|
$config->_checkVersionFile; |
34
|
0
|
|
|
|
|
|
$config->setOgmiosTMPFILE; |
35
|
0
|
|
|
|
|
|
$config->setOgmiosLOGFILE; |
36
|
|
|
|
|
|
|
} |
37
|
0
|
|
|
|
|
|
$config->indexNLPtools; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
return $config; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub setConfigData { |
43
|
0
|
|
|
0
|
0
|
|
my ($self, $rcfile) = @_; |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
warn "Loading Configuration\n" unless $debug_devel_level < 1; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my $conf = new Config::General('-ConfigFile' => $rcfile, |
48
|
|
|
|
|
|
|
'-InterPolateVars' => 1, |
49
|
|
|
|
|
|
|
'-InterPolateEnv' => 1, |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my %config = $conf->getall; |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
$self->{'ConfigData'} = \%config; |
55
|
0
|
|
|
|
|
|
$self->correctProcessingSet; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub _checkVersionFile { |
59
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
60
|
|
|
|
|
|
|
|
61
|
0
|
0
|
|
|
|
|
if (exists $self->getConfigData->{'ALVISTMP'}) { |
62
|
0
|
|
|
|
|
|
$self->_setOldVersion; |
63
|
0
|
|
|
|
|
|
warn "==> Old fashionned platform config file ;-) Trying to convert into modern one\n"; |
64
|
0
|
|
|
|
|
|
$self->_ConvertConfigFile; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub getConfigData { |
70
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return($self->{'ConfigData'}); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub setConfigFile { |
76
|
0
|
|
|
0
|
0
|
|
my ($self, $rcfile) = @_; |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
$self->{'ConfigFile'} = $rcfile; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub getConfigFile { |
82
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
return($self->{'ConfigFile'}); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub _unsetOldVersion { |
88
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
$self->{OldVersion} = 0; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub _setOldVersion { |
94
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
95
|
|
|
|
|
|
|
|
96
|
0
|
|
|
|
|
|
$self->{OldVersion} = 1; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub _getOldVersion { |
100
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
101
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
return($self->{OldVersion}); |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
sub _ConvertConfigFile { |
106
|
0
|
|
|
0
|
|
|
my ($self, $option) = @_; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
# ALVISTMP -> OGMIOSTMP |
109
|
0
|
|
|
|
|
|
$self->setOgmiosTMPDIR($self->getConfigData->{'ALVISTMP'}); |
110
|
0
|
0
|
0
|
|
|
|
if ((defined $option) && ($option eq "remove")) { |
111
|
0
|
|
|
|
|
|
delete $self->getConfigData->{'ALVISTMP'}; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
# PLATFORM_ROOT -> OGMIOSROOT ? |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
sub setOgmiosTMPFILE { |
117
|
0
|
|
|
0
|
0
|
|
my ($self, $tmpdir) = @_; |
118
|
|
|
|
|
|
|
|
119
|
0
|
|
|
|
|
|
$self->getConfigData->{'OGMIOSTMPFILE'} = $self->getOgmiosTMPDIR . "/ogmios." . hostname . ".$$"; |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub getOgmiosTMPFILE { |
124
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
125
|
|
|
|
|
|
|
|
126
|
0
|
|
|
|
|
|
return($self->getConfigData->{'OGMIOSTMPFILE'}); |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
sub setOgmiosLOGFILE { |
130
|
0
|
|
|
0
|
0
|
|
my ($self, $logdir) = @_; |
131
|
|
|
|
|
|
|
|
132
|
0
|
|
|
|
|
|
$self->getConfigData->{'OGMIOSLOGFILE'} = $self->getOgmiosTMPDIR . "/ogmios." . hostname . ".$$.log"; |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
sub getOgmiosLOGFILE { |
137
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
138
|
|
|
|
|
|
|
|
139
|
0
|
|
|
|
|
|
return($self->getConfigData->{'OGMIOSLOGFILE'}); |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
sub setOgmiosTMPDIR { |
143
|
0
|
|
|
0
|
0
|
|
my ($self, $tmpdir) = @_; |
144
|
|
|
|
|
|
|
|
145
|
0
|
|
|
|
|
|
$self->getConfigData->{'OGMIOSTMP'} = $tmpdir; |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub OgmiosOutStream { |
150
|
0
|
|
|
0
|
0
|
|
my ($self, $out_stream) = @_; |
151
|
|
|
|
|
|
|
|
152
|
0
|
0
|
|
|
|
|
if (defined $out_stream) { |
153
|
0
|
|
|
|
|
|
$self->getConfigData->{'OUT_STREAM'} = $out_stream; |
154
|
|
|
|
|
|
|
} else { |
155
|
0
|
|
|
|
|
|
$self->getConfigData->{'OUT_STREAM'} = \*STDERR |
156
|
|
|
|
|
|
|
} |
157
|
0
|
|
|
|
|
|
return(eval($self->getConfigData->{'OUT_STREAM'})); |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
sub getOgmiosTMPDIR { |
162
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
163
|
|
|
|
|
|
|
|
164
|
0
|
|
|
|
|
|
return($self->getConfigData->{'OGMIOSTMP'}); |
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
sub setOgmiosROOTDIR { |
169
|
0
|
|
|
0
|
0
|
|
my ($self, $rootdir) = @_; |
170
|
|
|
|
|
|
|
|
171
|
0
|
|
|
|
|
|
$self->getConfigData->{'PLATFORM_ROOT'} = $rootdir; |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
sub getOgmiosROOTDIR { |
175
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
176
|
|
|
|
|
|
|
|
177
|
0
|
|
|
|
|
|
return($self->getConfigData->{'PLATFORM_ROOT'}); |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub setOgmiosDefaultLanguage { |
182
|
0
|
|
|
0
|
0
|
|
my ($self, $defaultLanguage) = @_; |
183
|
|
|
|
|
|
|
|
184
|
0
|
|
|
|
|
|
$self->getConfigData->{'DEFAULT_LANGUAGE'} = uc($defaultLanguage); |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
sub getOgmiosDefaultLanguage { |
188
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
189
|
|
|
|
|
|
|
|
190
|
0
|
0
|
|
|
|
|
if (!defined($self->getConfigData->{'DEFAULT_LANGUAGE'})) { |
191
|
0
|
|
|
|
|
|
$self->setOgmiosDefaultLanguage('EN'); |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
0
|
|
|
|
|
|
return(uc($self->getConfigData->{'DEFAULT_LANGUAGE'})); |
195
|
|
|
|
|
|
|
} |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
sub setOgmiosNLPTOOLSROOT { |
200
|
0
|
|
|
0
|
0
|
|
my ($self, $nlptoolsdir) = @_; |
201
|
|
|
|
|
|
|
|
202
|
0
|
|
|
|
|
|
$self->getConfigData->{'NLP_tools_root'} = $nlptoolsdir; |
203
|
|
|
|
|
|
|
} |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
sub getOgmiosNLPTOOLSROOT { |
206
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
207
|
|
|
|
|
|
|
|
208
|
0
|
|
|
|
|
|
return($self->getConfigData->{'NLP_tools_root'}); |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
sub setNLPConnection { |
212
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
213
|
|
|
|
|
|
|
|
214
|
0
|
|
|
|
|
|
my %tmp; |
215
|
|
|
|
|
|
|
|
216
|
0
|
|
|
|
|
|
$self->getConfigData->{'NLP_connection'} = \%tmp; |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
sub getNLPConnection { |
220
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
221
|
|
|
|
|
|
|
|
222
|
0
|
|
|
|
|
|
return($self->getConfigData->{'NLP_connection'}); |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
sub setServerHost { |
226
|
0
|
|
|
0
|
0
|
|
my ($self, $host) = @_; |
227
|
|
|
|
|
|
|
|
228
|
0
|
|
|
|
|
|
$self->getNLPConnection->{'SERVER'} = $host; |
229
|
|
|
|
|
|
|
} |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
sub getServerHost { |
233
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
234
|
|
|
|
|
|
|
|
235
|
0
|
|
|
|
|
|
return($self->getNLPConnection->{'SERVER'}); |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
sub setServerPort { |
240
|
0
|
|
|
0
|
0
|
|
my ($self, $port) = @_; |
241
|
|
|
|
|
|
|
|
242
|
0
|
|
|
|
|
|
$self->getNLPConnection->{'PORT'} = $port; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
sub getServerPort { |
247
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
248
|
|
|
|
|
|
|
|
249
|
0
|
|
|
|
|
|
return($self->getNLPConnection->{'PORT'}); |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
sub setRetryConnection { |
253
|
0
|
|
|
0
|
0
|
|
my ($self, $retry) = @_; |
254
|
|
|
|
|
|
|
|
255
|
0
|
|
|
|
|
|
$self->getNLPConnection->{'RETRY_CONNECTION'} = $retry; |
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
sub getRetryConnection { |
259
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
260
|
|
|
|
|
|
|
|
261
|
0
|
|
|
|
|
|
return($self->getNLPConnection->{'RETRY_CONNECTION'}); |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
sub getXMLINPUT { |
265
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
266
|
|
|
|
|
|
|
|
267
|
0
|
|
|
|
|
|
return($self->getConfigData->{'XML_INPUT'}); |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
sub setXMLINPUT { |
271
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
272
|
|
|
|
|
|
|
|
273
|
0
|
|
|
|
|
|
my %tmp; |
274
|
|
|
|
|
|
|
|
275
|
0
|
|
|
|
|
|
$self->getConfigData->{'XML_INPUT'} = \%tmp; |
276
|
|
|
|
|
|
|
} |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
sub InputFileFormat { |
279
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
280
|
|
|
|
|
|
|
|
281
|
0
|
0
|
|
|
|
|
$self->getXMLINPUT->{'FILEFORMAT'} = shift if @_; |
282
|
0
|
|
|
|
|
|
return($self->getXMLINPUT->{'FILEFORMAT'}); |
283
|
|
|
|
|
|
|
} |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
sub isInputInALVISFormat { |
286
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
287
|
|
|
|
|
|
|
|
288
|
0
|
|
|
|
|
|
return(uc($self->InputFileFormat) eq "ALVIS"); |
289
|
|
|
|
|
|
|
} |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
sub preserveWhiteSpace { |
292
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
293
|
|
|
|
|
|
|
|
294
|
0
|
0
|
|
|
|
|
$self->getXMLINPUT->{PRESERVEWHITESPACE} = shift if @_; |
295
|
0
|
|
|
|
|
|
return $self->getXMLINPUT->{PRESERVEWHITESPACE}; |
296
|
|
|
|
|
|
|
} |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
sub linguisticAnnotationLoading { |
299
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
300
|
|
|
|
|
|
|
|
301
|
0
|
0
|
|
|
|
|
$self->getXMLINPUT->{LINGUISTIC_ANNOTATION_LOADING} = shift if @_; |
302
|
0
|
|
|
|
|
|
return $self->getXMLINPUT->{LINGUISTIC_ANNOTATION_LOADING}; |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
sub _printXMLINPUTVariables { |
306
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
307
|
|
|
|
|
|
|
|
308
|
0
|
|
|
|
|
|
my $var; |
309
|
|
|
|
|
|
|
|
310
|
0
|
0
|
|
|
|
|
if (defined $self->getXMLINPUT) { |
311
|
|
|
|
|
|
|
|
312
|
0
|
|
|
|
|
|
my %xmlinput_vars = ("PRESERVEWHITESPACE" => ["Preserve White Space", $self->preserveWhiteSpace], |
313
|
|
|
|
|
|
|
"LINGUISTIC_ANNOTATION_LOADING" => ["Loading previous linguistic annotation?", $self->linguisticAnnotationLoading], |
314
|
|
|
|
|
|
|
); |
315
|
|
|
|
|
|
|
|
316
|
0
|
|
|
|
|
|
$self->printVar(" Section XML input behaviour", \%xmlinput_vars); |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
} |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
} |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
sub getXMLOUTPUT { |
323
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
324
|
|
|
|
|
|
|
|
325
|
0
|
|
|
|
|
|
return($self->getConfigData->{'XML_OUTPUT'}); |
326
|
|
|
|
|
|
|
} |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
sub setXMLOUTPUT { |
329
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
330
|
|
|
|
|
|
|
|
331
|
0
|
|
|
|
|
|
my %tmp; |
332
|
|
|
|
|
|
|
|
333
|
0
|
|
|
|
|
|
$self->getConfigData->{'XML_OUTPUT'} = \%tmp; |
334
|
|
|
|
|
|
|
} |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
sub xmloutput_form { |
338
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
339
|
|
|
|
|
|
|
|
340
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{FORM} = shift if @_; |
341
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{FORM}; |
342
|
|
|
|
|
|
|
} |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
sub xmloutput_id { |
345
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
346
|
|
|
|
|
|
|
|
347
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{ID} = shift if @_; |
348
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{ID}; |
349
|
|
|
|
|
|
|
} |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
sub xmloutput_tokenLevel { |
352
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
353
|
|
|
|
|
|
|
|
354
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{TOKEN_LEVEL} = shift if @_; |
355
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{TOKEN_LEVEL}; |
356
|
|
|
|
|
|
|
} |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
sub xmloutput_semanticUnitNamedEntityLevel { |
359
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
360
|
|
|
|
|
|
|
|
361
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{SEMANTIC_UNIT_NAMED_ENTITY_LEVEL} = shift if @_; |
362
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{SEMANTIC_UNIT_NAMED_ENTITY_LEVEL}; |
363
|
|
|
|
|
|
|
} |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
sub xmloutput_wordLevel { |
367
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
368
|
|
|
|
|
|
|
|
369
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{WORD_LEVEL} = shift if @_; |
370
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{WORD_LEVEL}; |
371
|
|
|
|
|
|
|
} |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
sub xmloutput_sentenceLevel { |
375
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
376
|
|
|
|
|
|
|
|
377
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{SENTENCE_LEVEL} = shift if @_; |
378
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{SENTENCE_LEVEL}; |
379
|
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
sub xmloutput_morphosyntacticFeatureLevel { |
383
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
384
|
|
|
|
|
|
|
|
385
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{MORPHOSYNTACTIC_FEATURE_LEVEL} = shift if @_; |
386
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{MORPHOSYNTACTIC_FEATURE_LEVEL}; |
387
|
|
|
|
|
|
|
} |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
sub xmloutput_lemmaLevel { |
391
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
392
|
|
|
|
|
|
|
|
393
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{LEMMA_LEVEL} = shift if @_; |
394
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{LEMMA_LEVEL}; |
395
|
|
|
|
|
|
|
} |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
sub xmloutput_semanticUnitTermLevel { |
399
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
400
|
|
|
|
|
|
|
|
401
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{SEMANTIC_UNIT_TERM_LEVEL} = shift if @_; |
402
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{SEMANTIC_UNIT_TERM_LEVEL}; |
403
|
|
|
|
|
|
|
} |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
sub xmloutput_semanticUnitLevel { |
406
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
407
|
|
|
|
|
|
|
|
408
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{SEMANTIC_UNIT_LEVEL} = shift if @_; |
409
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{SEMANTIC_UNIT_LEVEL}; |
410
|
|
|
|
|
|
|
} |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
sub xmloutput_syntacticRelationLevel { |
413
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
414
|
|
|
|
|
|
|
|
415
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{SYNTACTIC_RELATION_LEVEL} = shift if @_; |
416
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{SYNTACTIC_RELATION_LEVEL}; |
417
|
|
|
|
|
|
|
} |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
sub xmloutput_sectionLevel { |
420
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
421
|
|
|
|
|
|
|
|
422
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{SECTION_LEVEL} = shift if @_; |
423
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{SECTION_LEVEL}; |
424
|
|
|
|
|
|
|
} |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
sub xmloutput_enumerationLevel { |
427
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
428
|
|
|
|
|
|
|
|
429
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{ENUMERATION_LEVEL} = shift if @_; |
430
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{ENUMERATION_LEVEL}; |
431
|
|
|
|
|
|
|
} |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
sub xmloutput_noStdXmlOutput { |
434
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
435
|
|
|
|
|
|
|
|
436
|
0
|
0
|
|
|
|
|
$self->getXMLOUTPUT->{NO_STD_XML_OUTPUT} = shift if @_; |
437
|
0
|
|
|
|
|
|
return $self->getXMLOUTPUT->{NO_STD_XML_OUTPUT}; |
438
|
|
|
|
|
|
|
} |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
# sub xmloutput_delete_noStdXmlOutput { |
441
|
|
|
|
|
|
|
# my $self = shift; |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
# if (defined $self->getXMLOUTPUT->{NO_STD_XML_OUTPUT}) { |
444
|
|
|
|
|
|
|
# delete $self->getXMLOUTPUT->{NO_STD_XML_OUTPUT}; |
445
|
|
|
|
|
|
|
# } |
446
|
|
|
|
|
|
|
# } |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
sub _printXMLOUTPUTVariables { |
450
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
451
|
|
|
|
|
|
|
|
452
|
0
|
|
|
|
|
|
my $var; |
453
|
|
|
|
|
|
|
|
454
|
0
|
0
|
|
|
|
|
if (defined $self->getXMLOUTPUT) { |
455
|
|
|
|
|
|
|
|
456
|
0
|
|
|
|
|
|
my %xmloutput_vars = ("FORM" => ["print FORM", $self->xmloutput_form], |
457
|
|
|
|
|
|
|
"ID" => ["print ID?", $self->xmloutput_id], |
458
|
|
|
|
|
|
|
"TOKEN_LEVEL" => ["print Token Level?", $self->xmloutput_tokenLevel], |
459
|
|
|
|
|
|
|
"SEMANTIC_UNIT_NAMED_ENTITY_LEVEL" => ["print Named Entities (semantic unit level)?", $self->xmloutput_semanticUnitNamedEntityLevel], |
460
|
|
|
|
|
|
|
"WORD_LEVEL" => ["print Word Level?", $self->xmloutput_wordLevel], |
461
|
|
|
|
|
|
|
"SENTENCE_LEVEL" => ["print Sentence Level?", $self->xmloutput_sentenceLevel], |
462
|
|
|
|
|
|
|
"MORPHOSYNTACTIC_FEATURE_LEVEL" => ["print Morphosyntactic Feature Level?", $self->xmloutput_morphosyntacticFeatureLevel], |
463
|
|
|
|
|
|
|
"LEMMA_LEVEL" => ["print Lemma Level?", $self->xmloutput_lemmaLevel], |
464
|
|
|
|
|
|
|
"SEMANTIC_UNIT_TERM_LEVEL" => ["print Semantic Unit Term Level?", $self->xmloutput_semanticUnitTermLevel], |
465
|
|
|
|
|
|
|
"SEMANTIC_UNIT_LEVEL" => ["print Semantic Unit Level?", $self->xmloutput_semanticUnitLevel], |
466
|
|
|
|
|
|
|
"SYNTACTIC_RELATION_LEVEL" => ["print Syntactic Relation Level?", $self->xmloutput_syntacticRelationLevel], |
467
|
|
|
|
|
|
|
"NO_STD_XML_OUTPUT" => ["No Standard XML output?", $self->xmloutput_noStdXmlOutput], |
468
|
|
|
|
|
|
|
); |
469
|
|
|
|
|
|
|
|
470
|
0
|
|
|
|
|
|
$self->printVar(" Section XML output behaviour", \%xmloutput_vars); |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
} |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
} |
476
|
|
|
|
|
|
|
|
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
sub getNLPMisc { |
479
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
480
|
|
|
|
|
|
|
|
481
|
0
|
|
|
|
|
|
return($self->getConfigData->{'NLP_misc'}); |
482
|
|
|
|
|
|
|
} |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
sub setNLMisc { |
485
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
486
|
|
|
|
|
|
|
|
487
|
0
|
|
|
|
|
|
my %tmp; |
488
|
|
|
|
|
|
|
|
489
|
0
|
|
|
|
|
|
$self->getConfigData->{'NLP_misc'} = \%tmp; |
490
|
|
|
|
|
|
|
} |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
sub _printNLPMisc { |
494
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
495
|
|
|
|
|
|
|
|
496
|
0
|
|
|
|
|
|
my $var; |
497
|
|
|
|
|
|
|
|
498
|
0
|
0
|
|
|
|
|
if (defined $self->getNLPMisc) { |
499
|
0
|
|
|
|
|
|
my %nlpmisc_vars = (); |
500
|
|
|
|
|
|
|
|
501
|
0
|
|
|
|
|
|
$self->printVar(" Section NLP miscellaneous variables", \%nlpmisc_vars); |
502
|
|
|
|
|
|
|
} |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
} |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
sub getNLPTools { |
507
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
508
|
|
|
|
|
|
|
|
509
|
0
|
|
|
|
|
|
return($self->getConfigData->{'NLP_tools'}->{'TOOL'}); |
510
|
|
|
|
|
|
|
} |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
sub setNLTools { |
513
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
514
|
|
|
|
|
|
|
|
515
|
0
|
|
|
|
|
|
my %tmp; |
516
|
|
|
|
|
|
|
|
517
|
0
|
|
|
|
|
|
$self->getConfigData->{'NLP_tools'} = \%tmp; |
518
|
|
|
|
|
|
|
} |
519
|
|
|
|
|
|
|
|
520
|
|
|
|
|
|
|
# sub NLPtool { |
521
|
|
|
|
|
|
|
# my $self = shift; |
522
|
|
|
|
|
|
|
|
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
# # $self->getNLPTools->{t} = shift if @_; |
525
|
|
|
|
|
|
|
# # return $self->getXMLOUTPUT->{NO_STD_XML_OUTPUT}; |
526
|
|
|
|
|
|
|
|
527
|
|
|
|
|
|
|
# } |
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
sub getNLPToolFromIndex { |
530
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
531
|
0
|
|
|
|
|
|
my $entry = shift; |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
|
534
|
0
|
|
|
|
|
|
return($self->getNLPToolIndex->{$entry}); |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
} |
537
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
sub getNLPToolIndex { |
539
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
540
|
|
|
|
|
|
|
|
541
|
0
|
|
|
|
|
|
return($self->{'NLPToolIndex'}); |
542
|
|
|
|
|
|
|
} |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
sub setNLPToolIndex { |
545
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
546
|
|
|
|
|
|
|
|
547
|
0
|
|
|
|
|
|
my %tmp; |
548
|
0
|
|
|
|
|
|
$self->{'NLPToolIndex'} = \%tmp; |
549
|
|
|
|
|
|
|
} |
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
sub indexNLPtools { |
553
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
554
|
|
|
|
|
|
|
|
555
|
0
|
|
|
|
|
|
my $tool; |
556
|
|
|
|
|
|
|
my $tools; |
557
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
# print STDERR Dumper $self->getNLPTools; |
559
|
0
|
0
|
|
|
|
|
if ($tools = $self->getNLPTools) { |
560
|
0
|
|
|
|
|
|
foreach $tool (@$tools) { |
561
|
|
|
|
|
|
|
# warn "Added " . $self->addNLPTool($tool) . " to the index\n"; |
562
|
0
|
|
|
|
|
|
$self->addNLPTool($tool); |
563
|
|
|
|
|
|
|
} |
564
|
|
|
|
|
|
|
} |
565
|
|
|
|
|
|
|
} |
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
sub addNLPtool2index { |
568
|
0
|
|
|
0
|
0
|
|
my ($self, $tool_config) = @_; |
569
|
|
|
|
|
|
|
|
570
|
|
|
|
|
|
|
# warn "tool : $tool_config\n"; |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
# warn "Add " . $tool_config->name . " to the index\n"; |
573
|
0
|
0
|
|
|
|
|
if (!defined $self->getNLPToolIndex) { |
574
|
0
|
|
|
|
|
|
$self->setNLPToolIndex; |
575
|
|
|
|
|
|
|
} |
576
|
0
|
|
|
|
|
|
$self->getNLPToolIndex->{$tool_config->name} = $tool_config; |
577
|
|
|
|
|
|
|
} |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
sub addNLPTool { |
580
|
0
|
|
|
0
|
0
|
|
my ($self, $data_config) = @_; |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
# warn "new tool: $data_config\n"; |
583
|
0
|
|
|
|
|
|
my $tool_config = Lingua::Ogmios::Config::NLPTools->new($data_config); |
584
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
|
586
|
0
|
|
|
|
|
|
$self->addNLPtool2index($tool_config); |
587
|
0
|
|
|
|
|
|
return($tool_config->name); |
588
|
|
|
|
|
|
|
} |
589
|
|
|
|
|
|
|
|
590
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
sub _printNLPTools { |
592
|
0
|
|
|
0
|
|
|
my ($self, $lang) = @_; |
593
|
|
|
|
|
|
|
|
594
|
0
|
|
|
|
|
|
my $var; |
595
|
|
|
|
|
|
|
my $tool; |
596
|
|
|
|
|
|
|
|
597
|
0
|
0
|
|
|
|
|
if (defined $self->getNLPToolIndex) { |
598
|
0
|
|
|
|
|
|
my %nlptools_vars = (); |
599
|
|
|
|
|
|
|
|
600
|
0
|
|
|
|
|
|
warn " Section NLP tools definition\n"; |
601
|
|
|
|
|
|
|
|
602
|
0
|
|
|
|
|
|
foreach $tool (keys %{$self->getNLPToolIndex}) { |
|
0
|
|
|
|
|
|
|
603
|
0
|
|
|
|
|
|
$self->getNLPToolIndex->{$tool}->print($lang); |
604
|
|
|
|
|
|
|
} |
605
|
|
|
|
|
|
|
} |
606
|
|
|
|
|
|
|
} |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
sub _printNLPToolsDOT { |
609
|
0
|
|
|
0
|
|
|
my ($self, $lang) = @_; |
610
|
|
|
|
|
|
|
|
611
|
0
|
|
|
|
|
|
my $var; |
612
|
|
|
|
|
|
|
my $tool; |
613
|
|
|
|
|
|
|
|
614
|
0
|
0
|
|
|
|
|
if (defined $self->getNLPToolIndex) { |
615
|
0
|
|
|
|
|
|
my %nlptools_vars = (); |
616
|
|
|
|
|
|
|
|
617
|
0
|
|
|
|
|
|
warn " Section NLP tools definition\n"; |
618
|
|
|
|
|
|
|
|
619
|
0
|
|
|
|
|
|
foreach $tool (keys %{$self->getNLPToolIndex}) { |
|
0
|
|
|
|
|
|
|
620
|
|
|
|
|
|
|
# warn "lang(0): $lang\n"; |
621
|
0
|
|
|
|
|
|
$self->getNLPToolIndex->{$tool}->printDOT($lang); |
622
|
|
|
|
|
|
|
} |
623
|
|
|
|
|
|
|
} |
624
|
|
|
|
|
|
|
} |
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
|
628
|
|
|
|
|
|
|
sub setConverters { |
629
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
630
|
|
|
|
|
|
|
|
631
|
0
|
|
|
|
|
|
my %tmp; |
632
|
|
|
|
|
|
|
|
633
|
0
|
|
|
|
|
|
$self->getConfigData->{'CONVERTERS'} = \%tmp; |
634
|
|
|
|
|
|
|
} |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
sub getConverters { |
637
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
638
|
|
|
|
|
|
|
|
639
|
0
|
|
|
|
|
|
return($self->getConfigData->{'CONVERTERS'}); |
640
|
|
|
|
|
|
|
} |
641
|
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
sub getSupplementaryMagicFile { |
643
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
644
|
|
|
|
|
|
|
|
645
|
0
|
|
|
|
|
|
return($self->getConverters->{'SupplMagicFile'}); |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
} |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
sub setSupplementaryMagicFile { |
650
|
0
|
|
|
0
|
0
|
|
my ($self, $filename) = @_; |
651
|
|
|
|
|
|
|
|
652
|
0
|
|
|
|
|
|
$self->getConverters->{'SupplMagicFile'} = $filename |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
} |
655
|
|
|
|
|
|
|
|
656
|
|
|
|
|
|
|
sub _printConverters { |
657
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
658
|
|
|
|
|
|
|
|
659
|
0
|
|
|
|
|
|
my $var; |
660
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
|
662
|
0
|
0
|
|
|
|
|
if (defined $self->getConverters) { |
663
|
|
|
|
|
|
|
|
664
|
0
|
|
|
|
|
|
my %converter_vars = ("SupplMagicFile" => ["File for Additional Definition of Magic Number", $self->getSupplementaryMagicFile], |
665
|
|
|
|
|
|
|
); |
666
|
|
|
|
|
|
|
|
667
|
0
|
|
|
|
|
|
$self->printVar(" Section INPUT CONVERTERS", \%converter_vars); |
668
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
} |
670
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
# foreach $var (keys %Converter_vars) { |
672
|
|
|
|
|
|
|
# if (defined $config->{"CONVERTERS"}->{$var}) { |
673
|
|
|
|
|
|
|
# print STDERR "\t" . $Converter_vars{$var} . " : " . $config->{"CONVERTERS"}->{$var} . "\n"; |
674
|
|
|
|
|
|
|
# } |
675
|
|
|
|
|
|
|
# } |
676
|
|
|
|
|
|
|
# print STDERR "\tRecognized formats:\n"; |
677
|
|
|
|
|
|
|
# $Converter_vars{"STYLESHEET"} = 1; |
678
|
|
|
|
|
|
|
# my $format; |
679
|
|
|
|
|
|
|
# foreach $format (keys %{$config->{"CONVERTERS"}}) { |
680
|
|
|
|
|
|
|
# if (!exists($Converter_vars{$format})) { |
681
|
|
|
|
|
|
|
# print STDERR "\t\t$format\n"; |
682
|
|
|
|
|
|
|
# } |
683
|
|
|
|
|
|
|
# } |
684
|
|
|
|
|
|
|
|
685
|
|
|
|
|
|
|
} |
686
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
sub _printNLPConnectionVariables { |
688
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
689
|
|
|
|
|
|
|
|
690
|
0
|
|
|
|
|
|
my $var; |
691
|
|
|
|
|
|
|
|
692
|
0
|
0
|
|
|
|
|
if (defined $self->getNLPConnection) { |
693
|
|
|
|
|
|
|
|
694
|
0
|
|
|
|
|
|
my %nlp_connection_vars = ("SERVER" => ["NLP Server host", $self->getServerHost], |
695
|
|
|
|
|
|
|
"PORT" => ["NLP Server port", $self->getServerPort], |
696
|
|
|
|
|
|
|
"RETRY_CONNECTION" => ["Number of time for retrying the connection", $self->getRetryConnection], |
697
|
|
|
|
|
|
|
); |
698
|
|
|
|
|
|
|
|
699
|
0
|
|
|
|
|
|
$self->printVar(" Section Definition of the NLP connection", \%nlp_connection_vars); |
700
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
} |
702
|
|
|
|
|
|
|
} |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
sub _printGeneralVariables { |
705
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
706
|
|
|
|
|
|
|
|
707
|
0
|
|
|
|
|
|
my $var; |
708
|
|
|
|
|
|
|
|
709
|
0
|
|
|
|
|
|
my %general_vars = ( "OGMIOSTMP" => ["Temporary directory", $self->getOgmiosTMPDIR], |
710
|
|
|
|
|
|
|
"PLATFORM_ROOT" => ["Platform Root Directory", $self->getOgmiosROOTDIR], |
711
|
|
|
|
|
|
|
"NLP_tools_root" => ["Root directory of the NLP tools", $self->getOgmiosNLPTOOLSROOT], |
712
|
|
|
|
|
|
|
); |
713
|
|
|
|
|
|
|
|
714
|
0
|
|
|
|
|
|
$self->printVar(" General variables", \%general_vars); |
715
|
|
|
|
|
|
|
} |
716
|
|
|
|
|
|
|
|
717
|
|
|
|
|
|
|
sub printVar { |
718
|
0
|
|
|
0
|
0
|
|
my ($self, $title, $general_vars) = @_; |
719
|
0
|
|
|
|
|
|
my $var; |
720
|
|
|
|
|
|
|
|
721
|
0
|
|
|
|
|
|
warn "\n$title\n"; |
722
|
|
|
|
|
|
|
|
723
|
0
|
|
|
|
|
|
my @tmp; |
724
|
|
|
|
|
|
|
|
725
|
0
|
0
|
|
|
|
|
if (ref $general_vars eq 'HASH') { |
726
|
0
|
|
|
|
|
|
@tmp = keys %$general_vars; |
727
|
|
|
|
|
|
|
} else { |
728
|
0
|
|
|
|
|
|
@tmp = @$general_vars; |
729
|
|
|
|
|
|
|
} |
730
|
|
|
|
|
|
|
|
731
|
0
|
|
|
|
|
|
foreach $var (@tmp) { |
732
|
0
|
0
|
|
|
|
|
if (defined $general_vars->{$var}) { |
733
|
0
|
|
|
|
|
|
warn "\t". $general_vars->{$var}[0] . " ($var) : " . $general_vars->{$var}[1] . "\n"; |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
} |
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
} |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
sub getLinguisticAnnotation { |
740
|
|
|
|
|
|
|
|
741
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
742
|
|
|
|
|
|
|
|
743
|
0
|
|
|
|
|
|
return($self->getConfigData->{"linguistic_annotation"}); |
744
|
|
|
|
|
|
|
} |
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
|
747
|
|
|
|
|
|
|
sub setLinguisticAnnotation { |
748
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
749
|
|
|
|
|
|
|
|
750
|
0
|
|
|
|
|
|
my %tmp; |
751
|
|
|
|
|
|
|
|
752
|
0
|
|
|
|
|
|
$self->getConfigData->{"linguistic_annotation"} = \%tmp; |
753
|
|
|
|
|
|
|
} |
754
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
sub setProcessing { |
756
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
757
|
|
|
|
|
|
|
|
758
|
0
|
|
|
|
|
|
my %tmp; |
759
|
|
|
|
|
|
|
|
760
|
0
|
0
|
|
|
|
|
unless ( @_) { |
761
|
0
|
|
|
|
|
|
%tmp = ('id' => undef, |
762
|
|
|
|
|
|
|
'order' => -1, |
763
|
|
|
|
|
|
|
'tool' => undef, |
764
|
|
|
|
|
|
|
'comments' => undef |
765
|
|
|
|
|
|
|
); |
766
|
|
|
|
|
|
|
} else { |
767
|
0
|
|
|
|
|
|
tmp{'id'} = $_[0]->{'id'}; |
|
0
|
|
|
|
|
|
|
768
|
0
|
|
|
|
|
|
tmp{'order'} = $_[0]->{'order'}; |
|
0
|
|
|
|
|
|
|
769
|
0
|
|
|
|
|
|
tmp{'tool'} = $_[0]->{'tool'}; |
|
0
|
|
|
|
|
|
|
770
|
0
|
|
|
|
|
|
tmp{'comments'} = $_[0]->{'comments'}; |
|
0
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
} |
772
|
|
|
|
|
|
|
|
773
|
0
|
|
|
|
|
|
push @{$self->getProcessingSet}, \%tmp; |
|
0
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
} |
775
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
sub correctProcessingSet { |
777
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
778
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
# warn $self->getLinguisticAnnotation->{'processing'} . "\n"; |
780
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
# warn ref($self->getLinguisticAnnotation->{'processing'}) . "\n"; |
782
|
|
|
|
|
|
|
|
783
|
0
|
0
|
|
|
|
|
if (ref($self->getLinguisticAnnotation->{'processing'}) eq "HASH") { |
784
|
0
|
|
|
|
|
|
my $tmp = $self->getLinguisticAnnotation->{'processing'}; |
785
|
0
|
|
|
|
|
|
$self->setProcessingSet; |
786
|
|
|
|
|
|
|
|
787
|
0
|
|
|
|
|
|
push @{$self->getProcessingSet}, $tmp; |
|
0
|
|
|
|
|
|
|
788
|
|
|
|
|
|
|
} else { |
789
|
0
|
0
|
|
|
|
|
if (ref($self->getLinguisticAnnotation->{'processing'}) ne "ARRAY") { |
790
|
0
|
|
|
|
|
|
$self->setProcessingSet; |
791
|
|
|
|
|
|
|
} |
792
|
|
|
|
|
|
|
} |
793
|
|
|
|
|
|
|
|
794
|
|
|
|
|
|
|
} |
795
|
|
|
|
|
|
|
|
796
|
|
|
|
|
|
|
sub getProcessingSet { |
797
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
798
|
|
|
|
|
|
|
|
799
|
|
|
|
|
|
|
|
800
|
0
|
|
|
|
|
|
return($self->getLinguisticAnnotation->{'processing'}); |
801
|
|
|
|
|
|
|
} |
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
sub getProcessingSetSize { |
804
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
805
|
|
|
|
|
|
|
|
806
|
|
|
|
|
|
|
|
807
|
0
|
|
|
|
|
|
return(scalar(@{$self->getLinguisticAnnotation->{'processing'}})); |
|
0
|
|
|
|
|
|
|
808
|
|
|
|
|
|
|
} |
809
|
|
|
|
|
|
|
|
810
|
|
|
|
|
|
|
sub setProcessingSet { |
811
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
812
|
|
|
|
|
|
|
|
813
|
0
|
|
|
|
|
|
my @tmp; |
814
|
0
|
|
|
|
|
|
$self->getLinguisticAnnotation->{'processing'} = \@tmp; |
815
|
|
|
|
|
|
|
} |
816
|
|
|
|
|
|
|
|
817
|
|
|
|
|
|
|
sub processingId { |
818
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
819
|
0
|
|
|
|
|
|
my $i = shift; |
820
|
|
|
|
|
|
|
|
821
|
0
|
0
|
|
|
|
|
if (ref($i) eq "HASH") { |
822
|
0
|
0
|
|
|
|
|
$i->{'id'} = shift if @_; |
823
|
0
|
|
|
|
|
|
return $i->{'id'}; |
824
|
|
|
|
|
|
|
|
825
|
|
|
|
|
|
|
} else { |
826
|
|
|
|
|
|
|
|
827
|
0
|
0
|
|
|
|
|
$self->getProcessingSet->[$i]->{'id'} = shift if @_; |
828
|
0
|
|
|
|
|
|
return $self->getProcessingSet->[$i]->{'id'}; |
829
|
|
|
|
|
|
|
} |
830
|
|
|
|
|
|
|
} |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
sub processingOrder { |
833
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
834
|
0
|
|
|
|
|
|
my $i = shift; |
835
|
|
|
|
|
|
|
|
836
|
0
|
0
|
|
|
|
|
if (ref($i) eq "HASH") { |
837
|
0
|
0
|
|
|
|
|
$i->{'order'} = shift if @_; |
838
|
0
|
|
|
|
|
|
return $i->{'order'}; |
839
|
|
|
|
|
|
|
} else { |
840
|
0
|
0
|
|
|
|
|
$self->getProcessingSet->[$i]->{'order'} = shift if @_; |
841
|
0
|
|
|
|
|
|
return $self->getProcessingSet->[$i]->{'order'}; |
842
|
|
|
|
|
|
|
} |
843
|
|
|
|
|
|
|
} |
844
|
|
|
|
|
|
|
|
845
|
|
|
|
|
|
|
sub processingComments { |
846
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
847
|
0
|
|
|
|
|
|
my $i = shift; |
848
|
|
|
|
|
|
|
|
849
|
0
|
0
|
|
|
|
|
if (ref($i) eq "HASH") { |
850
|
0
|
0
|
|
|
|
|
$i->{'comments'} = shift if @_; |
851
|
0
|
|
|
|
|
|
return $i->{'comments'}; |
852
|
|
|
|
|
|
|
} else { |
853
|
0
|
0
|
|
|
|
|
$self->getProcessingSet->[$i]->{'comments'} = shift if @_; |
854
|
0
|
|
|
|
|
|
return $self->getProcessingSet->[$i]->{'comments'}; |
855
|
|
|
|
|
|
|
} |
856
|
|
|
|
|
|
|
|
857
|
|
|
|
|
|
|
} |
858
|
|
|
|
|
|
|
|
859
|
|
|
|
|
|
|
sub processingTool { |
860
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
861
|
0
|
|
|
|
|
|
my $i = shift; |
862
|
|
|
|
|
|
|
|
863
|
0
|
0
|
|
|
|
|
if (ref($i) eq "HASH") { |
864
|
0
|
0
|
|
|
|
|
$i->{'tool'} = shift if @_; |
865
|
0
|
|
|
|
|
|
return $i->{'tool'}; |
866
|
|
|
|
|
|
|
} else { |
867
|
0
|
0
|
|
|
|
|
$self->getProcessingSet->[$i]->{'tool'} = shift if @_; |
868
|
0
|
|
|
|
|
|
return $self->getProcessingSet->[$i]->{'tool'}; |
869
|
|
|
|
|
|
|
} |
870
|
|
|
|
|
|
|
} |
871
|
|
|
|
|
|
|
|
872
|
|
|
|
|
|
|
sub getProcessing { |
873
|
0
|
|
|
0
|
0
|
|
my ($self, $id) = @_; |
874
|
|
|
|
|
|
|
|
875
|
0
|
|
|
|
|
|
my $i = 0; |
876
|
|
|
|
|
|
|
|
877
|
|
|
|
|
|
|
|
878
|
0
|
|
|
|
|
|
while($self->getProcessingId($i)) { |
879
|
0
|
|
|
|
|
|
$i++; |
880
|
|
|
|
|
|
|
} |
881
|
0
|
|
|
|
|
|
return($self->getLinguisticAnnotation->[$i]); |
882
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
} |
884
|
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
sub getOrderedProcessing { |
886
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
887
|
|
|
|
|
|
|
|
888
|
0
|
|
|
|
|
|
my $processing; |
889
|
|
|
|
|
|
|
my @OP; |
890
|
|
|
|
|
|
|
|
891
|
0
|
|
|
|
|
|
foreach $processing (sort {$self->processingOrder($a) <=> $self->processingOrder($b)} @{$self->getProcessingSet}) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
892
|
0
|
|
|
|
|
|
push @OP, $processing; |
893
|
|
|
|
|
|
|
} |
894
|
0
|
|
|
|
|
|
return(@OP); |
895
|
|
|
|
|
|
|
} |
896
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
sub getOrderedWrappers { |
898
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
899
|
|
|
|
|
|
|
|
900
|
0
|
|
|
|
|
|
my $processing; |
901
|
|
|
|
|
|
|
my @OrderedWrappers; |
902
|
|
|
|
|
|
|
|
903
|
0
|
|
|
|
|
|
foreach $processing (sort {$self->processingOrder($a) <=> $self->processingOrder($b)} @{$self->getProcessingSet}) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
904
|
0
|
|
|
|
|
|
push @OrderedWrappers, $self->getNLPToolFromIndex($self->processingTool($processing))->wrapper; |
905
|
|
|
|
|
|
|
|
906
|
|
|
|
|
|
|
|
907
|
|
|
|
|
|
|
} |
908
|
0
|
|
|
|
|
|
return(@OrderedWrappers); |
909
|
|
|
|
|
|
|
} |
910
|
|
|
|
|
|
|
|
911
|
|
|
|
|
|
|
sub _printLinguisticAnnotationFull { |
912
|
0
|
|
|
0
|
|
|
my ($self,$lang) = @_; |
913
|
|
|
|
|
|
|
|
914
|
0
|
|
|
|
|
|
my $processing; |
915
|
|
|
|
|
|
|
my $tool_config; |
916
|
|
|
|
|
|
|
|
917
|
0
|
|
|
|
|
|
warn " Section Configuration of the Linguistic processing\n"; |
918
|
|
|
|
|
|
|
|
919
|
0
|
|
|
|
|
|
foreach $processing ($self->getOrderedProcessing) { |
920
|
0
|
|
|
|
|
|
warn " Tool :\n"; |
921
|
0
|
|
|
|
|
|
warn " Id: " . $self->processingId($processing) . "\n"; |
922
|
0
|
|
|
|
|
|
warn " Order: " . $self->processingOrder($processing) . "\n"; |
923
|
0
|
|
|
|
|
|
warn " Tool: " . $self->processingTool($processing) . "\n"; |
924
|
0
|
|
|
|
|
|
$tool_config = $self->getNLPToolFromIndex($self->processingTool($processing)); |
925
|
0
|
|
|
|
|
|
$tool_config->print($lang); |
926
|
|
|
|
|
|
|
# warn " Comments: " . $self->processingComments($processing) . "\n\n"; |
927
|
|
|
|
|
|
|
} |
928
|
|
|
|
|
|
|
} |
929
|
|
|
|
|
|
|
|
930
|
|
|
|
|
|
|
sub _printLinguisticAnnotation { |
931
|
0
|
|
|
0
|
|
|
my ($self,$lang) = @_; |
932
|
|
|
|
|
|
|
|
933
|
0
|
|
|
|
|
|
my $processing; |
934
|
|
|
|
|
|
|
|
935
|
0
|
|
|
|
|
|
warn " Section Configuration of the Linguistic processing\n"; |
936
|
|
|
|
|
|
|
|
937
|
0
|
|
|
|
|
|
foreach $processing ($self->getOrderedProcessing) { |
938
|
0
|
|
|
|
|
|
warn " Tool :\n"; |
939
|
0
|
|
|
|
|
|
warn " Id: " . $self->processingId($processing) . "\n"; |
940
|
0
|
|
|
|
|
|
warn " Order: " . $self->processingOrder($processing) . "\n"; |
941
|
0
|
|
|
|
|
|
warn " Tool: " . $self->processingTool($processing) . "\n"; |
942
|
0
|
|
|
|
|
|
warn " Comments: " . $self->processingComments($processing) . "\n"; |
943
|
|
|
|
|
|
|
} |
944
|
|
|
|
|
|
|
} |
945
|
|
|
|
|
|
|
|
946
|
|
|
|
|
|
|
sub _printLinguisticAnnotationDOT { |
947
|
0
|
|
|
0
|
|
|
my ($self,$lang) = @_; |
948
|
|
|
|
|
|
|
|
949
|
0
|
|
|
|
|
|
my $processing; |
950
|
0
|
|
|
|
|
|
my %colors = ('EN' => 'red', |
951
|
|
|
|
|
|
|
'FR' => 'indigo', |
952
|
|
|
|
|
|
|
'SV' => 'yellow', |
953
|
|
|
|
|
|
|
'UK' => 'blue', |
954
|
|
|
|
|
|
|
'UA' => 'blue', |
955
|
|
|
|
|
|
|
'XH' => 'burlywood', |
956
|
|
|
|
|
|
|
'ALL' => 'black', |
957
|
|
|
|
|
|
|
); |
958
|
|
|
|
|
|
|
|
959
|
0
|
|
|
|
|
|
warn " Section Configuration of the Linguistic processing\n"; |
960
|
|
|
|
|
|
|
|
961
|
0
|
|
|
|
|
|
my @lingAnn; |
962
|
|
|
|
|
|
|
my $name; |
963
|
0
|
|
|
|
|
|
my $i; |
964
|
|
|
|
|
|
|
|
965
|
0
|
|
|
|
|
|
foreach $processing (sort {$self->processingOrder($a) <=> $self->processingOrder($b)} $self->getOrderedProcessing) { |
|
0
|
|
|
|
|
|
|
966
|
0
|
|
|
|
|
|
$name = $self->processingTool($processing); |
967
|
0
|
0
|
0
|
|
|
|
if ((!defined $lang) || $self->getNLPToolFromIndex($name)->existsLanguage($lang)) { |
968
|
0
|
|
|
|
|
|
$name =~ s/ /_/g; |
969
|
0
|
|
|
|
|
|
push @lingAnn, $name; |
970
|
|
|
|
|
|
|
} |
971
|
|
|
|
|
|
|
} |
972
|
0
|
0
|
|
|
|
|
if (!defined $lang) { |
973
|
0
|
|
|
|
|
|
$lang ="ALL"; |
974
|
|
|
|
|
|
|
} |
975
|
0
|
|
|
|
|
|
for($i =1; $i < scalar(@lingAnn);$i++) { |
976
|
0
|
|
|
|
|
|
print "\t" . $lingAnn[$i-1] . " -> " . $lingAnn[$i] . " [label=\"$lang\", color=\"" . $colors{uc($lang)} . "\", fontcolor=\"" . $colors{uc($lang)} . "\"]\n"; |
977
|
|
|
|
|
|
|
} |
978
|
|
|
|
|
|
|
} |
979
|
|
|
|
|
|
|
|
980
|
|
|
|
|
|
|
|
981
|
|
|
|
|
|
|
sub print |
982
|
|
|
|
|
|
|
{ |
983
|
0
|
|
|
0
|
0
|
|
my ($self, $lang, $params) = @_; |
984
|
|
|
|
|
|
|
|
985
|
0
|
|
|
|
|
|
print STDERR "\n****************"; |
986
|
|
|
|
|
|
|
|
987
|
0
|
0
|
|
|
|
|
if (exists $params->{"all"}) { |
988
|
0
|
|
|
|
|
|
$self->_printGeneralVariables; |
989
|
0
|
|
|
|
|
|
$self->_printNLPConnectionVariables; |
990
|
0
|
|
|
|
|
|
$self->_printConverters; |
991
|
0
|
|
|
|
|
|
$self->_printXMLINPUTVariables; |
992
|
0
|
|
|
|
|
|
$self->_printXMLOUTPUTVariables; |
993
|
0
|
|
|
|
|
|
$self->_printNLPMisc; |
994
|
0
|
|
|
|
|
|
$self->_printNLPTools($lang); |
995
|
|
|
|
|
|
|
# print STDERR Dumper($self->getConfigData) . "\n";; |
996
|
0
|
|
|
|
|
|
$self->_printLinguisticAnnotation($lang); |
997
|
|
|
|
|
|
|
} else { |
998
|
0
|
0
|
|
|
|
|
if (exists $params->{"genVar"}) { |
999
|
0
|
|
|
|
|
|
$self->_printGeneralVariables; |
1000
|
|
|
|
|
|
|
} |
1001
|
0
|
0
|
|
|
|
|
if (exists $params->{"cnxVar"}) { |
1002
|
0
|
|
|
|
|
|
$self->_printNLPConnectionVariables; |
1003
|
|
|
|
|
|
|
} |
1004
|
0
|
0
|
|
|
|
|
if (exists $params->{"cnvrt"}) { |
1005
|
0
|
|
|
|
|
|
$self->_printConverters; |
1006
|
|
|
|
|
|
|
} |
1007
|
0
|
0
|
|
|
|
|
if (exists $params->{"inVar"}) { |
1008
|
0
|
|
|
|
|
|
$self->_printXMLINPUTVariables; |
1009
|
|
|
|
|
|
|
} |
1010
|
0
|
0
|
|
|
|
|
if (exists $params->{"outVar"}) { |
1011
|
0
|
|
|
|
|
|
$self->_printXMLOUTPUTVariables; |
1012
|
|
|
|
|
|
|
} |
1013
|
0
|
0
|
|
|
|
|
if (exists $params->{"nlpMsc"}) { |
1014
|
0
|
|
|
|
|
|
$self->_printNLPMisc; |
1015
|
|
|
|
|
|
|
} |
1016
|
0
|
0
|
|
|
|
|
if (exists $params->{"nlptools"}) { |
1017
|
0
|
|
|
|
|
|
$self->_printNLPTools($lang); |
1018
|
|
|
|
|
|
|
} |
1019
|
0
|
0
|
|
|
|
|
if (exists $params->{"lingAnn"}) { |
1020
|
0
|
|
|
|
|
|
$self->_printLinguisticAnnotation ($lang); |
1021
|
|
|
|
|
|
|
} |
1022
|
0
|
0
|
|
|
|
|
if (exists $params->{"lingAnnFull"}) { |
1023
|
0
|
|
|
|
|
|
$self->_printLinguisticAnnotationFull($lang); |
1024
|
|
|
|
|
|
|
} |
1025
|
|
|
|
|
|
|
} |
1026
|
0
|
|
|
|
|
|
print STDERR "****************\n\n"; |
1027
|
0
|
|
|
|
|
|
return(0); |
1028
|
|
|
|
|
|
|
} |
1029
|
|
|
|
|
|
|
|
1030
|
|
|
|
|
|
|
sub printDOT |
1031
|
|
|
|
|
|
|
{ |
1032
|
0
|
|
|
0
|
0
|
|
my ($self, $lang, $params) = @_; |
1033
|
|
|
|
|
|
|
|
1034
|
0
|
|
|
|
|
|
print STDERR "\n****************"; |
1035
|
|
|
|
|
|
|
|
1036
|
0
|
0
|
|
|
|
|
if (exists $params->{"all"}) { |
1037
|
0
|
|
|
|
|
|
print "digraph qald {\n"; |
1038
|
|
|
|
|
|
|
# $self->_printGeneralVariables; |
1039
|
|
|
|
|
|
|
# $self->_printNLPConnectionVariables; |
1040
|
|
|
|
|
|
|
# $self->_printConverters; |
1041
|
|
|
|
|
|
|
# $self->_printXMLINPUTVariables; |
1042
|
|
|
|
|
|
|
# $self->_printXMLOUTPUTVariables; |
1043
|
|
|
|
|
|
|
# $self->_printNLPMisc; |
1044
|
0
|
|
|
|
|
|
$self->_printNLPToolsDOT($lang); |
1045
|
|
|
|
|
|
|
# print STDERR Dumper($self->getConfigData) . "\n";; |
1046
|
0
|
|
|
|
|
|
print "\n"; |
1047
|
0
|
|
|
|
|
|
$self->_printLinguisticAnnotationDOT($lang); |
1048
|
0
|
|
|
|
|
|
print "}\n"; |
1049
|
|
|
|
|
|
|
} else { |
1050
|
|
|
|
|
|
|
# if (exists $params->{"genVar"}) { |
1051
|
|
|
|
|
|
|
# $self->_printGeneralVariables; |
1052
|
|
|
|
|
|
|
# } |
1053
|
|
|
|
|
|
|
# if (exists $params->{"cnxVar"}) { |
1054
|
|
|
|
|
|
|
# $self->_printNLPConnectionVariables; |
1055
|
|
|
|
|
|
|
# } |
1056
|
|
|
|
|
|
|
# if (exists $params->{"cnvrt"}) { |
1057
|
|
|
|
|
|
|
# $self->_printConverters; |
1058
|
|
|
|
|
|
|
# } |
1059
|
|
|
|
|
|
|
# if (exists $params->{"inVar"}) { |
1060
|
|
|
|
|
|
|
# $self->_printXMLINPUTVariables; |
1061
|
|
|
|
|
|
|
# } |
1062
|
|
|
|
|
|
|
# if (exists $params->{"outVar"}) { |
1063
|
|
|
|
|
|
|
# $self->_printXMLOUTPUTVariables; |
1064
|
|
|
|
|
|
|
# } |
1065
|
|
|
|
|
|
|
# if (exists $params->{"nlpMsc"}) { |
1066
|
|
|
|
|
|
|
# $self->_printNLPMisc; |
1067
|
|
|
|
|
|
|
# } |
1068
|
0
|
0
|
|
|
|
|
if (exists $params->{"nlptools"}) { |
1069
|
0
|
|
|
|
|
|
$self->_printNLPToolsDOT($lang); |
1070
|
|
|
|
|
|
|
# $self->_printNLPTools($lang); |
1071
|
|
|
|
|
|
|
} |
1072
|
0
|
0
|
|
|
|
|
if (exists $params->{"lingAnn"}) { |
1073
|
|
|
|
|
|
|
# $self->_printLinguisticAnnotation ($lang); |
1074
|
0
|
|
|
|
|
|
$self->_printLinguisticAnnotationDOT($lang); |
1075
|
|
|
|
|
|
|
} |
1076
|
|
|
|
|
|
|
# if (exists $params->{"lingAnnFull"}) { |
1077
|
|
|
|
|
|
|
# $self->_printLinguisticAnnotationFull($lang); |
1078
|
|
|
|
|
|
|
# } |
1079
|
|
|
|
|
|
|
} |
1080
|
0
|
|
|
|
|
|
print STDERR "****************\n\n"; |
1081
|
0
|
|
|
|
|
|
return(0); |
1082
|
|
|
|
|
|
|
} |
1083
|
|
|
|
|
|
|
|
1084
|
|
|
|
|
|
|
1; |
1085
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
__END__ |