line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::DocumentSet; |
2
|
3
|
|
|
3
|
|
23
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
88
|
|
3
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
70
|
|
4
|
3
|
|
|
3
|
|
1191
|
use Lingua::YaTeA::Document; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
34
|
|
5
|
3
|
|
|
3
|
|
1351
|
use Lingua::YaTeA::WordFromCorpus; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
31
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new |
10
|
|
|
|
|
|
|
{ |
11
|
3
|
|
|
3
|
1
|
10
|
my ($class) = @_; |
12
|
3
|
|
|
|
|
8
|
my $this = {}; |
13
|
3
|
|
|
|
|
8
|
bless ($this,$class); |
14
|
3
|
|
|
|
|
14
|
$this->{DOCUMENTS} = []; |
15
|
3
|
|
|
|
|
16
|
$this->addDefaultDocument; |
16
|
3
|
|
|
|
|
12
|
return $this; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub getDocuments |
21
|
|
|
|
|
|
|
{ |
22
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
23
|
0
|
|
|
|
|
0
|
return $this->{DOCUMENTS}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub addDefaultDocument |
27
|
|
|
|
|
|
|
{ |
28
|
3
|
|
|
3
|
1
|
23
|
my ($this,$word) = @_; |
29
|
3
|
|
|
|
|
6
|
push @{$this->{DOCUMENTS}}, Lingua::YaTeA::Document->newDefault; |
|
3
|
|
|
|
|
26
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub addDocument |
33
|
|
|
|
|
|
|
{ |
34
|
0
|
|
|
0
|
1
|
0
|
my ($this,$word) = @_; |
35
|
0
|
0
|
|
|
|
0
|
if($Lingua::YaTeA::WordFromCorpus::counter==1) |
36
|
|
|
|
|
|
|
{ |
37
|
0
|
|
|
|
|
0
|
$this->getCurrent->update($word); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else{ |
40
|
0
|
|
|
|
|
0
|
$Lingua::YaTeA::Document::counter++; |
41
|
0
|
|
|
|
|
0
|
push @{$this->{DOCUMENTS}}, Lingua::YaTeA::Document->new($word); |
|
0
|
|
|
|
|
0
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub getCurrent |
48
|
|
|
|
|
|
|
{ |
49
|
20
|
|
|
20
|
1
|
40
|
my ($this)= @_; |
50
|
20
|
|
|
|
|
64
|
return $this->{DOCUMENTS}[-1]; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub getDocumentNumber |
54
|
|
|
|
|
|
|
{ |
55
|
2
|
|
|
2
|
1
|
7
|
my ($this) = @_; |
56
|
2
|
|
|
|
|
5
|
return scalar @{$this->{DOCUMENTS}}; |
|
2
|
|
|
|
|
8
|
|
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |