[Spambayes] Unwanted stock solicitations

Vibe Grevsen grevsen at gmail.com
Mon Oct 23 18:13:51 CEST 2006


Hi again,

>    Kasper> Here are two test runs. First one with incorrect parameter
>    Kasper> format as in your example. Second with correct scaling
>    Kasper> parameter:
>    ...
>    Skip> Whoops!  Thanks, I'll fix that pronto.
> 
> Belay that.  Here's what's in the SpamBayes source:
> 
>    scale = options["Tokenizer", "ocrad_scale"] or 1
>    charset = options["Tokenizer", "ocrad_charset"]
>    ...
>    ocr = os.popen("ocrad -s %s -c %s -x %s -f %s 2>/dev/null" %
>                   (scale, charset, orf, pnmfile))
> 
> So I already allow the user to adjust the scaling factor and properly use
> the -s flag.  I think the incorrect usage was confined to my postings.
 
Ok, I see.

What is the meaning of the last '2' in the os.popen()-call?
If I send that to ocrad after the input-file I get the ocr followed by 'Cannot open 2'.

Also on my system I get different output formats with those calls:

ocrad -s2 -x ocr.txt Clipboard01.pgm
ocrad -s2 > ocr.txt Clipboard01.pgm

Of course I trust you know which one to use. Just telling you this in case it is something that was overlooked.


I will continue testing until we get this working on Windows.

-- 
Best regards

Vibe


More information about the SpamBayes mailing list