-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
175 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ use Moose; | |
use Treex::Core::Common; | ||
extends 'Treex::Core::Block'; | ||
|
||
has 'type' => ( is => 'ro', isa => enum([qw/all gram text/]), default => 'all' ); | ||
has 'type' => ( is => 'ro', isa => enum([qw/all gram text all+special/]), default => 'all' ); | ||
|
||
sub process_tnode { | ||
my ( $self, $tnode ) = @_; | ||
|
@@ -18,25 +18,50 @@ sub process_tnode { | |
elsif ($self->type eq 'gram') { | ||
$tnode->set_attr( 'coref_gram.rf', undef ); | ||
} | ||
elsif ($self->type eq 'all') { | ||
$tnode->set_attr( 'coref_gram.rf', undef ); | ||
$tnode->set_attr( 'coref_text.rf', undef ); | ||
} | ||
else { | ||
$tnode->set_attr( 'coref_gram.rf', undef ); | ||
$tnode->set_attr( 'coref_text.rf', undef ); | ||
$tnode->set_attr( 'coref_special', undef ); | ||
} | ||
} | ||
|
||
1; | ||
__END__ | ||
=encoding utf-8 | ||
=head1 NAME | ||
Treex::Block::Coref::RemoveLinks | ||
=head1 DESCRIPTION | ||
Removes coreference links from tectogrammatical trees. | ||
=head1 PARAMETERS | ||
=over | ||
=item Treex::Block::Coref::RemoveLinks | ||
=item type | ||
Removes coreference links from tectogrammatical trees. For a purpose of | ||
testing the coreference resolving. | ||
Which type of coreference link should be deleted. Possible values: | ||
gram - grammatical coreference, | ||
text - textual coreference, | ||
all - grammatical and textual coreference, | ||
all+special - grammatical, textual and special coreference. | ||
=back | ||
=cut | ||
=head1 AUTHOR | ||
Michal Novák <[email protected]> | ||
=head1 COPYRIGHT AND LICENSE | ||
Copyright © 2011, 2015-2016 by Institute of Formal and Applied Linguistics, Charles University in Prague | ||
# Copyright 2011, 2015 Michal Novak | ||
# This file is distributed under the GNU General Public License v2. See $TMT_ROOT/README. | ||
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.