Treex/Core/TredView/AnnotationCommand.pm

filter: Statementstmt 53.3% 8 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 52.3% 11 / 21 CC 2 SCAR 12.5
CC
2
Cov
47%
run
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.5
« Treex/Core/Phrase.pm ↑ Summary Treex/Core/Phrase/Builder.pm »
1 package Treex::Core::TredView::AnnotationCommand;
2 2 $Treex::Core::TredView::AnnotationCommand::VERSION = '2.20151210';
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Treex::Core::Log;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub run {
7 0 ▶ my ( $command, $node ) = @_;
Subroutine run: not called CC=2 SCAR=17.9
Pod documented
8  
9 0 my ( $short_command, $argument ) = split / /, $command;
10  
11 0 print "in AnnotationCommand1\n";
12  
13 0 ▶ if ( $short_command eq 'd' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($short_command eq "d") 0 0 0
14 0 print "in AnnotationCommand2\n";
15 0 $node->set_conll_deprel($argument);
16 }
17 0 return;
18 }
19  
20 2 1;
21  
22 __END__
23  
24 =pod
25  
26 =encoding utf-8
27  
28 =head1 NAME
29  
30 Treex::Core::TredView::AnnotationCommand - simple command-line annotation interface
31  
32 =head1 VERSION
33  
34 version 2.20151210
35  
36 =head1 DESCRIPTION
37  
38 This module allows to annotate Treex files in TrEd by means
39 of a simple text-based command language. Command line dialog
40 is invoked in the Treex entension after pressing space.
41  
42 The command language will be specified in the future.
43 At this moment, the language supports only one command:
44 'd <deprel>', which fills the <deprel> value into the conll/deprel
45 attribute.
46  
47 =head1 METHODS
48  
49 =head2 Public methods
50  
51 =over 4
52  
53 =item run($command,$node)
54  
55 =back
56  
57 =head1 AUTHOR
58  
59 Zdeněk Žabokrtský <toman@ufal.mff.cuni.cz>
60  
61 =head1 COPYRIGHT AND LICENSE
62  
63 Copyright © 2012 by Institute of Formal and Applied Linguistics, Charles University in Prague
64  
65 This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
« Treex/Core/Phrase.pm ↑ Summary Treex/Core/Phrase/Builder.pm »