| 1 | package Treex::Core::TredView::LineStyles; | ||||||||||
| 2 | 3 | $Treex::Core::TredView::LineStyles::VERSION = '2.20210102'; | |||||||||
| 3 | 3 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use Treex::Core::Log; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | |||||||||||
| 7 | 3 | has '_dash' => ( | |||||||||
| 8 | is => 'ro', | ||||||||||
| 9 | isa => 'HashRef[Str]', | ||||||||||
| 10 | builder => '_build_dash', | ||||||||||
| 11 | ); | ||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub _build_dash { | ||||||||
|
Subroutine
_build_dash: not called CC=1 SCAR=6.9
| |||||||||||
| 14 | return { | ||||||||||
| 15 | # just alignment lines are dashed, others are plain | ||||||||||
| 16 | 0 | 'alignment' => '5,3', | |||||||||
| 17 | 'left' => '5,3', | ||||||||||
| 18 | 'right' => '5,3', | ||||||||||
| 19 | 'int' => '5,3', | ||||||||||
| 20 | 'gdfa' => '5,3', | ||||||||||
| 21 | 'revgdfa' => '5,3', | ||||||||||
| 22 | 'rule-based' => '5,3', | ||||||||||
| 23 | 'monolingual' => '5,3', | ||||||||||
| 24 | 'coref_supervised' => '5,3', | ||||||||||
| 25 | 'coref_gold' => '5,3', | ||||||||||
| 26 | 'copy' => '5,3', | ||||||||||
| 27 | }; | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | sub dash_style { | ||||||||
|
Subroutine
dash_style: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 32 | 0 | my ( $self, $code ) = @_; | |||||||||
| 33 | |||||||||||
| 34 | # try to truncate complex alignment types to first one (e.g. "gdfa.int.left.right.revgdfa" -> "gdfa") | ||||||||||
| 35 | 0 | ▶ | $code =~ s/\..*// if ( not exists $self->_dash->{$code} ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | # return dash type or nothing | ||||||||||
| 37 | 0 | ▶ | return defined( $self->_dash->{$code} ) ? $self->_dash->{$code} : '' ; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | |||||||||||
| 41 | 3 | 1; | |||||||||
| 42 | |||||||||||
| 43 | __END__ | ||||||||||