On Nov 8, 2009, at 11:54 AM, K Post wrote: > On Sun, Nov 8, 2009 at 2:38 PM, Thomas Eckardt/eck > <[email protected]> wrote: >> OK - now I know what you meen. AnalyseText sets $this->{report} and >> we use >> this to send the analyse report - but it is not reset to empty >> after that. >> >> Will change it. >> > > Thanks. Obviously, not urgent. Nor is this requested addition or > something like it- > > else { #norm exists, print it > > my $normdesc = ''; > if ( $norm < 0.6 ) { $normdesc = '(warning: extremely ham > heavy)'; } > elsif ( $norm < 0.9 ) { $normdesc = '(ok - slighly ham > heavy)'; } > elsif ( $norm < 1.1 ) { $normdesc = '(very good - > balanced)'; } <-- I'm guessing between .9 and 1.1 is very good > elsif ( $norm < 1.4 ) { $normdesc = '(ok - slighly spam > heavy)'; } > else { $normdesc = '(warning: extremely spam > heavy)'; } > &rb_printlog( "Corpus norm:\t%.4f %s\n", $norm, $normdesc ); > } > > > I think I've got that last line right with the printf syntax, but if > not, it's the normdesc variable that should be inserted after the norm > for that little bit of extra explanation.
Nice. Not to nitpick, but how about an effort to be case consistent. warning: extremely ham heavy - instead use - Warning: Extremely ham heavy. And is it really a warning, or an alert? What does ASSP have as a standard for defining messages? I would take from Apache, from whom many others have taken, and is widely understood: emerg - System is unstable alert - Immediate action required crit - Critical error error - Non-critical error warn - Warning notice - Normal but significant info - Informational debug - Debug level These log levels and cosmetic lines in the display the user sees should be consistent across the board. So in my opinion, if I see your messages, I think something is very wrong on the warning side. All of those are simply "info" status. Does ASSP have a messaging class, msg($status, 'the message', optional- over-ride args) this may or may not send to the log, or screen, but it is controllable, and provides consistency to all messages. Probably a good idea to localize them with variable names as well. I am not sure I agree with putting the perens in the string in the code. If you want those, those should go into the warning class as well. It is just one more area for someone to miss putting them in, and we have log lines an screen messages that take on all different forms of syntax. Just food for thought. -- Scott * If you contact me off list replace talklists@ with scott@ * ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Assp-test mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/assp-test
