| 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
| |||||||||||
| 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. | ||||||||||