line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::ParsingPattern; |
2
|
5
|
|
|
5
|
|
44
|
use strict; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
137
|
|
3
|
5
|
|
|
5
|
|
28
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
128
|
|
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
2238
|
use Lingua::YaTeA::NodeSet; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
60
|
|
6
|
5
|
|
|
5
|
|
2362
|
use Lingua::YaTeA::InternalNode; |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
62
|
|
7
|
5
|
|
|
5
|
|
2511
|
use Lingua::YaTeA::RootNode; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
53
|
|
8
|
5
|
|
|
5
|
|
2050
|
use Lingua::YaTeA::PatternLeaf; |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
47
|
|
9
|
|
|
|
|
|
|
# use Data::Dumper; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
280
|
|
|
280
|
1
|
722
|
my ($class,$parse,$pos_sequence,$node_set,$priority,$direction,$num_content_words,$num_line) = @_; |
16
|
280
|
|
|
|
|
502
|
my $this = {}; |
17
|
280
|
|
|
|
|
517
|
bless ($this,$class); |
18
|
280
|
|
|
|
|
610
|
$this->{PARSE} = $parse; |
19
|
280
|
|
|
|
|
524
|
$this->{PRIORITY} = $priority; |
20
|
280
|
|
|
|
|
451
|
$this->{PARSING_DIRECTION} = $direction; |
21
|
280
|
|
|
|
|
491
|
$this->{DECLARATION_LINE} = $num_line; |
22
|
280
|
|
|
|
|
482
|
$this->{POS_SEQUENCE} = $pos_sequence; |
23
|
280
|
|
|
|
|
451
|
$this->{NODE_SET} = $node_set; |
24
|
280
|
|
|
|
|
440
|
$this->{CONTENT_WORDS} = $num_content_words; |
25
|
280
|
|
|
|
|
591
|
return $this; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub setNodeSet |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
0
|
1
|
0
|
my ($this,$node_set) = @_; |
31
|
0
|
|
|
|
|
0
|
$this->{NODE_SET} = $node_set; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub getParse |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
39
|
0
|
|
|
|
|
0
|
return $this->{PARSE}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub getLength |
44
|
|
|
|
|
|
|
{ |
45
|
64
|
|
|
64
|
1
|
145
|
my ($this) = @_; |
46
|
64
|
|
|
|
|
175
|
my @array = split (/ /, $this->getPOSSequence); |
47
|
64
|
|
|
|
|
274
|
return scalar @array; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub getPriority |
52
|
|
|
|
|
|
|
{ |
53
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
54
|
0
|
|
|
|
|
0
|
return $this->{PRIORITY}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub getDirection |
58
|
|
|
|
|
|
|
{ |
59
|
4
|
|
|
4
|
1
|
13
|
my ($this) = @_; |
60
|
4
|
|
|
|
|
25
|
return $this->{PARSING_DIRECTION}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub getNodeSet |
64
|
|
|
|
|
|
|
{ |
65
|
110
|
|
|
110
|
1
|
237
|
my ($this) = @_; |
66
|
110
|
|
|
|
|
453
|
return $this->{NODE_SET}; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub getNumContentWords |
70
|
|
|
|
|
|
|
{ |
71
|
6
|
|
|
6
|
1
|
12
|
my ($this) = @_; |
72
|
6
|
|
|
|
|
38
|
return $this->{CONTENT_WORDS}; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub getPOSSequence |
76
|
|
|
|
|
|
|
{ |
77
|
624
|
|
|
624
|
1
|
1064
|
my ($this) = @_; |
78
|
624
|
|
|
|
|
1720
|
return $this->{POS_SEQUENCE}; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub print |
82
|
|
|
|
|
|
|
{ |
83
|
0
|
|
|
0
|
1
|
|
my ($this) = @_; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
print "\t[\n"; |
86
|
0
|
|
|
|
|
|
print "\tPARSE: " . $this->getParse . "\n"; |
87
|
0
|
|
|
|
|
|
print "\tPOS: " . $this->getPOSSequence . "\n"; |
88
|
0
|
|
|
|
|
|
print "\tPRIORITY: " . $this->getPriority . "\n"; |
89
|
0
|
|
|
|
|
|
print "\tPARSING_DIRECTION: " . $this->getDirection . "\n"; |
90
|
0
|
|
|
|
|
|
print "\tNODE_SET: \n"; |
91
|
0
|
|
|
|
|
|
$this->getNodeSet->print; |
92
|
0
|
|
|
|
|
|
print "]\n"; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
1; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
__END__ |