line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::Sentence; |
2
|
3
|
|
|
3
|
|
21
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
89
|
|
3
|
3
|
|
|
3
|
|
26
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
981
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $counter = 0; |
6
|
|
|
|
|
|
|
our $in_doc_counter = 0; |
7
|
|
|
|
|
|
|
our $start_char = 0; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
20
|
|
|
20
|
1
|
43
|
my ($class,$documents) = @_; |
14
|
20
|
|
|
|
|
46
|
my $this = {}; |
15
|
20
|
|
|
|
|
43
|
bless ($this,$class); |
16
|
20
|
|
|
|
|
49
|
$this->{ID} = $counter; |
17
|
20
|
|
|
|
|
36
|
$this->{IN_DOC_ID} = $in_doc_counter; |
18
|
20
|
|
|
|
|
72
|
$this->{DOCUMENT} = $documents->getCurrent; |
19
|
20
|
|
|
|
|
63
|
return $this; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub resetInDocCounter |
23
|
|
|
|
|
|
|
{ |
24
|
0
|
|
|
0
|
1
|
0
|
my ($class) = @_; |
25
|
0
|
|
|
|
|
0
|
$in_doc_counter = 0; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub resetStartChar |
29
|
|
|
|
|
|
|
{ |
30
|
18
|
|
|
18
|
1
|
43
|
my ($class) = @_; |
31
|
18
|
|
|
|
|
48
|
$start_char = 0; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub updateStartChar |
35
|
|
|
|
|
|
|
{ |
36
|
576
|
|
|
576
|
1
|
988
|
my ($class,$word) = @_; |
37
|
576
|
|
|
|
|
1106
|
$start_char += $word->getLexItem->getLength +1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub getDocument |
41
|
|
|
|
|
|
|
{ |
42
|
660
|
|
|
660
|
1
|
1051
|
my ($this) = @_; |
43
|
660
|
|
|
|
|
1659
|
return $this->{DOCUMENT}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub getID |
47
|
|
|
|
|
|
|
{ |
48
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
49
|
0
|
|
|
|
|
0
|
return $this->{ID}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub getInDocID |
53
|
|
|
|
|
|
|
{ |
54
|
330
|
|
|
330
|
1
|
557
|
my ($this) = @_; |
55
|
330
|
|
|
|
|
881
|
return $this->{IN_DOC_ID}; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |