line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::ChunkingDataSubset; |
2
|
5
|
|
|
5
|
|
39
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
139
|
|
3
|
5
|
|
|
5
|
|
23
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
2065
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new |
8
|
|
|
|
|
|
|
{ |
9
|
16
|
|
|
16
|
1
|
35
|
my ($class) = @_; |
10
|
16
|
|
|
|
|
27
|
my $this = {}; |
11
|
16
|
|
|
|
|
29
|
bless ($this,$class); |
12
|
16
|
|
|
|
|
51
|
$this->{IF} = {}; |
13
|
16
|
|
|
|
|
30
|
$this->{POS} = {}; |
14
|
16
|
|
|
|
|
29
|
$this->{LF} = {}; |
15
|
16
|
|
|
|
|
51
|
return $this; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub getIF |
19
|
|
|
|
|
|
|
{ |
20
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
21
|
0
|
|
|
|
|
0
|
return $this->{IF}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub getPOS |
25
|
|
|
|
|
|
|
{ |
26
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
27
|
0
|
|
|
|
|
0
|
return $this->{POS}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub getLF |
31
|
|
|
|
|
|
|
{ |
32
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
33
|
0
|
|
|
|
|
0
|
return $this->{LF}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub getSome |
37
|
|
|
|
|
|
|
{ |
38
|
21624
|
|
|
21624
|
1
|
33747
|
my ($this,$type) = @_; |
39
|
21624
|
|
|
|
|
50320
|
return $this->{$type}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub addIF |
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
0
|
1
|
0
|
my ($this,$value); |
45
|
0
|
|
|
|
|
0
|
$this->{IF}->{$value}++; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub addPOS |
49
|
|
|
|
|
|
|
{ |
50
|
0
|
|
|
0
|
1
|
0
|
my ($this,$value); |
51
|
0
|
|
|
|
|
0
|
$this->{POS}->{$value}++; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub addLF |
55
|
|
|
|
|
|
|
{ |
56
|
0
|
|
|
0
|
1
|
0
|
my ($this,$value); |
57
|
0
|
|
|
|
|
0
|
$this->{LF}->{$value}++; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub addSome |
61
|
|
|
|
|
|
|
{ |
62
|
244
|
|
|
244
|
1
|
478
|
my ($this,$type,$value) = @_; |
63
|
244
|
|
|
|
|
4509
|
$this->{$type}->{$value}++; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub existData |
67
|
|
|
|
|
|
|
{ |
68
|
21624
|
|
|
21624
|
1
|
38340
|
my ($this,$type,$value) = @_; |
69
|
21624
|
100
|
|
|
|
38046
|
if(exists $this->getSome($type)->{$value}) |
70
|
|
|
|
|
|
|
{ |
71
|
4570
|
|
|
|
|
14150
|
return 1; |
72
|
|
|
|
|
|
|
} |
73
|
17054
|
|
|
|
|
50400
|
return 0; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__END__ |