Skip to content

Commit

Permalink
--
Browse files Browse the repository at this point in the history
git-svn-id: https://natura.di.uminho.pt/svn/main/dicionarios/jspell.pt@7957 f5ed0195-1f1e-0410-9bbf-87de9e03ec61
  • Loading branch information
ruivilela committed Oct 13, 2009
1 parent 1a7f053 commit d779eba
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 175 deletions.
35 changes: 18 additions & 17 deletions ASPELL6/genAff.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
16 changes: 8 additions & 8 deletions ASPELL_TOOLKIT/aspell-lang/CVS/Entries
Original file line number Diff line number Diff line change
@@ -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//
154 changes: 77 additions & 77 deletions ASPELL_TOOLKIT/aspell-lang/maps/CVS/Entries
Original file line number Diff line number Diff line change
@@ -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
40 changes: 20 additions & 20 deletions ASPELL_TOOLKIT/aspell-lang/misc/CVS/Entries
Original file line number Diff line number Diff line change
@@ -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
35 changes: 17 additions & 18 deletions HUNSPELL/genAffHunspell.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
Expand All @@ -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;

42 changes: 22 additions & 20 deletions MYSPELL/gendic.pl
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
#!/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;

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;
Expand All @@ -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;
Loading

0 comments on commit d779eba

Please sign in to comment.