| 1 | package Treex::Block::Read::Treex; | ||||||||||
| 2 | 1 | $Treex::Block::Read::Treex::VERSION = '2.20210102'; | |||||||||
| 3 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Treex::Core::Common; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | extends 'Treex::Block::Read::BaseReader'; | |||||||||
| 6 | 1 | with 'Treex::Block::Read::BaseSplitterRole'; | |||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub next_document { | ||||||||
|
Subroutine
next_document: not called CC=3 SCAR=24.8
| |||||||||||
| 9 | 0 | my ($self, $filename) = @_; | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | if ( ! $filename ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | 0 | $filename = $self->next_filename(); | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | # No more documents in the queue | ||||||||||
| 16 | 0 | ▶ | return if ! $filename; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | |||||||||||
| 18 | # load the document from file using Treex::Core::Document->new({filename=>$filename}) which uses Treex::PML | ||||||||||
| 19 | 0 | return $self->new_document($filename); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1 | 1; | |||||||||
| 23 | |||||||||||
| 24 | __END__ | ||||||||||