From d779ebabb8058584806f299cade204c0adc6a31f Mon Sep 17 00:00:00 2001 From: ruivilela Date: Tue, 13 Oct 2009 16:08:13 +0000 Subject: [PATCH] -- git-svn-id: https://natura.di.uminho.pt/svn/main/dicionarios/jspell.pt@7957 f5ed0195-1f1e-0410-9bbf-87de9e03ec61 --- ASPELL6/genAff.pl | 35 ++--- ASPELL_TOOLKIT/aspell-lang/CVS/Entries | 16 +- ASPELL_TOOLKIT/aspell-lang/maps/CVS/Entries | 154 ++++++++++---------- ASPELL_TOOLKIT/aspell-lang/misc/CVS/Entries | 40 ++--- HUNSPELL/genAffHunspell.pl | 35 +++-- MYSPELL/gendic.pl | 42 +++--- TOOLS/testes/checkJspell.pl | 2 +- port.yaml | 26 ++-- test-tags.pl | 2 +- 9 files changed, 177 insertions(+), 175 deletions(-) diff --git a/ASPELL6/genAff.pl b/ASPELL6/genAff.pl index cd2a06c..1a80e8b 100755 --- a/ASPELL6/genAff.pl +++ b/ASPELL6/genAff.pl @@ -12,21 +12,27 @@ #next line is generated by conta.pl (stream of letters sorted by frequency) print "TRY aerisontcdmlupvgbfzáhçqjíxãóéêâúõACMPSBTELGRIFVDkHJONôywUKXZWQÁYÍÉàÓèÂÚ\n\n"; +sub printRegra +{ + printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items at the end + for ($i=0;$i<@qui;$i++){ + print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])."\n"; + } + @ter=();@qua=();@qui=(); #clean buffer from previous flag +} + while(<>){ next if (/^wordchars/ || /^\s+$/ || /^\#/ || /^defstringtype/ || /^allaffixes/ ); if (/^prefixes$/){$pri='PFX';next;} - if (/^suffixes$/){$pri='SFX';next;} + if (/^suffixes$/){ + &printRegra; + $pri='SFX'; + undef $seg; + next; + } if (/^flag ([\*\+]?)(\w)/) { ##Flag data - $tmp=$2; - $tmp2=$1; - - if (defined($seg)){ - printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items at the end - for ($i=0;$i<@qui;$i++){ - print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])."\n"; - } - @ter=();@qua=();@qui=(); #clean buffer from previous flag - } + $tmp=$2; $tmp2=$1; + &printRegra if (defined($seg)); $seg=$tmp; $flg=$tmp2; next; @@ -49,9 +55,4 @@ $qua[-1]=~s/\-/0/; } -#Copypaste from upper lines -printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items - -for ($i=0;$i<@qui;$i++){ - print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])."\n"; -} +&printRegra; diff --git a/ASPELL_TOOLKIT/aspell-lang/CVS/Entries b/ASPELL_TOOLKIT/aspell-lang/CVS/Entries index 657d7ce..a816763 100644 --- a/ASPELL_TOOLKIT/aspell-lang/CVS/Entries +++ b/ASPELL_TOOLKIT/aspell-lang/CVS/Entries @@ -1,11 +1,11 @@ D/examples//// D/maps//// D/misc//// -/COPYING/1.1.1.1/Thu Jan 25 13:19:20 2007// -/README/1.4/Tue Mar 4 20:18:15 2008// -/configure/1.1.1.1/Thu Jan 25 13:19:20 2007// -/decomp.txt/1.2/Thu Jan 25 13:19:20 2007// -/mkchardata/1.2/Thu Jan 25 13:19:20 2007// -/pre/1.1/Thu Jan 25 13:19:19 2007// -/proc/1.5/Fri Jul 4 18:56:17 2008// -/unicode.txt/1.2/Thu Jan 25 13:19:20 2007// +/COPYING/1.1.1.1/Fri Feb 20 23:01:57 2009// +/README/1.4/Fri Feb 20 23:01:57 2009// +/configure/1.1.1.1/Fri Feb 20 23:01:57 2009// +/decomp.txt/1.2/Fri Feb 20 23:01:57 2009// +/mkchardata/1.2/Fri Feb 20 23:01:57 2009// +/pre/1.1/Fri Feb 20 23:01:57 2009// +/proc/1.5/Fri Feb 20 23:01:57 2009// +/unicode.txt/1.2/Fri Feb 20 23:01:57 2009// diff --git a/ASPELL_TOOLKIT/aspell-lang/maps/CVS/Entries b/ASPELL_TOOLKIT/aspell-lang/maps/CVS/Entries index f1b0315..e0ede6a 100644 --- a/ASPELL_TOOLKIT/aspell-lang/maps/CVS/Entries +++ b/ASPELL_TOOLKIT/aspell-lang/maps/CVS/Entries @@ -1,78 +1,78 @@ -/ascii.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1250.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1251-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1251.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1252.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1253-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1253.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1254.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1255-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1255.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1256-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1256.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1257.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cp1258.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-6438.txt/1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-1-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-1.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-10-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-10.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-11-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-11.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-13-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-13.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-14-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-14.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-15-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-15.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-16-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-16.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-2-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-2.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-3-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-3.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-4-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-4.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-5-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-5.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-6-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-6.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-7-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-7.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-8-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-8.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-9-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-8859-9.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/iso-latin.itxt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/koi8-r-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/koi8-r.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/koi8-u-nl.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/koi8-u.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/l-az.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/l-fa.txt/1.1/Thu Jan 25 13:19:20 2007// -/l-ky.txt/1.1/Thu Jan 25 13:19:20 2007// -/l-sr.txt/1.1/Thu Jan 25 13:19:20 2007// -/l-tg.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/l-tr.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/l-uz.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/s-ethi.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/tcvn3.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-armn.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-beng.txt/1.2/Thu Jan 25 13:19:20 2007// -/u-deva.txt/1.2/Thu Jan 25 13:19:20 2007// -/u-geor.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-gujr.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-guru.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-hebr.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-knda.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-mlym.txt/1.2/Tue Mar 4 20:18:20 2008// -/u-mong.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-mymr.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-orya.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-sinh.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-taml.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-telu.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-tglg.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/u-thaa.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/viscii.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// +/ascii.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1250.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1251-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1251.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1252.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1253-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1253.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1254.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1255-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1255.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1256-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1256.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1257.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/cp1258.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-6438.txt/1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-1-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-1.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-10-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-10.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-11-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-11.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-13-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-13.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-14-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-14.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-15-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-15.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-16-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-16.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-2-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-2.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-3-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-3.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-4-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-4.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-5-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-5.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-6-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-6.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-7-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-7.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-8-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-8.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-9-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-8859-9.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/iso-latin.itxt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/koi8-r-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/koi8-r.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/koi8-u-nl.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/koi8-u.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/l-az.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/l-fa.txt/1.1/Fri Feb 20 23:01:53 2009// +/l-ky.txt/1.1/Fri Feb 20 23:01:53 2009// +/l-sr.txt/1.1/Fri Feb 20 23:01:53 2009// +/l-tg.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/l-tr.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/l-uz.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/s-ethi.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/tcvn3.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-armn.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-beng.txt/1.2/Fri Feb 20 23:01:53 2009// +/u-deva.txt/1.2/Fri Feb 20 23:01:53 2009// +/u-geor.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-gujr.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-guru.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-hebr.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-knda.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-mlym.txt/1.2/Fri Feb 20 23:01:53 2009// +/u-mong.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-mymr.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-orya.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-sinh.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-taml.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-telu.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-tglg.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/u-thaa.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// +/viscii.txt/1.1.1.1/Fri Feb 20 23:01:53 2009// D diff --git a/ASPELL_TOOLKIT/aspell-lang/misc/CVS/Entries b/ASPELL_TOOLKIT/aspell-lang/misc/CVS/Entries index 16fa146..be39241 100644 --- a/ASPELL_TOOLKIT/aspell-lang/misc/CVS/Entries +++ b/ASPELL_TOOLKIT/aspell-lang/misc/CVS/Entries @@ -1,21 +1,21 @@ -/Unicode-Proc.pl/1.2/Thu Jan 25 13:19:20 2007// -/class.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/cset-cmp.pl/1.1.1.1/Thu Jan 25 13:19:20 2007// -/decomp.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/ethiopic-map.diff/1.1.1.1/Thu Jan 25 13:19:20 2007// -/ethiopic-map.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/ethiopic-names.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/l-sr.pl/1.1/Thu Jan 25 13:19:20 2007// -/lang.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/mk-dist/1.1.1.1/Thu Jan 25 13:19:20 2007// -/mk-table.pl/1.2/Thu Jan 25 13:19:20 2007// -/mkindex/1.1.1.1/Thu Jan 25 13:19:20 2007// -/mklinks/1.1.1.1/Thu Jan 25 13:19:20 2007// -/notes.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/private.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/scripts.txt/1.2/Thu Jan 25 13:19:20 2007// -/unicode.dat/1.1.1.1/Thu Jan 25 13:19:20 2007// -/unicode.txt/1.1.1.1/Thu Jan 25 13:19:20 2007// -/unimap.pl/1.1.1.1/Thu Jan 25 13:19:20 2007// -/update-ver/1.1.1.1/Thu Jan 25 13:19:20 2007// +/Unicode-Proc.pl/1.2/Fri Feb 20 23:01:57 2009// +/class.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/cset-cmp.pl/1.1.1.1/Fri Feb 20 23:01:57 2009// +/decomp.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/ethiopic-map.diff/1.1.1.1/Fri Feb 20 23:01:57 2009// +/ethiopic-map.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/ethiopic-names.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/l-sr.pl/1.1/Fri Feb 20 23:01:57 2009// +/lang.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/mk-dist/1.1.1.1/Fri Feb 20 23:01:57 2009// +/mk-table.pl/1.2/Fri Feb 20 23:01:57 2009// +/mkindex/1.1.1.1/Fri Feb 20 23:01:57 2009// +/mklinks/1.1.1.1/Fri Feb 20 23:01:57 2009// +/notes.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/private.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/scripts.txt/1.2/Fri Feb 20 23:01:57 2009// +/unicode.dat/1.1.1.1/Fri Feb 20 23:01:57 2009// +/unicode.txt/1.1.1.1/Fri Feb 20 23:01:57 2009// +/unimap.pl/1.1.1.1/Fri Feb 20 23:01:57 2009// +/update-ver/1.1.1.1/Fri Feb 20 23:01:57 2009// D diff --git a/HUNSPELL/genAffHunspell.pl b/HUNSPELL/genAffHunspell.pl index 835d1fc..6daa718 100755 --- a/HUNSPELL/genAffHunspell.pl +++ b/HUNSPELL/genAffHunspell.pl @@ -8,7 +8,7 @@ use strict; use locale; -my ($pri, $seg, @ter, @qua, @qui, $i, $tmp, $tmp2, $flg, @morf); +our ($pri, $seg, @ter, @qua, @qui, $i, $tmp, $tmp2, $flg, @morf); print "SET UTF-8\n"; #print "SET ISO8859-1\n"; @@ -21,25 +21,27 @@ #NOSUGGEST flag - can be for bad words +sub printRegra{ + printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items at the end + for ($i=0;$i<@qui;$i++){ + print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])." " x (15-length($qui[$i])).$morf[$i]."\n"; + } + @ter=();@qua=();@qui=(); @morf=(); +} + + while(<>){ next if (/^wordchars/ || /^\s+$/ || /^\#/ || /^defstringtype/ || /^allaffixes/ || /boundarychars/); s/\s*\#noispell\s*//; s/\\-/-/g; - if (/^prefixes$/){$pri='PFX';next;} - if (/^suffixes$/){$pri='SFX';next;} + if (/^prefixes$/){ $pri='PFX'; next; } + if (/^suffixes$/){ &printRegra; $pri='SFX'; undef $seg; next; } if (/^flag ([\*\+])(\w)/) { ##Flag data - $tmp=$2; - $tmp2=$1; - - if (defined($seg)){ - printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items at the end - for ($i=0;$i<@qui;$i++){ - print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])." " x (15-length($qui[$i])).$morf[$i]."\n"; - } - @ter=();@qua=();@qui=(); @morf=(); #clean buffer from previous flag - } + $tmp=$2; $tmp2=$1; + &printRegra if (defined($seg)); $seg=$tmp; $flg=$tmp2; + next; } s/\#.*//; #Strip Comments @@ -62,8 +64,5 @@ $qua[-1]=~s/^-$/0/; } -#Copypaste from upper lines #Última regra -printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items at the end -for ($i=0;$i<@qui;$i++){ - print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])." " x (15-length($qui[$i])).$morf[$i]."\n"; -} +&printRegra; + diff --git a/MYSPELL/gendic.pl b/MYSPELL/gendic.pl index 581d305..1a80e8b 100755 --- a/MYSPELL/gendic.pl +++ b/MYSPELL/gendic.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w -#Generates myspell affix rules from ispell affix rules for Portuguese -#Rui Vilela, 2005 +#Generates Aspell affix rules for Portuguese from Ispell affix rules format +#Rui Vilela, 2007 use strict; use locale; @@ -9,24 +9,30 @@ my $pri; my $seg; my @ter; my @qua; my @qui; my $i; my $tmp; my $tmp2; my $flg; print "SET ISO8859-1\n"; -#next line is generated by conta.pl (stream of letters sorted by the number of ocurrences) +#next line is generated by conta.pl (stream of letters sorted by frequency) print "TRY aerisontcdmlupvgbfzáhçqjíxãóéêâúõACMPSBTELGRIFVDkHJONôywUKXZWQÁYÍÉàÓèÂÚ\n\n"; +sub printRegra +{ + printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items at the end + for ($i=0;$i<@qui;$i++){ + print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])."\n"; + } + @ter=();@qua=();@qui=(); #clean buffer from previous flag +} + while(<>){ next if (/^wordchars/ || /^\s+$/ || /^\#/ || /^defstringtype/ || /^allaffixes/ ); if (/^prefixes$/){$pri='PFX';next;} - if (/^suffixes$/){$pri='SFX';next;} - if (/^flag ([\*\+])(\w)/) { ##Flag data - $tmp=$2; - $tmp2=$1; - - if (defined($seg)){ - printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items at the end - for ($i=0;$i<@qui;$i++){ - print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])."\n"; - } - @ter=();@qua=();@qui=(); #clean buffer from previous flag - } + if (/^suffixes$/){ + &printRegra; + $pri='SFX'; + undef $seg; + next; + } + if (/^flag ([\*\+]?)(\w)/) { ##Flag data + $tmp=$2; $tmp2=$1; + &printRegra if (defined($seg)); $seg=$tmp; $flg=$tmp2; next; @@ -49,8 +55,4 @@ $qua[-1]=~s/\-/0/; } -#Copypaste from upper lines #última regra -printf ("\n%s %s %s %d\n",$pri,$seg,$flg=~/[\*\+]/ ? 'Y' : 'N',$#ter+1); ##number of items - for ($i=0;$i<@qui;$i++){ - print "$pri $seg ".lc($ter[$i])." " x (15-length($ter[$i])).lc($qua[$i])." " x (15-length($qua[$i])).lc($qui[$i])."\n"; - } +&printRegra; diff --git a/TOOLS/testes/checkJspell.pl b/TOOLS/testes/checkJspell.pl index 73d4ebe..3f7506a 100755 --- a/TOOLS/testes/checkJspell.pl +++ b/TOOLS/testes/checkJspell.pl @@ -42,7 +42,7 @@ U => [], V => [], X => [], - Y => [], + Y => [], Z => [], a => [], b => [qw /g/], diff --git a/port.yaml b/port.yaml index e76ba92..ba2d067 100644 --- a/port.yaml +++ b/port.yaml @@ -281,19 +281,19 @@ PFSEM: outra: re- ORIG: - ing: Inglesa - lat: Latina - fra: Francesa - esp: Espanhola - pol: Polaca - rus: Russa - ita: Italiana - ale: Alemã - jap: Japonesa - isl: Islandêsa - nor: Norueguesa - cor: Coreana - gre: Grega + ing: inglesa + lat: latina + fra: francesa + esp: espanhola + pol: polaca + rus: russa + ita: italiana + ale: alemã + jap: japonesa + isl: islandêsa + nor: norueguesa + cor: coreana + gre: grega unknown: 1: sugerida diff --git a/test-tags.pl b/test-tags.pl index 809493a..ec15c79 100755 --- a/test-tags.pl +++ b/test-tags.pl @@ -8,7 +8,7 @@ $Data::Dumper::Indent = 0; -my $dic = new Lingua::Jspell "Port"; +my $dic = new Lingua::Jspell "port"; my @words = qw.Europa cavalo grande comido eu dez sexto.; for $a (@words) {