« blib/lib/Lingua/Ogmios/Annotations/Level.pm
↑ Summary
blib/lib/Lingua/Ogmios/NLPWrappers/YaTeA.pm »
| 1 | package Lingua::Ogmios::Config; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | 16 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 16 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 16 | ▶ | use Config::General; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 16 | ▶ | use Sys::Hostname; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 16 | ▶ | use Lingua::Ogmios::Config::NLPTools; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 16 | ▶ | use Data::Dumper; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 16 | my $debug_devel_level = 0; | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | sub new { | ||||||||||||||||||||||||||||
| 17 | 0 | ▶ | my $class = shift; | ||||||||||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 18 | 0 | my ($rcfile) = @_; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 0 | ▶ | warn "New Configuration\n" unless $debug_devel_level < 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | if (defined $rcfile) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self, $rcfile) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setConfigData: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 0 | ▶ | warn "Loading Configuration\n" unless $debug_devel_level < 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_checkVersionFile: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | 0 | ▶ | if (exists $self->getConfigData->{'ALVISTMP'}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getConfigData: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 0 | return($self->{'ConfigData'}); | |||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | sub setConfigFile { | ||||||||||||||||||||||||||||
| 76 | 0 | ▶ | my ($self, $rcfile) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setConfigFile: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | 0 | $self->{'ConfigFile'} = $rcfile; | |||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | sub getConfigFile { | ||||||||||||||||||||||||||||
| 82 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getConfigFile: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | 0 | return($self->{'ConfigFile'}); | |||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | sub _unsetOldVersion { | ||||||||||||||||||||||||||||
| 88 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_unsetOldVersion: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | 0 | $self->{OldVersion} = 0; | |||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||
| 93 | sub _setOldVersion { | ||||||||||||||||||||||||||||
| 94 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_setOldVersion: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||
| 96 | 0 | $self->{OldVersion} = 1; | |||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||
| 99 | sub _getOldVersion { | ||||||||||||||||||||||||||||
| 100 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_getOldVersion: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | 0 | return($self->{OldVersion}); | |||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | sub _ConvertConfigFile { | ||||||||||||||||||||||||||||
| 106 | 0 | ▶ | my ($self, $option) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_ConvertConfigFile: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||
| 108 | # ALVISTMP -> OGMIOSTMP | ||||||||||||||||||||||||||||
| 109 | 0 | $self->setOgmiosTMPDIR($self->getConfigData->{'ALVISTMP'}); | |||||||||||||||||||||||||||
| 110 | 0 | ▶ | if ((defined $option) && ($option eq "remove")) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $option and $option eq "remove"
MC/DC0%0/2
defined $option and $option eq "remove"
defined $option
$option eq "remove"
Truth table0%0/3
A and B
A= defined $optionB= $option eq "remove"
| |||||||||||||||||||||||||||||
| 111 | 0 | delete $self->getConfigData->{'ALVISTMP'}; | |||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | # PLATFORM_ROOT -> OGMIOSROOT ? | ||||||||||||||||||||||||||||
| 115 | } | ||||||||||||||||||||||||||||
| 116 | sub setOgmiosTMPFILE { | ||||||||||||||||||||||||||||
| 117 | 0 | ▶ | my ($self, $tmpdir) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setOgmiosTMPFILE: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||
| 119 | 0 | $self->getConfigData->{'OGMIOSTMPFILE'} = $self->getOgmiosTMPDIR . "/ogmios." . hostname . ".$$"; | |||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||
| 123 | sub getOgmiosTMPFILE { | ||||||||||||||||||||||||||||
| 124 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getOgmiosTMPFILE: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||
| 126 | 0 | return($self->getConfigData->{'OGMIOSTMPFILE'}); | |||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||
| 129 | sub setOgmiosLOGFILE { | ||||||||||||||||||||||||||||
| 130 | 0 | ▶ | my ($self, $logdir) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setOgmiosLOGFILE: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||
| 132 | 0 | $self->getConfigData->{'OGMIOSLOGFILE'} = $self->getOgmiosTMPDIR . "/ogmios." . hostname . ".$$.log"; | |||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||
| 136 | sub getOgmiosLOGFILE { | ||||||||||||||||||||||||||||
| 137 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getOgmiosLOGFILE: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||
| 139 | 0 | return($self->getConfigData->{'OGMIOSLOGFILE'}); | |||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||
| 142 | sub setOgmiosTMPDIR { | ||||||||||||||||||||||||||||
| 143 | 0 | ▶ | my ($self, $tmpdir) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setOgmiosTMPDIR: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||
| 145 | 0 | $self->getConfigData->{'OGMIOSTMP'} = $tmpdir; | |||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||
| 149 | sub OgmiosOutStream { | ||||||||||||||||||||||||||||
| 150 | 0 | ▶ | my ($self, $out_stream) = @_; | ||||||||||||||||||||||||||
|
Subroutine
OgmiosOutStream: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||
| 152 | 0 | ▶ | if (defined $out_stream) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getOgmiosTMPDIR: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||
| 162 | 0 | return($self->getConfigData->{'OGMIOSTMP'}); | |||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | sub setOgmiosROOTDIR { | ||||||||||||||||||||||||||||
| 167 | 0 | ▶ | my ($self, $rootdir) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setOgmiosROOTDIR: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||
| 169 | 0 | $self->getConfigData->{'PLATFORM_ROOT'} = $rootdir; | |||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||
| 172 | sub getOgmiosROOTDIR { | ||||||||||||||||||||||||||||
| 173 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getOgmiosROOTDIR: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||
| 175 | 0 | return($self->getConfigData->{'PLATFORM_ROOT'}); | |||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||
| 179 | sub setOgmiosDefaultLanguage { | ||||||||||||||||||||||||||||
| 180 | 0 | ▶ | my ($self, $defaultLanguage) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setOgmiosDefaultLanguage: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||
| 182 | 0 | $self->getConfigData->{'DEFAULT_LANGUAGE'} = uc($defaultLanguage); | |||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||
| 185 | sub getOgmiosDefaultLanguage { | ||||||||||||||||||||||||||||
| 186 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getOgmiosDefaultLanguage: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||
| 188 | 0 | ▶ | if (!defined($self->getConfigData->{'DEFAULT_LANGUAGE'})) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 189 | 0 | $self->setOgmiosDefaultLanguage('EN'); | |||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||
| 192 | 0 | return(uc($self->getConfigData->{'DEFAULT_LANGUAGE'})); | |||||||||||||||||||||||||||
| 193 | } | ||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||
| 197 | sub setOgmiosNLPTOOLSROOT { | ||||||||||||||||||||||||||||
| 198 | 0 | ▶ | my ($self, $nlptoolsdir) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setOgmiosNLPTOOLSROOT: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||
| 200 | 0 | $self->getConfigData->{'NLP_tools_root'} = $nlptoolsdir; | |||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||
| 203 | sub getOgmiosNLPTOOLSROOT { | ||||||||||||||||||||||||||||
| 204 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getOgmiosNLPTOOLSROOT: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||
| 206 | 0 | return($self->getConfigData->{'NLP_tools_root'}); | |||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | sub setNLPConnection { | ||||||||||||||||||||||||||||
| 210 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setNLPConnection: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||
| 212 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||
| 214 | 0 | $self->getConfigData->{'NLP_connection'} = \%tmp; | |||||||||||||||||||||||||||
| 215 | } | ||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||
| 217 | sub getNLPConnection { | ||||||||||||||||||||||||||||
| 218 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getNLPConnection: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||
| 220 | 0 | return($self->getConfigData->{'NLP_connection'}); | |||||||||||||||||||||||||||
| 221 | } | ||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||
| 223 | sub setServerHost { | ||||||||||||||||||||||||||||
| 224 | 0 | ▶ | my ($self, $host) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setServerHost: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||
| 226 | 0 | $self->getNLPConnection->{'SERVER'} = $host; | |||||||||||||||||||||||||||
| 227 | } | ||||||||||||||||||||||||||||
| 228 | |||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||
| 230 | sub getServerHost { | ||||||||||||||||||||||||||||
| 231 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getServerHost: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | 0 | return($self->getNLPConnection->{'SERVER'}); | |||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||
| 237 | sub setServerPort { | ||||||||||||||||||||||||||||
| 238 | 0 | ▶ | my ($self, $port) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setServerPort: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||
| 240 | 0 | $self->getNLPConnection->{'PORT'} = $port; | |||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||
| 244 | sub getServerPort { | ||||||||||||||||||||||||||||
| 245 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getServerPort: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||
| 247 | 0 | return($self->getNLPConnection->{'PORT'}); | |||||||||||||||||||||||||||
| 248 | } | ||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||
| 250 | sub setRetryConnection { | ||||||||||||||||||||||||||||
| 251 | 0 | ▶ | my ($self, $retry) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setRetryConnection: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||
| 253 | 0 | $self->getNLPConnection->{'RETRY_CONNECTION'} = $retry; | |||||||||||||||||||||||||||
| 254 | } | ||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||
| 256 | sub getRetryConnection { | ||||||||||||||||||||||||||||
| 257 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getRetryConnection: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||
| 259 | 0 | return($self->getNLPConnection->{'RETRY_CONNECTION'}); | |||||||||||||||||||||||||||
| 260 | } | ||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | sub getXMLINPUT { | ||||||||||||||||||||||||||||
| 263 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getXMLINPUT: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||
| 265 | 0 | return($self->getConfigData->{'XML_INPUT'}); | |||||||||||||||||||||||||||
| 266 | } | ||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||
| 268 | sub setXMLINPUT { | ||||||||||||||||||||||||||||
| 269 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setXMLINPUT: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||
| 271 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||
| 273 | 0 | $self->getConfigData->{'XML_INPUT'} = \%tmp; | |||||||||||||||||||||||||||
| 274 | } | ||||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||
| 276 | sub InputFileFormat { | ||||||||||||||||||||||||||||
| 277 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
InputFileFormat: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||
| 279 | 0 | ▶ | $self->getXMLINPUT->{'FILEFORMAT'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 280 | 0 | return($self->getXMLINPUT->{'FILEFORMAT'}); | |||||||||||||||||||||||||||
| 281 | } | ||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||
| 283 | sub isInputInALVISFormat { | ||||||||||||||||||||||||||||
| 284 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
isInputInALVISFormat: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||
| 286 | 0 | return(uc($self->InputFileFormat) eq "ALVIS"); | |||||||||||||||||||||||||||
| 287 | } | ||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||
| 289 | sub preserveWhiteSpace { | ||||||||||||||||||||||||||||
| 290 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
preserveWhiteSpace: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||
| 292 | 0 | ▶ | $self->getXMLINPUT->{PRESERVEWHITESPACE} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 293 | 0 | return $self->getXMLINPUT->{PRESERVEWHITESPACE}; | |||||||||||||||||||||||||||
| 294 | } | ||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||
| 296 | sub linguisticAnnotationLoading { | ||||||||||||||||||||||||||||
| 297 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
linguisticAnnotationLoading: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||
| 299 | 0 | ▶ | $self->getXMLINPUT->{LINGUISTIC_ANNOTATION_LOADING} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 300 | 0 | return $self->getXMLINPUT->{LINGUISTIC_ANNOTATION_LOADING}; | |||||||||||||||||||||||||||
| 301 | } | ||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||
| 303 | sub _printXMLINPUTVariables { | ||||||||||||||||||||||||||||
| 304 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printXMLINPUTVariables: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||
| 306 | 0 | my $var; | |||||||||||||||||||||||||||
| 307 | |||||||||||||||||||||||||||||
| 308 | 0 | ▶ | if (defined $self->getXMLINPUT) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getXMLOUTPUT: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||
| 323 | 0 | return($self->getConfigData->{'XML_OUTPUT'}); | |||||||||||||||||||||||||||
| 324 | } | ||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||
| 326 | sub setXMLOUTPUT { | ||||||||||||||||||||||||||||
| 327 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setXMLOUTPUT: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||
| 329 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 330 | |||||||||||||||||||||||||||||
| 331 | 0 | $self->getConfigData->{'XML_OUTPUT'} = \%tmp; | |||||||||||||||||||||||||||
| 332 | } | ||||||||||||||||||||||||||||
| 333 | |||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||
| 335 | sub xmloutput_form { | ||||||||||||||||||||||||||||
| 336 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_form: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||
| 338 | 0 | ▶ | $self->getXMLOUTPUT->{FORM} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 339 | 0 | return $self->getXMLOUTPUT->{FORM}; | |||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||
| 342 | sub xmloutput_id { | ||||||||||||||||||||||||||||
| 343 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_id: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||
| 345 | 0 | ▶ | $self->getXMLOUTPUT->{ID} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 346 | 0 | return $self->getXMLOUTPUT->{ID}; | |||||||||||||||||||||||||||
| 347 | } | ||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||
| 349 | sub xmloutput_tokenLevel { | ||||||||||||||||||||||||||||
| 350 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_tokenLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||
| 352 | 0 | ▶ | $self->getXMLOUTPUT->{TOKEN_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 353 | 0 | return $self->getXMLOUTPUT->{TOKEN_LEVEL}; | |||||||||||||||||||||||||||
| 354 | } | ||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||
| 356 | sub xmloutput_semanticUnitNamedEntityLevel { | ||||||||||||||||||||||||||||
| 357 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_semanticUnitNamedEntityLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||
| 359 | 0 | ▶ | $self->getXMLOUTPUT->{SEMANTIC_UNIT_NAMED_ENTITY_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 360 | 0 | return $self->getXMLOUTPUT->{SEMANTIC_UNIT_NAMED_ENTITY_LEVEL}; | |||||||||||||||||||||||||||
| 361 | } | ||||||||||||||||||||||||||||
| 362 | |||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||
| 364 | sub xmloutput_wordLevel { | ||||||||||||||||||||||||||||
| 365 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_wordLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 366 | |||||||||||||||||||||||||||||
| 367 | 0 | ▶ | $self->getXMLOUTPUT->{WORD_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 368 | 0 | return $self->getXMLOUTPUT->{WORD_LEVEL}; | |||||||||||||||||||||||||||
| 369 | } | ||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||
| 372 | sub xmloutput_sentenceLevel { | ||||||||||||||||||||||||||||
| 373 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_sentenceLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||
| 375 | 0 | ▶ | $self->getXMLOUTPUT->{SENTENCE_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 376 | 0 | return $self->getXMLOUTPUT->{SENTENCE_LEVEL}; | |||||||||||||||||||||||||||
| 377 | } | ||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||
| 380 | sub xmloutput_morphosyntacticFeatureLevel { | ||||||||||||||||||||||||||||
| 381 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_morphosyntacticFeatureLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||
| 383 | 0 | ▶ | $self->getXMLOUTPUT->{MORPHOSYNTACTIC_FEATURE_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 384 | 0 | return $self->getXMLOUTPUT->{MORPHOSYNTACTIC_FEATURE_LEVEL}; | |||||||||||||||||||||||||||
| 385 | } | ||||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||
| 388 | sub xmloutput_lemmaLevel { | ||||||||||||||||||||||||||||
| 389 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_lemmaLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||
| 391 | 0 | ▶ | $self->getXMLOUTPUT->{LEMMA_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 392 | 0 | return $self->getXMLOUTPUT->{LEMMA_LEVEL}; | |||||||||||||||||||||||||||
| 393 | } | ||||||||||||||||||||||||||||
| 394 | |||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||
| 396 | sub xmloutput_semanticUnitTermLevel { | ||||||||||||||||||||||||||||
| 397 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_semanticUnitTermLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||
| 399 | 0 | ▶ | $self->getXMLOUTPUT->{SEMANTIC_UNIT_TERM_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 400 | 0 | return $self->getXMLOUTPUT->{SEMANTIC_UNIT_TERM_LEVEL}; | |||||||||||||||||||||||||||
| 401 | } | ||||||||||||||||||||||||||||
| 402 | |||||||||||||||||||||||||||||
| 403 | sub xmloutput_semanticUnitLevel { | ||||||||||||||||||||||||||||
| 404 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_semanticUnitLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 405 | |||||||||||||||||||||||||||||
| 406 | 0 | ▶ | $self->getXMLOUTPUT->{SEMANTIC_UNIT_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 407 | 0 | return $self->getXMLOUTPUT->{SEMANTIC_UNIT_LEVEL}; | |||||||||||||||||||||||||||
| 408 | } | ||||||||||||||||||||||||||||
| 409 | |||||||||||||||||||||||||||||
| 410 | sub xmloutput_syntacticRelationLevel { | ||||||||||||||||||||||||||||
| 411 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_syntacticRelationLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||
| 413 | 0 | ▶ | $self->getXMLOUTPUT->{SYNTACTIC_RELATION_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 414 | 0 | return $self->getXMLOUTPUT->{SYNTACTIC_RELATION_LEVEL}; | |||||||||||||||||||||||||||
| 415 | } | ||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||
| 417 | sub xmloutput_sectionLevel { | ||||||||||||||||||||||||||||
| 418 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_sectionLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||
| 420 | 0 | ▶ | $self->getXMLOUTPUT->{SECTION_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 421 | 0 | return $self->getXMLOUTPUT->{SECTION_LEVEL}; | |||||||||||||||||||||||||||
| 422 | } | ||||||||||||||||||||||||||||
| 423 | |||||||||||||||||||||||||||||
| 424 | sub xmloutput_enumerationLevel { | ||||||||||||||||||||||||||||
| 425 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_enumerationLevel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 426 | |||||||||||||||||||||||||||||
| 427 | 0 | ▶ | $self->getXMLOUTPUT->{ENUMERATION_LEVEL} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 428 | 0 | return $self->getXMLOUTPUT->{ENUMERATION_LEVEL}; | |||||||||||||||||||||||||||
| 429 | } | ||||||||||||||||||||||||||||
| 430 | |||||||||||||||||||||||||||||
| 431 | sub xmloutput_noStdXmlOutput { | ||||||||||||||||||||||||||||
| 432 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
xmloutput_noStdXmlOutput: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 433 | |||||||||||||||||||||||||||||
| 434 | 0 | ▶ | $self->getXMLOUTPUT->{NO_STD_XML_OUTPUT} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printXMLOUTPUTVariables: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 449 | |||||||||||||||||||||||||||||
| 450 | 0 | my $var; | |||||||||||||||||||||||||||
| 451 | |||||||||||||||||||||||||||||
| 452 | 0 | ▶ | if (defined $self->getXMLOUTPUT) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getNLPMisc: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 478 | |||||||||||||||||||||||||||||
| 479 | 0 | return($self->getConfigData->{'NLP_misc'}); | |||||||||||||||||||||||||||
| 480 | } | ||||||||||||||||||||||||||||
| 481 | |||||||||||||||||||||||||||||
| 482 | sub setNLMisc { | ||||||||||||||||||||||||||||
| 483 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setNLMisc: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 484 | |||||||||||||||||||||||||||||
| 485 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||
| 487 | 0 | $self->getConfigData->{'NLP_misc'} = \%tmp; | |||||||||||||||||||||||||||
| 488 | } | ||||||||||||||||||||||||||||
| 489 | |||||||||||||||||||||||||||||
| 490 | |||||||||||||||||||||||||||||
| 491 | sub _printNLPMisc { | ||||||||||||||||||||||||||||
| 492 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printNLPMisc: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 493 | |||||||||||||||||||||||||||||
| 494 | 0 | my $var; | |||||||||||||||||||||||||||
| 495 | |||||||||||||||||||||||||||||
| 496 | 0 | ▶ | if (defined $self->getNLPMisc) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getNLPTools: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 506 | |||||||||||||||||||||||||||||
| 507 | 0 | return($self->getConfigData->{'NLP_tools'}->{'TOOL'}); | |||||||||||||||||||||||||||
| 508 | } | ||||||||||||||||||||||||||||
| 509 | |||||||||||||||||||||||||||||
| 510 | sub setNLTools { | ||||||||||||||||||||||||||||
| 511 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setNLTools: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 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 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getNLPToolFromIndex: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 529 | 0 | my $entry = shift; | |||||||||||||||||||||||||||
| 530 | |||||||||||||||||||||||||||||
| 531 | |||||||||||||||||||||||||||||
| 532 | 0 | return($self->getNLPToolIndex->{$entry}); | |||||||||||||||||||||||||||
| 533 | |||||||||||||||||||||||||||||
| 534 | } | ||||||||||||||||||||||||||||
| 535 | |||||||||||||||||||||||||||||
| 536 | sub getNLPToolIndex { | ||||||||||||||||||||||||||||
| 537 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getNLPToolIndex: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 538 | |||||||||||||||||||||||||||||
| 539 | 0 | return($self->{'NLPToolIndex'}); | |||||||||||||||||||||||||||
| 540 | } | ||||||||||||||||||||||||||||
| 541 | |||||||||||||||||||||||||||||
| 542 | sub setNLPToolIndex { | ||||||||||||||||||||||||||||
| 543 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
setNLPToolIndex: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 544 | |||||||||||||||||||||||||||||
| 545 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 546 | 0 | $self->{'NLPToolIndex'} = \%tmp; | |||||||||||||||||||||||||||
| 547 | } | ||||||||||||||||||||||||||||
| 548 | |||||||||||||||||||||||||||||
| 549 | |||||||||||||||||||||||||||||
| 550 | sub indexNLPtools { | ||||||||||||||||||||||||||||
| 551 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
indexNLPtools: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 552 | |||||||||||||||||||||||||||||
| 553 | 0 | my $tool; | |||||||||||||||||||||||||||
| 554 | my $tools; | ||||||||||||||||||||||||||||
| 555 | |||||||||||||||||||||||||||||
| 556 | # print STDERR Dumper $self->getNLPTools; | ||||||||||||||||||||||||||||
| 557 | 0 | ▶ | if ($tools = $self->getNLPTools) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self, $tool_config) = @_; | ||||||||||||||||||||||||||
|
Subroutine
addNLPtool2index: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 567 | |||||||||||||||||||||||||||||
| 568 | # warn "tool : $tool_config\n"; | ||||||||||||||||||||||||||||
| 569 | |||||||||||||||||||||||||||||
| 570 | # warn "Add " . $tool_config->name . " to the index\n"; | ||||||||||||||||||||||||||||
| 571 | 0 | ▶ | if (!defined $self->getNLPToolIndex) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 572 | 0 | $self->setNLPToolIndex; | |||||||||||||||||||||||||||
| 573 | } | ||||||||||||||||||||||||||||
| 574 | 0 | $self->getNLPToolIndex->{$tool_config->name} = $tool_config; | |||||||||||||||||||||||||||
| 575 | } | ||||||||||||||||||||||||||||
| 576 | |||||||||||||||||||||||||||||
| 577 | sub addNLPTool { | ||||||||||||||||||||||||||||
| 578 | 0 | ▶ | my ($self, $data_config) = @_; | ||||||||||||||||||||||||||
|
Subroutine
addNLPTool: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self, $lang) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printNLPTools: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 591 | |||||||||||||||||||||||||||||
| 592 | 0 | my $var; | |||||||||||||||||||||||||||
| 593 | my $tool; | ||||||||||||||||||||||||||||
| 594 | |||||||||||||||||||||||||||||
| 595 | 0 | ▶ | if (defined $self->getNLPToolIndex) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 596 | 0 | my %nlptools_vars = (); | |||||||||||||||||||||||||||
| 597 | |||||||||||||||||||||||||||||
| 598 | 0 | warn " Section NLP tools definition\n"; | |||||||||||||||||||||||||||
| 599 | |||||||||||||||||||||||||||||
| 600 | 0 | foreach $tool (keys %{$self->getNLPToolIndex}) { | |||||||||||||||||||||||||||
| 601 | 0 | $self->getNLPToolIndex->{$tool}->print($lang); | |||||||||||||||||||||||||||
| 602 | } | ||||||||||||||||||||||||||||
| 603 | } | ||||||||||||||||||||||||||||
| 604 | } | ||||||||||||||||||||||||||||
| 605 | |||||||||||||||||||||||||||||
| 606 | sub _printNLPToolsDOT { | ||||||||||||||||||||||||||||
| 607 | 0 | ▶ | my ($self, $lang) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printNLPToolsDOT: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 608 | |||||||||||||||||||||||||||||
| 609 | 0 | my $var; | |||||||||||||||||||||||||||
| 610 | my $tool; | ||||||||||||||||||||||||||||
| 611 | |||||||||||||||||||||||||||||
| 612 | 0 | ▶ | if (defined $self->getNLPToolIndex) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 613 | 0 | my %nlptools_vars = (); | |||||||||||||||||||||||||||
| 614 | |||||||||||||||||||||||||||||
| 615 | 0 | warn " Section NLP tools definition\n"; | |||||||||||||||||||||||||||
| 616 | |||||||||||||||||||||||||||||
| 617 | 0 | foreach $tool (keys %{$self->getNLPToolIndex}) { | |||||||||||||||||||||||||||
| 618 | # warn "lang(0): $lang\n"; | ||||||||||||||||||||||||||||
| 619 | 0 | $self->getNLPToolIndex->{$tool}->printDOT($lang); | |||||||||||||||||||||||||||
| 620 | } | ||||||||||||||||||||||||||||
| 621 | } | ||||||||||||||||||||||||||||
| 622 | } | ||||||||||||||||||||||||||||
| 623 | |||||||||||||||||||||||||||||
| 624 | |||||||||||||||||||||||||||||
| 625 | |||||||||||||||||||||||||||||
| 626 | sub setConverters { | ||||||||||||||||||||||||||||
| 627 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setConverters: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 628 | |||||||||||||||||||||||||||||
| 629 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 630 | |||||||||||||||||||||||||||||
| 631 | 0 | $self->getConfigData->{'CONVERTERS'} = \%tmp; | |||||||||||||||||||||||||||
| 632 | } | ||||||||||||||||||||||||||||
| 633 | |||||||||||||||||||||||||||||
| 634 | sub getConverters { | ||||||||||||||||||||||||||||
| 635 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getConverters: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 636 | |||||||||||||||||||||||||||||
| 637 | 0 | return($self->getConfigData->{'CONVERTERS'}); | |||||||||||||||||||||||||||
| 638 | } | ||||||||||||||||||||||||||||
| 639 | |||||||||||||||||||||||||||||
| 640 | sub getSupplementaryMagicFile { | ||||||||||||||||||||||||||||
| 641 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getSupplementaryMagicFile: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 642 | |||||||||||||||||||||||||||||
| 643 | 0 | return($self->getConverters->{'SupplMagicFile'}); | |||||||||||||||||||||||||||
| 644 | |||||||||||||||||||||||||||||
| 645 | } | ||||||||||||||||||||||||||||
| 646 | |||||||||||||||||||||||||||||
| 647 | sub setSupplementaryMagicFile { | ||||||||||||||||||||||||||||
| 648 | 0 | ▶ | my ($self, $filename) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setSupplementaryMagicFile: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 649 | |||||||||||||||||||||||||||||
| 650 | 0 | $self->getConverters->{'SupplMagicFile'} = $filename | |||||||||||||||||||||||||||
| 651 | |||||||||||||||||||||||||||||
| 652 | } | ||||||||||||||||||||||||||||
| 653 | |||||||||||||||||||||||||||||
| 654 | sub _printConverters { | ||||||||||||||||||||||||||||
| 655 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printConverters: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 656 | |||||||||||||||||||||||||||||
| 657 | 0 | my $var; | |||||||||||||||||||||||||||
| 658 | |||||||||||||||||||||||||||||
| 659 | |||||||||||||||||||||||||||||
| 660 | 0 | ▶ | if (defined $self->getConverters) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printNLPConnectionVariables: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 687 | |||||||||||||||||||||||||||||
| 688 | 0 | my $var; | |||||||||||||||||||||||||||
| 689 | |||||||||||||||||||||||||||||
| 690 | 0 | ▶ | if (defined $self->getNLPConnection) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printGeneralVariables: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self, $title, $general_vars) = @_; | ||||||||||||||||||||||||||
|
Subroutine
printVar: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 717 | 0 | my $var; | |||||||||||||||||||||||||||
| 718 | |||||||||||||||||||||||||||||
| 719 | 0 | warn "\n$title\n"; | |||||||||||||||||||||||||||
| 720 | |||||||||||||||||||||||||||||
| 721 | 0 | my @tmp; | |||||||||||||||||||||||||||
| 722 | |||||||||||||||||||||||||||||
| 723 | 0 | ▶ | if (ref $general_vars eq 'HASH') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 724 | 0 | @tmp = keys %$general_vars; | |||||||||||||||||||||||||||
| 725 | } else { | ||||||||||||||||||||||||||||
| 726 | 0 | @tmp = @$general_vars; | |||||||||||||||||||||||||||
| 727 | } | ||||||||||||||||||||||||||||
| 728 | |||||||||||||||||||||||||||||
| 729 | 0 | foreach $var (@tmp) { | |||||||||||||||||||||||||||
| 730 | 0 | ▶ | if (defined $general_vars->{$var}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getLinguisticAnnotation: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 740 | |||||||||||||||||||||||||||||
| 741 | 0 | return($self->getConfigData->{"linguistic_annotation"}); | |||||||||||||||||||||||||||
| 742 | } | ||||||||||||||||||||||||||||
| 743 | |||||||||||||||||||||||||||||
| 744 | |||||||||||||||||||||||||||||
| 745 | sub setLinguisticAnnotation { | ||||||||||||||||||||||||||||
| 746 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
setLinguisticAnnotation: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 747 | |||||||||||||||||||||||||||||
| 748 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 749 | |||||||||||||||||||||||||||||
| 750 | 0 | $self->getConfigData->{"linguistic_annotation"} = \%tmp; | |||||||||||||||||||||||||||
| 751 | } | ||||||||||||||||||||||||||||
| 752 | |||||||||||||||||||||||||||||
| 753 | sub setProcessing { | ||||||||||||||||||||||||||||
| 754 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
setProcessing: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 755 | |||||||||||||||||||||||||||||
| 756 | 0 | my %tmp; | |||||||||||||||||||||||||||
| 757 | |||||||||||||||||||||||||||||
| 758 | 0 | ▶ | unless ( @_) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 759 | 0 | %tmp = ('id' => undef, | |||||||||||||||||||||||||||
| 760 | 'order' => -1, | ||||||||||||||||||||||||||||
| 761 | 'tool' => undef, | ||||||||||||||||||||||||||||
| 762 | 'comments' => undef | ||||||||||||||||||||||||||||
| 763 | ); | ||||||||||||||||||||||||||||
| 764 | } else { | ||||||||||||||||||||||||||||
| 765 | 0 | tmp{'id'} = $_[0]->{'id'}; | |||||||||||||||||||||||||||
| 766 | 0 | tmp{'order'} = $_[0]->{'order'}; | |||||||||||||||||||||||||||
| 767 | 0 | tmp{'tool'} = $_[0]->{'tool'}; | |||||||||||||||||||||||||||
| 768 | 0 | tmp{'comments'} = $_[0]->{'comments'}; | |||||||||||||||||||||||||||
| 769 | } | ||||||||||||||||||||||||||||
| 770 | |||||||||||||||||||||||||||||
| 771 | 0 | push @{$self->getProcessingSet}, \%tmp; | |||||||||||||||||||||||||||
| 772 | } | ||||||||||||||||||||||||||||
| 773 | |||||||||||||||||||||||||||||
| 774 | sub correctProcessingSet { | ||||||||||||||||||||||||||||
| 775 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
correctProcessingSet: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 776 | |||||||||||||||||||||||||||||
| 777 | # warn $self->getLinguisticAnnotation->{'processing'} . "\n"; | ||||||||||||||||||||||||||||
| 778 | |||||||||||||||||||||||||||||
| 779 | # warn ref($self->getLinguisticAnnotation->{'processing'}) . "\n"; | ||||||||||||||||||||||||||||
| 780 | |||||||||||||||||||||||||||||
| 781 | 0 | ▶ | if (ref($self->getLinguisticAnnotation->{'processing'}) eq "HASH") { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 782 | 0 | my $tmp = $self->getLinguisticAnnotation->{'processing'}; | |||||||||||||||||||||||||||
| 783 | 0 | $self->setProcessingSet; | |||||||||||||||||||||||||||
| 784 | |||||||||||||||||||||||||||||
| 785 | 0 | push @{$self->getProcessingSet}, $tmp; | |||||||||||||||||||||||||||
| 786 | } else { | ||||||||||||||||||||||||||||
| 787 | 0 | ▶ | if (ref($self->getLinguisticAnnotation->{'processing'}) ne "ARRAY") { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 788 | 0 | $self->setProcessingSet; | |||||||||||||||||||||||||||
| 789 | } | ||||||||||||||||||||||||||||
| 790 | } | ||||||||||||||||||||||||||||
| 791 | |||||||||||||||||||||||||||||
| 792 | } | ||||||||||||||||||||||||||||
| 793 | |||||||||||||||||||||||||||||
| 794 | sub getProcessingSet { | ||||||||||||||||||||||||||||
| 795 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getProcessingSet: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 796 | |||||||||||||||||||||||||||||
| 797 | |||||||||||||||||||||||||||||
| 798 | 0 | return($self->getLinguisticAnnotation->{'processing'}); | |||||||||||||||||||||||||||
| 799 | } | ||||||||||||||||||||||||||||
| 800 | |||||||||||||||||||||||||||||
| 801 | sub getProcessingSetSize { | ||||||||||||||||||||||||||||
| 802 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getProcessingSetSize: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 803 | |||||||||||||||||||||||||||||
| 804 | |||||||||||||||||||||||||||||
| 805 | 0 | return(scalar(@{$self->getLinguisticAnnotation->{'processing'}})); | |||||||||||||||||||||||||||
| 806 | } | ||||||||||||||||||||||||||||
| 807 | |||||||||||||||||||||||||||||
| 808 | sub setProcessingSet { | ||||||||||||||||||||||||||||
| 809 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
setProcessingSet: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 810 | |||||||||||||||||||||||||||||
| 811 | 0 | my @tmp; | |||||||||||||||||||||||||||
| 812 | 0 | $self->getLinguisticAnnotation->{'processing'} = \@tmp; | |||||||||||||||||||||||||||
| 813 | } | ||||||||||||||||||||||||||||
| 814 | |||||||||||||||||||||||||||||
| 815 | sub processingId { | ||||||||||||||||||||||||||||
| 816 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
processingId: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 817 | 0 | my $i = shift; | |||||||||||||||||||||||||||
| 818 | |||||||||||||||||||||||||||||
| 819 | 0 | ▶ | if (ref($i) eq "HASH") { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 820 | 0 | ▶ | $i->{'id'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 821 | 0 | return $i->{'id'}; | |||||||||||||||||||||||||||
| 822 | |||||||||||||||||||||||||||||
| 823 | } else { | ||||||||||||||||||||||||||||
| 824 | |||||||||||||||||||||||||||||
| 825 | 0 | ▶ | $self->getProcessingSet->[$i]->{'id'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 826 | 0 | return $self->getProcessingSet->[$i]->{'id'}; | |||||||||||||||||||||||||||
| 827 | } | ||||||||||||||||||||||||||||
| 828 | } | ||||||||||||||||||||||||||||
| 829 | |||||||||||||||||||||||||||||
| 830 | sub processingOrder { | ||||||||||||||||||||||||||||
| 831 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
processingOrder: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 832 | 0 | my $i = shift; | |||||||||||||||||||||||||||
| 833 | |||||||||||||||||||||||||||||
| 834 | 0 | ▶ | if (ref($i) eq "HASH") { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 835 | 0 | ▶ | $i->{'order'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 836 | 0 | return $i->{'order'}; | |||||||||||||||||||||||||||
| 837 | } else { | ||||||||||||||||||||||||||||
| 838 | 0 | ▶ | $self->getProcessingSet->[$i]->{'order'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 839 | 0 | return $self->getProcessingSet->[$i]->{'order'}; | |||||||||||||||||||||||||||
| 840 | } | ||||||||||||||||||||||||||||
| 841 | } | ||||||||||||||||||||||||||||
| 842 | |||||||||||||||||||||||||||||
| 843 | sub processingComments { | ||||||||||||||||||||||||||||
| 844 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
processingComments: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 845 | 0 | my $i = shift; | |||||||||||||||||||||||||||
| 846 | |||||||||||||||||||||||||||||
| 847 | 0 | ▶ | if (ref($i) eq "HASH") { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 848 | 0 | ▶ | $i->{'comments'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 849 | 0 | return $i->{'comments'}; | |||||||||||||||||||||||||||
| 850 | } else { | ||||||||||||||||||||||||||||
| 851 | 0 | ▶ | $self->getProcessingSet->[$i]->{'comments'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 852 | 0 | return $self->getProcessingSet->[$i]->{'comments'}; | |||||||||||||||||||||||||||
| 853 | } | ||||||||||||||||||||||||||||
| 854 | |||||||||||||||||||||||||||||
| 855 | } | ||||||||||||||||||||||||||||
| 856 | |||||||||||||||||||||||||||||
| 857 | sub processingTool { | ||||||||||||||||||||||||||||
| 858 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
processingTool: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 859 | 0 | my $i = shift; | |||||||||||||||||||||||||||
| 860 | |||||||||||||||||||||||||||||
| 861 | 0 | ▶ | if (ref($i) eq "HASH") { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 862 | 0 | ▶ | $i->{'tool'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 863 | 0 | return $i->{'tool'}; | |||||||||||||||||||||||||||
| 864 | } else { | ||||||||||||||||||||||||||||
| 865 | 0 | ▶ | $self->getProcessingSet->[$i]->{'tool'} = shift if @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 866 | 0 | return $self->getProcessingSet->[$i]->{'tool'}; | |||||||||||||||||||||||||||
| 867 | } | ||||||||||||||||||||||||||||
| 868 | } | ||||||||||||||||||||||||||||
| 869 | |||||||||||||||||||||||||||||
| 870 | sub getProcessing { | ||||||||||||||||||||||||||||
| 871 | 0 | ▶ | my ($self, $id) = @_; | ||||||||||||||||||||||||||
|
Subroutine
getProcessing: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 872 | |||||||||||||||||||||||||||||
| 873 | 0 | my $i = 0; | |||||||||||||||||||||||||||
| 874 | |||||||||||||||||||||||||||||
| 875 | |||||||||||||||||||||||||||||
| 876 | 0 | ▶ | while($self->getProcessingId($i)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 877 | 0 | $i++; | |||||||||||||||||||||||||||
| 878 | } | ||||||||||||||||||||||||||||
| 879 | 0 | return($self->getLinguisticAnnotation->[$i]); | |||||||||||||||||||||||||||
| 880 | |||||||||||||||||||||||||||||
| 881 | } | ||||||||||||||||||||||||||||
| 882 | |||||||||||||||||||||||||||||
| 883 | sub getOrderedProcessing { | ||||||||||||||||||||||||||||
| 884 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getOrderedProcessing: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 885 | |||||||||||||||||||||||||||||
| 886 | 0 | my $processing; | |||||||||||||||||||||||||||
| 887 | my @OP; | ||||||||||||||||||||||||||||
| 888 | |||||||||||||||||||||||||||||
| 889 | 0 | foreach $processing (sort {$self->processingOrder($a) <=> $self->processingOrder($b)} @{$self->getProcessingSet}) { | |||||||||||||||||||||||||||
| 890 | 0 | push @OP, $processing; | |||||||||||||||||||||||||||
| 891 | } | ||||||||||||||||||||||||||||
| 892 | 0 | return(@OP); | |||||||||||||||||||||||||||
| 893 | } | ||||||||||||||||||||||||||||
| 894 | |||||||||||||||||||||||||||||
| 895 | sub getOrderedWrappers { | ||||||||||||||||||||||||||||
| 896 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
getOrderedWrappers: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 897 | |||||||||||||||||||||||||||||
| 898 | 0 | my $processing; | |||||||||||||||||||||||||||
| 899 | my @OrderedWrappers; | ||||||||||||||||||||||||||||
| 900 | |||||||||||||||||||||||||||||
| 901 | 0 | foreach $processing (sort {$self->processingOrder($a) <=> $self->processingOrder($b)} @{$self->getProcessingSet}) { | |||||||||||||||||||||||||||
| 902 | 0 | push @OrderedWrappers, $self->getNLPToolFromIndex($self->processingTool($processing))->wrapper; | |||||||||||||||||||||||||||
| 903 | |||||||||||||||||||||||||||||
| 904 | |||||||||||||||||||||||||||||
| 905 | } | ||||||||||||||||||||||||||||
| 906 | 0 | return(@OrderedWrappers); | |||||||||||||||||||||||||||
| 907 | } | ||||||||||||||||||||||||||||
| 908 | |||||||||||||||||||||||||||||
| 909 | sub _printLinguisticAnnotation { | ||||||||||||||||||||||||||||
| 910 | 0 | ▶ | my ($self,$lang) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printLinguisticAnnotation: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self,$lang) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printLinguisticAnnotationFull: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self,$lang) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_printLinguisticAnnotationDOT: not called CC=6 SCAR=37.4
| |||||||||||||||||||||||||||||
| 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) { | |||||||||||||||||||||||||||
| 964 | 0 | $name = $self->processingTool($processing); | |||||||||||||||||||||||||||
| 965 | 0 | ▶ | if ((!defined $lang) || $self->getNLPToolFromIndex($name)->existsLanguage($lang)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
not defined $lang or $self->getNLPToolFromIndex($name)->existsLanguage($lang)
MC/DC0%0/2
not defined $lang or $self->getNLPToolFromIndex($name)->existsLanguage($lang)
not defined $lang
$self->getNLPToolFromIndex($name)->existsLanguage($lang)
Truth table0%0/3
not(A) or B
A= not defined $langB= $self->getNLPToolFromIndex($name)->existsLanguage($lang)
| |||||||||||||||||||||||||||||
| 966 | 0 | $name =~ s/ /_/g; | |||||||||||||||||||||||||||
| 967 | 0 | push @lingAnn, $name; | |||||||||||||||||||||||||||
| 968 | } | ||||||||||||||||||||||||||||
| 969 | } | ||||||||||||||||||||||||||||
| 970 | 0 | ▶ | if (!defined $lang) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 971 | 0 | $lang ="ALL"; | |||||||||||||||||||||||||||
| 972 | } | ||||||||||||||||||||||||||||
| 973 | 0 | ▶ | for($i =1; $i < scalar(@lingAnn);$i++) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self, $lang, $params) = @_; | ||||||||||||||||||||||||||
|
Subroutine
print: not called CC=11 SCAR=48.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 982 | |||||||||||||||||||||||||||||
| 983 | 0 | print STDERR "\n****************"; | |||||||||||||||||||||||||||
| 984 | |||||||||||||||||||||||||||||
| 985 | 0 | ▶ | if (exists $params->{"all"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | if (exists $params->{"genVar"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 997 | 0 | $self->_printGeneralVariables; | |||||||||||||||||||||||||||
| 998 | } | ||||||||||||||||||||||||||||
| 999 | 0 | ▶ | if (exists $params->{"cnxVar"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1000 | 0 | $self->_printNLPConnectionVariables; | |||||||||||||||||||||||||||
| 1001 | } | ||||||||||||||||||||||||||||
| 1002 | 0 | ▶ | if (exists $params->{"cnvrt"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1003 | 0 | $self->_printConverters; | |||||||||||||||||||||||||||
| 1004 | } | ||||||||||||||||||||||||||||
| 1005 | 0 | ▶ | if (exists $params->{"inVar"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1006 | 0 | $self->_printXMLINPUTVariables; | |||||||||||||||||||||||||||
| 1007 | } | ||||||||||||||||||||||||||||
| 1008 | 0 | ▶ | if (exists $params->{"outVar"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1009 | 0 | $self->_printXMLOUTPUTVariables; | |||||||||||||||||||||||||||
| 1010 | } | ||||||||||||||||||||||||||||
| 1011 | 0 | ▶ | if (exists $params->{"nlpMsc"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1012 | 0 | $self->_printNLPMisc; | |||||||||||||||||||||||||||
| 1013 | } | ||||||||||||||||||||||||||||
| 1014 | 0 | ▶ | if (exists $params->{"nlptools"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1015 | 0 | $self->_printNLPTools($lang); | |||||||||||||||||||||||||||
| 1016 | } | ||||||||||||||||||||||||||||
| 1017 | 0 | ▶ | if (exists $params->{"lingAnn"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1018 | 0 | $self->_printLinguisticAnnotation ($lang); | |||||||||||||||||||||||||||
| 1019 | } | ||||||||||||||||||||||||||||
| 1020 | 0 | ▶ | if (exists $params->{"lingAnnFull"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | my ($self, $lang, $params) = @_; | ||||||||||||||||||||||||||
|
Subroutine
printDOT: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 1031 | |||||||||||||||||||||||||||||
| 1032 | 0 | print STDERR "\n****************"; | |||||||||||||||||||||||||||
| 1033 | |||||||||||||||||||||||||||||
| 1034 | 0 | ▶ | if (exists $params->{"all"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ▶ | if (exists $params->{"nlptools"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 1067 | 0 | $self->_printNLPToolsDOT($lang); | |||||||||||||||||||||||||||
| 1068 | # $self->_printNLPTools($lang); | ||||||||||||||||||||||||||||
| 1069 | } | ||||||||||||||||||||||||||||
| 1070 | 0 | ▶ | if (exists $params->{"lingAnn"}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | 16 | 1; | |||||||||||||||||||||||||||
| 1083 | |||||||||||||||||||||||||||||
| 1084 | __END__ | ||||||||||||||||||||||||||||