[spambayes-dev] [Spambayes] Unwanted stock solicitations
Luigi Pugnetti
pl at symbolic.it
Mon Nov 6 08:46:28 CET 2006
moved to spambayes-dev as requested by some people.
as a note the first part of the message is referring to a mail from Vibe
Grevsen
On Sun, 2006-11-05 at 13:12 -0600, skip at pobox.com wrote:
> 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.
as long as python returns a short path you have no problem otherwise you
could get a path with a space (like c:\Document and Settings\...).
It's could be required also on Linux (but as already said it's unlikely
you get a path that requires quote there).
Putting quotes around pnmfile does no harm and may protect you from
unusual setup
>
> >> 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:
>
yes this was a "language" problem. what I meant was you get no info
because it's always empty.
sorry for the error.
> for line in open(orf):
> if line.startswith("lines"):
> nlines = int(line.split()[1])
> if nlines:
> ctokens.add("image-text-lines:%d" %
> int(log2(nlines)))
>
> so no image-text-lines:NN tokens are generated.
>
> Skip
--
Luigi Pugnetti
Symbolic S.p.A.
V.le Mentana, 29
I-43100 Parma
Italy
Tel: +39 0521 708811
Fax: +39 0521 776190
More information about the spambayes-dev
mailing list