line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::Sentence; |
2
|
3
|
|
|
3
|
|
24
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
88
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
973
|
|
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
|
56
|
my ($class,$documents) = @_; |
14
|
20
|
|
|
|
|
44
|
my $this = {}; |
15
|
20
|
|
|
|
|
42
|
bless ($this,$class); |
16
|
20
|
|
|
|
|
55
|
$this->{ID} = $counter; |
17
|
20
|
|
|
|
|
41
|
$this->{IN_DOC_ID} = $in_doc_counter; |
18
|
20
|
|
|
|
|
75
|
$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
|
38
|
my ($class) = @_; |
31
|
18
|
|
|
|
|
51
|
$start_char = 0; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub updateStartChar |
35
|
|
|
|
|
|
|
{ |
36
|
576
|
|
|
576
|
1
|
954
|
my ($class,$word) = @_; |
37
|
576
|
|
|
|
|
1106
|
$start_char += $word->getLexItem->getLength +1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub getDocument |
41
|
|
|
|
|
|
|
{ |
42
|
660
|
|
|
660
|
1
|
1004
|
my ($this) = @_; |
43
|
660
|
|
|
|
|
1502
|
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
|
502
|
my ($this) = @_; |
55
|
330
|
|
|
|
|
807
|
return $this->{IN_DOC_ID}; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |