Revision: 8223
http://languagetool.svn.sourceforge.net/languagetool/?rev=8223&view=rev
Author: dominikoeo
Date: 2012-10-14 17:27:14 +0000 (Sun, 14 Oct 2012)
Log Message:
-----------
[br] More fixes to script that creates Breton POS tag dictionary.
Patch from Thierry Vignaud with some modifications.
Modified Paths:
--------------
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/br/create-lexicon.pl
Modified:
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/br/create-lexicon.pl
===================================================================
---
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/br/create-lexicon.pl
2012-10-14 12:59:13 UTC (rev 8222)
+++
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/br/create-lexicon.pl
2012-10-14 17:27:14 UTC (rev 8223)
@@ -77,14 +77,15 @@
$hard = s/^([bdg])/$hard{$1}/ier if /^[bdg]/i;
if (/^[bdgkmpt]/i) {
$soft = $_;
- # prevent 'Ghanaianed' => 'C’hhanaianed' (instead of 'C’hanaianed').
- $soft =~ s/^(g)h/$1/i;
- # special cases for 'Gw.*' & 'Gou[ei].*' roots.
- $soft =~ s/^g(w)/w/;
- $soft =~ s/^G(w)/W/i;
if (/^gou[ei]/i) {
- $soft =~ s/^g/o/;
- $soft =~ s/^G/O/;
+ $soft =~ s/^g[oO]/o/;
+ $soft =~ s/^G[oO]/O/;
+ } else {
+ # prevent 'Ghanaianed' => 'C’hhanaianed' (instead of 'C’hanaianed').
+ $soft =~ s/^(g)h/$1/i;
+ # special cases for 'Gw.*' & 'Gou[ei].*' roots.
+ $soft =~ s/^g[wW]/w/;
+ $soft =~ s/^G[wW]/W/;
}
$soft =~ s/^([bdgkmpt])/$soft{$1}/ie;
}
@@ -1953,9 +1954,9 @@
}
my ($first_letter_lemma) = $lemma =~ /^(gw|[ktpgdbm]).*/i;
- $first_letter_lemma = "" unless (defined $first_letter_lemma);
+ $first_letter_lemma = "" unless defined $first_letter_lemma;
my ($first_letter_word) = $word =~ /^([kg]w|c’h|[gdbzfktvpw]).*/i;
- $first_letter_word = "" unless (defined $first_letter_word);
+ $first_letter_word = "" unless defined $first_letter_word;
$first_letter_lemma = lc $first_letter_lemma;
$first_letter_word = lc $first_letter_word;
@@ -2036,11 +2037,11 @@
print OUT "giz\tkiz\tN f s M:1:1a:\n";
print "Lemma words missing from dictionary:\n";
-foreach (sort keys %all_lemmas) { print "$_\n" unless (exists $all_words{$_});
}
+foreach (sort keys %all_lemmas) { print "$_\n" unless exists $all_words{$_}; }
# Check whether some words in anv_lies_tud have are missing in dictionary.
foreach (sort keys %anv_lies_tud) {
- print STDERR "*** plural noun [$_] is missing in Apertium dictionary.\n"
unless ($anv_lies_tud{$_});
+ print STDERR "*** plural noun [$_] is missing in Apertium dictionary.\n"
unless $anv_lies_tud{$_};
}
`java -jar morfologik-stemming-nodict-1.4.0.jar tab2morph -i
apertium-br-fr.br.dix-LT.txt -o output.txt`;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits