[spambayes-bugs] [ spambayes-Bugs-836386 ] assertion failed during
classfication
SourceForge.net
noreply at sourceforge.net
Mon Nov 10 14:29:27 EST 2003
Bugs item #836386, was opened at 2003-11-05 02:28
Message generated for change (Comment added) made by regs
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=836386&group_id=61702
Category: hammie
Group: Source code 1.0a6
Status: Open
Resolution: None
Priority: 5
Submitted By: Uwe Schmitt (rocksportrocker)
Assigned to: Nobody/Anonymous (nobody)
Summary: assertion failed during classfication
Initial Comment:
echo "boost maillinglist microsoft " | sb_filter.py
says:
Traceback (most recent call last):
File "/usr/bin/sb_filter.py", line 187, in ?
main()
File "/usr/bin/sb_filter.py", line 183, in main
action(msg)
File "/usr/bin/sb_filter.py", line 120, in filter
return h.filter(msg)
File
"/usr/lib/python2.2/site-packages/spambayes/hammie.py",
line 109, in filter
prob, clues = self._scoremsg(msg, True)
File
"/usr/lib/python2.2/site-packages/spambayes/hammie.py",
line 38, in _scoremsg
return self.bayes.spamprob(tokenize(msg), evidence)
File
"/usr/lib/python2.2/site-packages/spambayes/classifier.py",
line 158, in chi2_spamprob
clues = self._getclues(wordstream)
File
"/usr/lib/python2.2/site-packages/spambayes/classifier.py",
line 395, in _getclues
prob = self.probability(record)
File
"/usr/lib/python2.2/site-packages/spambayes/classifier.py",
line 242, in probability
assert hamcount <= nham
AssertionError
----------------------------------------------------------------------
>Comment By: Ari Gordon-Schlosberg (regs)
Date: 2003-11-10 11:29
Message:
Logged In: YES
user_id=9074
I'm seeing the same traceback when using hammie.py:
Traceback (most recent call last):
File "/usr/local/src/spambayes-1.0a7/hammie.py", line 265,
in ?
hammiebulk.main()
File "/usr/local/src/spambayes-1.0a7/hammiebulk.py", line
220, in main
filtered = h.filter(msg)
I have noticed that a fresh database fixes the problem.
I instrumented classifier.py, inserting this line before
line 242:
sys.stderr.write("hamcount = %d nham =
%d\n"%(hamcount,nham))
With a freshly created database, I'm seeing this:
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
hamcount = 0 nham = 1
>From ....
And classification works.
With the broken db, I'm seeing this:
hamcount = 1352 nham = 1427
hamcount = 1427 nham = 1427
hamcount = 8 nham = 1427
hamcount = 766 nham = 1427
hamcount = 6 nham = 1427
hamcount = 39 nham = 1427
hamcount = 27 nham = 1427
hamcount = 1318 nham = 1427
hamcount = 18 nham = 1427
hamcount = 869 nham = 1427
hamcount = 1221 nham = 1427
hamcount = 28 nham = 1427
hamcount = 826 nham = 1427
hamcount = 36 nham = 1427
hamcount = 1000 nham = 1427
hamcount = 704 nham = 1427
hamcount = 252 nham = 1427
hamcount = 4 nham = 1427
hamcount = 1667 nham = 1427
Traceback (most recent call last):
(... as above)
I've removed the asserts, which appear to be used for
debugging during development.
Any word on when/how this will be fixed?
File
"/usr/local/lib/python2.3/site-packages/spambayes/hammie.py",
line 109, in filter
prob, clues = self._scoremsg(msg, True)
File
"/usr/local/lib/python2.3/site-packages/spambayes/hammie.py",
line 38, in _scoremsg
return self.bayes.spamprob(tokenize(msg), evidence)
File
"/usr/local/lib/python2.3/site-packages/spambayes/classifier.py",
line 158, in chi2_spamprob
clues = self._getclues(wordstream)
File
"/usr/local/lib/python2.3/site-packages/spambayes/classifier.py",
line 395, in _getclues
prob = self.probability(record)
File
"/usr/local/lib/python2.3/site-packages/spambayes/classifier.py",
line 242, in probability
assert hamcount <= nham
AssertionError
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=836386&group_id=61702
More information about the Spambayes-bugs
mailing list