line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::ChunkingDataSubset; |
2
|
5
|
|
|
5
|
|
35
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
136
|
|
3
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
1958
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new |
8
|
|
|
|
|
|
|
{ |
9
|
16
|
|
|
16
|
1
|
35
|
my ($class) = @_; |
10
|
16
|
|
|
|
|
29
|
my $this = {}; |
11
|
16
|
|
|
|
|
28
|
bless ($this,$class); |
12
|
16
|
|
|
|
|
51
|
$this->{IF} = {}; |
13
|
16
|
|
|
|
|
28
|
$this->{POS} = {}; |
14
|
16
|
|
|
|
|
28
|
$this->{LF} = {}; |
15
|
16
|
|
|
|
|
52
|
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
|
32736
|
my ($this,$type) = @_; |
39
|
21624
|
|
|
|
|
47971
|
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
|
460
|
my ($this,$type,$value) = @_; |
63
|
244
|
|
|
|
|
4379
|
$this->{$type}->{$value}++; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub existData |
67
|
|
|
|
|
|
|
{ |
68
|
21624
|
|
|
21624
|
1
|
35665
|
my ($this,$type,$value) = @_; |
69
|
21624
|
100
|
|
|
|
36039
|
if(exists $this->getSome($type)->{$value}) |
70
|
|
|
|
|
|
|
{ |
71
|
4570
|
|
|
|
|
13795
|
return 1; |
72
|
|
|
|
|
|
|
} |
73
|
17054
|
|
|
|
|
48049
|
return 0; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__END__ |