diff --git a/cgi/spellcheck_test.pl b/cgi/spellcheck_test.pl index bcc5584e5e0a6..78a05cfc67a81 100644 --- a/cgi/spellcheck_test.pl +++ b/cgi/spellcheck_test.pl @@ -41,6 +41,10 @@ ProductOpener::Display::init(); +# Passing values to the template +my $template_data_ref = { + lang => \&lang, +}; # MIDDLE DOT with common substitutes (BULLET variants, BULLET OPERATOR and DOT OPERATOR (multiplication)) my $middle_dot = qr/(?:\N{U+00B7}|\N{U+2022}|\N{U+2023}|\N{U+25E6}|\N{U+2043}|\N{U+204C}|\N{U+204D}|\N{U+2219}|\N{U+22C5})/i; @@ -68,16 +72,14 @@ my $text = remove_tags_and_quote(decode utf8=>param('text')); -my $html = '
The spellcheck results are based on matches in a given taxonomy.
-For words with at least 5 characters, we consider an edit distance of 1 (insert, replace or delete).
-'; +my $html; +$template_data_ref->{action_process} = $action; +$template_data_ref->{tagtype} = $tagtype; +$template_data_ref->{lc} = $lc; if ($action eq 'process') { - - $html .= "Spellcheck result for taxonomy $tagtype and language $lc:
"; - $html .= "Input | Correction | $lc tag | Canonical tag |
---|---|---|---|
$token | $tag | $tagid | $canon_tagid |