line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::LinguisticItem; |
2
|
5
|
|
|
5
|
|
35
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
135
|
|
3
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
1296
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new |
8
|
|
|
|
|
|
|
{ |
9
|
40
|
|
|
40
|
1
|
86
|
my ($class,$type,$form) = @_; |
10
|
40
|
|
|
|
|
69
|
my $this = {}; |
11
|
40
|
|
|
|
|
76
|
bless ($this,$class); |
12
|
40
|
|
|
|
|
103
|
$this->{TYPE} = $type; |
13
|
40
|
|
|
|
|
103
|
$this->{FORM} = $form; |
14
|
40
|
|
|
|
|
100
|
return $this; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub getForm |
18
|
|
|
|
|
|
|
{ |
19
|
124
|
|
|
124
|
1
|
212
|
my ($this) = @_; |
20
|
124
|
|
|
|
|
369
|
return $this->{FORM}; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub getType |
24
|
|
|
|
|
|
|
{ |
25
|
124
|
|
|
124
|
1
|
208
|
my ($this) = @_; |
26
|
124
|
|
|
|
|
340
|
return $this->{TYPE}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub matchesWord |
30
|
|
|
|
|
|
|
{ |
31
|
96
|
|
|
96
|
1
|
171
|
my ($this,$word) = @_; |
32
|
96
|
100
|
|
|
|
172
|
if($this->getForm eq $word->getLexItem->getAny($this->getType)) |
33
|
|
|
|
|
|
|
{ |
34
|
50
|
|
|
|
|
202
|
return 1; |
35
|
|
|
|
|
|
|
} |
36
|
46
|
|
|
|
|
161
|
return 0; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |