| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Lingua::YaTeA::Edge; |
|
2
|
5
|
|
|
5
|
|
33
|
use strict; |
|
|
5
|
|
|
|
|
13
|
|
|
|
5
|
|
|
|
|
145
|
|
|
3
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
|
5
|
|
|
|
|
10
|
|
|
|
5
|
|
|
|
|
105
|
|
|
4
|
5
|
|
|
5
|
|
22
|
use UNIVERSAL; |
|
|
5
|
|
|
|
|
9
|
|
|
|
5
|
|
|
|
|
31
|
|
|
5
|
5
|
|
|
5
|
|
188
|
use Scalar::Util qw(blessed); |
|
|
5
|
|
|
|
|
11
|
|
|
|
5
|
|
|
|
|
1709
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new |
|
11
|
|
|
|
|
|
|
{ |
|
12
|
858
|
|
|
858
|
1
|
1616
|
my ($class) = @_; |
|
13
|
858
|
|
|
|
|
1426
|
my $this = {}; |
|
14
|
858
|
|
|
|
|
1493
|
bless ($this,$class); |
|
15
|
|
|
|
|
|
|
#$this->{FATHER} = $father; |
|
16
|
|
|
|
|
|
|
#$this->{POSITION} = ""; |
|
17
|
858
|
|
|
|
|
1802
|
return $this; |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub copyRecursively |
|
22
|
|
|
|
|
|
|
{ |
|
23
|
222
|
|
|
222
|
1
|
447
|
my ($this,$new_set,$father) = @_; |
|
24
|
222
|
|
|
|
|
315
|
my $new; |
|
25
|
222
|
50
|
33
|
|
|
1087
|
if ((blessed($this)) && ($this->isa('Lingua::YaTeA::TermLeaf'))) |
|
26
|
|
|
|
|
|
|
{ |
|
27
|
0
|
|
|
|
|
0
|
return ""; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
else{ |
|
30
|
222
|
50
|
33
|
|
|
1166
|
if ((blessed($this)) && ($this->isa('Lingua::YaTeA::InternalNode'))) |
|
31
|
|
|
|
|
|
|
{ |
|
32
|
0
|
|
|
|
|
0
|
return $this->copyRecursively($new_set,$father); |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
else{ |
|
35
|
222
|
50
|
33
|
|
|
1113
|
if ((blessed($this)) && ($this->isa('Lingua::YaTeA::PatternLeaf'))) |
|
36
|
|
|
|
|
|
|
{ |
|
37
|
222
|
|
|
|
|
781
|
return ""; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub update |
|
44
|
|
|
|
|
|
|
{ |
|
45
|
0
|
|
|
0
|
1
|
|
my ($this,$new_value) = @_; |
|
46
|
0
|
|
|
|
|
|
$this = $new_value; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub print |
|
52
|
|
|
|
|
|
|
{ |
|
53
|
0
|
|
|
0
|
1
|
|
my ($this,$words_a,$fh) = @_; |
|
54
|
0
|
0
|
0
|
|
|
|
if ((blessed($this)) && ($this->isa("Lingua::YaTeA::Node"))) |
|
55
|
|
|
|
|
|
|
{ |
|
56
|
0
|
|
|
|
|
|
print $fh "Node " . $this->getID; |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
else{ |
|
59
|
0
|
|
|
|
|
|
$this->printWords($words_a,$fh); |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |