Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
predict case patterns of verbs using not Goi-taikei but a probabilist…
…ic model.
- Loading branch information
ryu-i
committed
Mar 29, 2007
1 parent
9b9b995
commit 75ee2da
Showing
3 changed files
with
36 additions
and
31 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use FindBin qw($Bin); | ||
unshift @INC, $Bin; | ||
use NCVTool; | ||
my $ncvtool = new NCVTool(model=>'n50', pat=>'cv'); | ||
|
||
sub predicat_case_pattern { | ||
my $pred = shift; # Bunsetsu | ||
my @type = ('GA'); | ||
if ($pred->PRED) { | ||
my %case = ( '¤ò'=>'WO', '¤Ë'=>'NI' ); | ||
for my $case (keys %case) { | ||
my $q = $case.':'.$pred->PRED; | ||
my $score = $ncvtool->get_score($q); | ||
push @type, $case{$case} if ($score and $score > 0) ; | ||
} | ||
} else { | ||
@type = ('GA', 'WO', 'NI') if ($pred->HEAD_POS =~ /^Æ°»ì/); | ||
} | ||
return @type; | ||
} | ||
|
||
1; |
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