Skip to content

Commit

Permalink
Search 'GA' first and then throw out if the argument does not satisfy
Browse files Browse the repository at this point in the history
co-occurence restriction.
  • Loading branch information
mamorlis committed Apr 20, 2007
1 parent 6acb6ff commit 58438df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions mugicha/bin/classify_hier.pl
Expand Up @@ -11,6 +11,7 @@

use MyCabocha;
use NCVTool;
my $ncvtool = new NCVTool;

use English;
local $LIST_SEPARATOR = '';
Expand Down Expand Up @@ -267,14 +268,17 @@ sub tournament {

sub set_event_arg {
my ($event, $vframe, $arg) = @_;
return if ($ncvtool->get_score($arg->get_surface.$vframe) < 0);
my $case = (split q[:], $vframe)[1];
my $event_str;
my $arg_id = $arg->get_text_id.':'.$arg->get_chunk_id.':'.$arg->get_id;
my %marker = ( '' => 'GA', '' => 'WO', '' => 'NI' );
my $event_str = $event->get_relation;
if ($event->get_type eq 'event') {
$event_str = 'TYPE:event EVENT:'.$marker{$case}.'='.$arg_id;
} else {
$event_str = $event->get_relation.','.$marker{$case}.'='.$arg_id;
if ($event->get_relation =~ m/EVENT:/gmx) {
$event_str = $event->get_relation.','.$marker{$case}.'='.$arg_id;
} else {
$event_str = 'TYPE:event EVENT:'.$marker{$case}.'='.$arg_id;
}
}
$event->set_relation($event_str);
}
Expand Down
2 changes: 1 addition & 1 deletion mugicha/bin/predict_case.pl
Expand Up @@ -10,7 +10,7 @@

sub predict_case {
my $morph = shift; # Morph
my @type;
my @type = ('GA');
if ($morph->get_type eq 'event') {
my %case = ( '¤¬' => 'GA', '¤ò'=>'WO', '¤Ë'=>'NI' );
for my $case (keys %case) {
Expand Down

0 comments on commit 58438df

Please sign in to comment.