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