On 18 March 2013 15:41, Per Tunedal <[email protected]> wrote: > 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?
Nope. The effort it would take to modify the pipeline and all of the programs to be able to pass an error from one end to the other would be seriously misplaced, particularly, in this case, when it's a bug that a normal user should never ever see. > The offending line would be wonderful to get, but I suppose that's not > possible because the dictionaries are binarized. > It's hit and miss anyway, because libxml's idea of what is and isn't a line seems to be different to just about everything else. I think Jacob had something in dixtools that approximated this? > 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. > Yeah, that's reasonable. I guess that those of us who have been around long enough just know not to make that sort of error, and/or are quick enough at finding and fixing them that we haven't felt the need for a warning in the compiler. > More helpful error messages would save me, and probably a lot of others, > a lot of time and frustration. > I've just committed a new mode to the compiler: lt-comp -V lr sample.txt.dix g2.bin Error (48): Entry begins with space. Error (48): Entry begins with space. main@standard 14 15 It's not on by default, because this error could very well be itself in error. It also misses when the space is introduced by the use of a pardef, because... well, http://www.youtube.com/watch?v=zGxwbhkDjZM Those "48"s are supposed to be the line number. They're not. But at least you'll know that _maybe_ something is wrong. >> > BTW I hate that XML: it's too easy to introduce a minor error that >> > breaks it all. Think of it this way - with the error reporting (etc.) that we get 'for free' via XML, think of how much worse it would be in a homegrown format. -- <Sefam> Are any of the mentors around? <jimregan> yes, they're the ones trolling you ------------------------------------------------------------------------------ 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
