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