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