34 |
my @spellings; |
my @spellings; |
35 |
# FIX: doesn't work very well |
# FIX: doesn't work very well |
36 |
if ($config->{findaffix}) { |
if ($config->{findaffix}) { |
37 |
my $spelling_alt = new Lingua::Spelling::Alternative; |
foreach my $findaffix (split(/[, ]+/,x($config->{findaffix}))) { |
38 |
$spelling_alt->load_findaffix(x($config->{findaffix})); |
my $spelling_alt = new Lingua::Spelling::Alternative; |
39 |
push @spellings,$spelling_alt; |
$spelling_alt->load_findaffix($findaffix); |
40 |
|
push @spellings,$spelling_alt; |
41 |
|
} |
42 |
} |
} |
43 |
if ($config->{affix}) { |
if ($config->{affix}) { |
44 |
my $spelling_alt = new Lingua::Spelling::Alternative; |
foreach my $affix (split(/[, ]+/,x($config->{affix}))) { |
45 |
$spelling_alt->load_affix(x($config->{affix})); |
my $spelling_alt = new Lingua::Spelling::Alternative; |
46 |
push @spellings,$spelling_alt; |
$spelling_alt->load_affix($affix); |
47 |
|
push @spellings,$spelling_alt; |
48 |
|
} |
49 |
} |
} |
50 |
|
|
51 |
my $hits=0; |
my $hits=0; |
100 |
$search =~ s/^\s+//; |
$search =~ s/^\s+//; |
101 |
$search =~ s/\s+$//; |
$search =~ s/\s+$//; |
102 |
|
|
103 |
|
my %words; |
104 |
|
|
105 |
foreach (split(/\s+/,$search)) { |
foreach (split(/\s+/,$search)) { |
106 |
if (m/^([+-])(\S+)/) { |
if (m/^([+-])(\S+)/) { |
107 |
$s.= ($s) ? "and " : ""; |
$s.= ($s) ? "and " : ""; |