Hi again, I would really appreciate if Apertium produced more helpful error messages.
Couldn't Apertium at least display in which dictionary an error is found? The offending line would be wonderful to get, but I suppose that's not possible because the dictionaries are binarized. The compiler finds most errors and is very helpful. It displays both the dictionary and the line number. Maybe the compiler could be able to find some more errors; I've done this mistake (initial blanks in an entry) a few more times when editing the dictionaries. More helpful error messages would save me, and probably a lot of others, a lot of time and frustration. Yours, Per Tunedal On Mon, Mar 18, 2013, at 10:15, Francis Tyers wrote: > El dl 18 de 03 de 2013 a les 09:16 +0100, en/na Per Tunedal va escriure: > > Hi, > > I wanted to test the pair sv-da after doing lots of additions. > > Compilation was OK, but translation doesn't work: > > > > per@debian1:~/Repository/apertium-sv-da$ echo "Det var nog på > > 1970-talet, tror jag. Det var hårt att leva på 1100-talet." | apertium > > -d /home/per/Repository/apertium-sv-da sv-da > > Error: Invalid dictionary (hint: entry beginning with whitespace). > > > > I haven't any clue in what dictionary or on which line I should look for > > the error. I've glanced through the added entries and corrected other > > kinds of errors I've found. I've searched for excessive blanks with > > Notepad++. I've ran Winmerge without finding anything. Now I've ran out > > of ideas. > > > > I cannot figure out how to find the lurking error(s) :-( > > > > BTW I hate that XML: it's too easy to introduce a minor error that > > breaks it all. > > Oops, I got the dictionary wrong: > $ echo "Det var nog på 1970-talet, tror jag." | apertium -d . > sv-da-tagger > ^Det<prn><pers><p3><nt><sg><nom>$ ^vara<vbser><past><actv>$ ^nog<adv>$ > ^på<pr>$ ^1970<num>$-^tal<n><nt><sg><def><nom>$^,<cm>$ > ^tro<vblex><pres><actv>$ > ^jag<prn><pers><p1><un><sg><nom>$^.<sent>$^.<sent>$ > > This works, means it's not the Swedish dict. > > $ echo "Det var nog på 1970-talet, tror jag." | apertium -d . > sv-da-biltrans > ^Det<prn><pers><p3><nt><sg><nom>/Det<prn><pers><p3><nt><sg><nom>$ > ^vara<vbser><past><actv>/være<vbser><past><actv>$ ^nog<adv>/nok<adv>$ > ^på<pr>/på<pr>$ > ^1970<num>/1970<num>$-^tal<n><nt><sg><def><nom>/tale<n><ut><sg><def><nom>$^,<cm>/,<cm>$ > ^tro<vblex><pres><actv>/tro<vblex><pres><actv>$ > ^jag<prn><pers><p1><un><sg><nom>/jeg<prn><pers><p1><un><sg><nom>$^.<sent>/.<sent>$^.<sent>/.<sent>$ > > This works, means it's not the bilingual dict. > > $ echo "Det var nog på 1970-talet, tror jag." | apertium -d . > sv-da-transfer | lt-proc -g sv-da.autogen.bin > Error: Invalid dictionary (hint: entry beginning with whitespace) > > This doesn't work, means it's the Danish dict. > > Let's look in the Danish dict for entries beginning with whitespace: > > $ lt-expand apertium-sv-da.da.dix | grep '^ \+' | head > letvægtsanker: letvægtsanker<n><nt><sg><ind><nom> > letvægtsankerNON_ANALYSIS: > letvægtsanker<n><nt><sg><ind><nom>DUE_TO_LT_PROC_HANG > letvægtsankerNON_ANALYSIS: > letvægtsanker<n><nt><sg><ind>DUE_TO_LT_PROC_HANG > > <e lm="letvægtsanker" c="domain:sjöochhav" a="PT"> <i> > letvægtsank</i><par n="ank/er__n"/></e> > > You have an extra space there. > > You could have also searched for '<i> ' in your editor. Or, '<i><b\/>' > > I removed it, now you get: > > $ echo "Det var nog på 1970-talet, tror jag." | apertium -d . > sv-da-transfer | lt-proc -g sv-da.autogen.bin > Det var nok på 1970-talen, tror jeg.. > > Fran > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Apertium-stuff mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/apertium-stuff ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Apertium-stuff mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/apertium-stuff
