pdf - Universität zu Köln
pdf - Universität zu Köln
pdf - Universität zu Köln
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
our @initial;<br />
our @order;<br />
sub new<br />
{<br />
my $proto = shift;<br />
my $class = ref($proto) || $proto;<br />
my $self = {};<br />
#sort keys of hashes by length for faster access in the encoding methods<br />
@initial= sort {length $b length $a} (keys %initial, keys %beforevowel,keys %ot<br />
@order= sort {length $b length $a} (keys %other, keys %beforevowel);<br />
}<br />
bless ($self, $class);<br />
return $self;<br />
sub generateKeys<br />
{<br />
my ($class,$name) = @_;<br />
$name=~s/\s+//g;<br />
my $pos = 0;<br />
my @codes;<br />
my $match = " ";<br />
#encode first character<br />
foreach my $char (@initial)<br />
{<br />
if (substr ($name,0,length $char) eq $char)<br />
{<br />
$match = $char;<br />
if ($pos == 0 and $initial{$match})<br />
{<br />
push @codes,$initial{$match};<br />
}<br />
elsif ((substr ($name,$pos+length $match,1) =~/[aeiouy\374\351\366\344]/)<br />
66