line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::Edge; |
2
|
5
|
|
|
5
|
|
33
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
146
|
|
3
|
5
|
|
|
5
|
|
42
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
113
|
|
4
|
5
|
|
|
5
|
|
26
|
use UNIVERSAL; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
22
|
|
5
|
5
|
|
|
5
|
|
160
|
use Scalar::Util qw(blessed); |
|
5
|
|
|
|
|
25
|
|
|
5
|
|
|
|
|
1633
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new |
11
|
|
|
|
|
|
|
{ |
12
|
858
|
|
|
858
|
1
|
1426
|
my ($class) = @_; |
13
|
858
|
|
|
|
|
1374
|
my $this = {}; |
14
|
858
|
|
|
|
|
1427
|
bless ($this,$class); |
15
|
|
|
|
|
|
|
#$this->{FATHER} = $father; |
16
|
|
|
|
|
|
|
#$this->{POSITION} = ""; |
17
|
858
|
|
|
|
|
1674
|
return $this; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub copyRecursively |
22
|
|
|
|
|
|
|
{ |
23
|
222
|
|
|
222
|
1
|
425
|
my ($this,$new_set,$father) = @_; |
24
|
222
|
|
|
|
|
298
|
my $new; |
25
|
222
|
50
|
33
|
|
|
1038
|
if ((blessed($this)) && ($this->isa('Lingua::YaTeA::TermLeaf'))) |
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
|
|
0
|
return ""; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
else{ |
30
|
222
|
50
|
33
|
|
|
1132
|
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
|
|
|
1049
|
if ((blessed($this)) && ($this->isa('Lingua::YaTeA::PatternLeaf'))) |
36
|
|
|
|
|
|
|
{ |
37
|
222
|
|
|
|
|
725
|
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__ |