[Spambayes] Unwanted stock solicitations

skip at pobox.com skip at pobox.com
Sun Nov 5 20:12:32 CET 2006

Okay, I'm finally actually editing the necessary files.

    2> is supported by WinNT, 2k and XP I just newer saw it used before.
    2> is not supported in Win9x and ME.

I don't think we care about Win9x or WinME (though someone should feel free
to demonstrate my ignorance here).

    >> However /dev/null is - of course - not found in Windows. Equivalent
    >> is nul (case insensitive).  Better use os.path.devnull like shown
    >> here. Parenthesis required for string formatting!

Correct.  Will be checked in shortly.

    Luigi> On windows you have to put quote around pnmfile to protect
    Luigi> against space in path ...

Not a problem here, since the pnmfile is named using the tempfile.mkstemp
function.  It won't contain any characters which require special treatment.

    >> Finally I was surprised to find that
    >> ocrad -s4 -x out.txt >ocr.txt logo.pgm
    >> did produce an ocr.txt but no out.txt for this image
    >> http://www.unlockaarhus.dk/dev/logo.pgm.
    >> Maybe it's only a problem with small images? Could you please test if
    >> this is the case under Unix as well?

    Luigi> using -s (and other flags as well) disable -x.

Hmmm...  That sucks.  I see the lines in ocrad's code where that happens.  I
mailed a note to bug-ocrad asking why this is so.  Hopefully it's just a
simple bug that can be squashed.

    Luigi> orf file is never used. probably is there from the start before
    Luigi> skip introduce the scale parameter

Actually, yes, it is used:

    for line in open(orf):
        if line.startswith("lines"):
            nlines = int(line.split()[1])
            if nlines:
                ctokens.add("image-text-lines:%d" %

so no image-text-lines:NN tokens are generated.


More information about the SpamBayes mailing list