giellalt / bugzilla-dummy

0 stars 0 forks source link

speller-testres.pl fails on line 192 on first input line (Bugzilla Bug 492) #339

Closed albbas closed 17 years ago

albbas commented 17 years ago

This issue was created automatically with bugzilla2github

Bugzilla Bug 492

Date: 2007-08-30T10:07:15+02:00 From: Sjur Nørstebø Moshagen <> To: Saara Huhmarniemi <>

Blocker for: #491 Last updated: 2007-08-30T12:56:18+02:00

albbas commented 17 years ago

Comment 1775

Date: 2007-08-30 10:07:15 +0200 From: Sjur Nørstebø Moshagen <>

Irrespective of the content of the first line of test pairs, the script will give the following message when run:

WARNING: Output word nuvviD was not found in the input list. at script/speller-testres.pl line 193 main::read_polderland() called at script/speller-testres.pl line 67

As part of this bug, it throws away the list of suggestions. In the nuvviD-Divvun case, it means that the version string does not survive till print time. In other cases, it means that the reported test result are not correct.

I failed to understand exactly why and how this happens, so I'm filling this bug report instead.

Steps to reproduce:

make small typos.txt file in your preferred language (I tested it on smj):

nuvviD Divvun Barggibelludagá Barggijbelludagá Bárnam Bárnám Dahta Dáhta Dakkavidi Dakkavide Didjiv Didjij Dijav Dijáv Doajmmasiebbre doajmmasiebrre Doarroajvve Doarrooajvve ertaljpptsa ertaljupptsa

  1. Run the command:

$ make spelltest-pl-typos TARGET=smj

  1. you will get this output:

Reading typos from smj/src/typos.txt script/speller-testres.pl: Reading Polderland output from tmp/typos-res-smj.txt WARNING: Output word nuvviD was not found in the input list. at script/speller-testres.pl line 193 main::read_polderland() called at script/speller-testres.pl line 67 INFO: nuvviD found. at script/speller-testres.pl line 276 main::print_xml_output() called at script/speller-testres.pl line 71 INFO: nuvviD contains NO suggestions. at script/speller-testres.pl line 290 main::print_xml_output() called at script/speller-testres.pl line 71

  1. The xml file is created, and contains the following first lines:

<?xml version='1.0' encoding="UTF-8"?>

smj/src/typos.txt 20070830
Barggibelludagá Barggijbelludagá 1 SplErr 1 Barggijbelludagá Barggijbelludahka Barggijbelludagáj Barggijbelludagám Barggijbelludagán Barggijbelludagás Barggijbelludagát Barggijbelludagáv NOTE the version attribute. If the nuvviD-Divvun pair is removed from the typos.txt file, the first real typo will instead be without suggestions, compared to the 8 produced by the speller.
albbas commented 17 years ago

Comment 1784

Date: 2007-08-30 12:31:44 +0200 From: Saara Huhmarniemi <>

I haven't tested the script with the actual speller (I only imagined what the suggestions for nuvviD would look like). I was not able to download the new speller version (since the homepages seem to be down). Could you give me the speller output file typos-res-smj.txt, so that I could test with it until I have the speller installed?

albbas commented 17 years ago

Comment 1785

Date: 2007-08-30 12:36:53 +0200 From: Sjur Nørstebø Moshagen <>

Created attachment 63 speller output including nuvviD version trigger

Attached file: typos-res-smj.txt (text/plain, 2424 bytes) Description: speller output including nuvviD version trigger

albbas commented 17 years ago

Comment 1787

Date: 2007-08-30 12:56:18 +0200 From: Saara Huhmarniemi <>

The problem was that the last bug fix to the speller-testres.pl was not completed. The first entry, which forms a special case, was still not correctly handled. Now it works with the test files given here.