[Spambayes-checkins]
spambayes README.txt,1.40,1.41 TestDriver.py,1.27,1.28
Tester.py,1.7,1.8 chi2.py,1.7,1.8 classifier.py,1.48,1.49
hammie.py,1.36,1.37 hammiesrv.py,1.9,1.10 mboxcount.py,1.2,1.3
mboxtest.py,1.9,1.10 neiltrain.py,1.3,1.4 rebal.py,1.8,1.9
sets.py,1.1,1.2 splitn.py,1.3,1.4 splitndirs.py,1.6,1.7
tokenizer.py,1.62,1.63
Just van Rossum
jvr@users.sourceforge.net
Thu Nov 7 22:30:40 2002
- Previous message: [Spambayes-checkins]
spambayes/pspam/pspam folder.py,1.1,1.2 profile.py,1.2,1.3
- Next message: [Spambayes-checkins] spambayes README.txt,1.40,1.41
TestDriver.py,1.27,1.28 Tester.py,1.7,1.8 chi2.py,1.7,1.8
classifier.py,1.48,1.49 hammie.py,1.36,1.37 hammiesrv.py,1.9,1.10
mboxcount.py,1.2,1.3 mboxtest.py,1.9,1.10 neiltrain.py,1.3,1.4 rebal.py,1.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/spambayes/spambayes
In directory usw-pr-cvs1:/tmp/cvs-serv25250
Modified Files:
README.txt TestDriver.py Tester.py chi2.py classifier.py
hammie.py hammiesrv.py mboxcount.py mboxtest.py neiltrain.py
rebal.py sets.py splitn.py splitndirs.py tokenizer.py
Log Message:
Mass checkin: Remain compatible with Python 2.2. Only tested with pop3proxy.py.
Index: README.txt
===================================================================
RCS file: /cvsroot/spambayes/spambayes/README.txt,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** README.txt 27 Oct 2002 22:04:32 -0000 1.40
--- README.txt 7 Nov 2002 22:30:02 -0000 1.41
***************
*** 24,28 ****
too small to measure reliably across that much training data.
! The code in this project requires Python 2.2.1 (or later).
--- 24,28 ----
too small to measure reliably across that much training data.
! The code in this project requires Python 2.2 (or later).
Index: TestDriver.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/TestDriver.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** TestDriver.py 20 Oct 2002 05:19:48 -0000 1.27
--- TestDriver.py 7 Nov 2002 22:30:04 -0000 1.28
***************
*** 31,34 ****
--- 31,41 ----
from Histogram import Hist
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
def printhist(tag, ham, spam, nbuckets=options.nbuckets):
print
Index: Tester.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Tester.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Tester.py 20 Oct 2002 04:01:08 -0000 1.7
--- Tester.py 7 Nov 2002 22:30:04 -0000 1.8
***************
*** 1,4 ****
--- 1,11 ----
from Options import options
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
class Test:
# Pass a classifier instance (an instance of Bayes).
Index: chi2.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/chi2.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** chi2.py 16 Oct 2002 21:31:19 -0000 1.7
--- chi2.py 7 Nov 2002 22:30:05 -0000 1.8
***************
*** 1,4 ****
--- 1,11 ----
import math as _math
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
def chi2Q(x2, v, exp=_math.exp, min=min):
"""Return prob(chisq >= x2, with v degrees of freedom).
Index: classifier.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/classifier.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** classifier.py 4 Nov 2002 21:24:52 -0000 1.48
--- classifier.py 7 Nov 2002 22:30:05 -0000 1.49
***************
*** 37,40 ****
--- 37,48 ----
from Options import options
from chi2 import chi2Q
+
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
LN2 = math.log(2) # used frequently by chi-combining
Index: hammie.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/hammie.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** hammie.py 6 Nov 2002 02:07:42 -0000 1.36
--- hammie.py 7 Nov 2002 22:30:05 -0000 1.37
***************
*** 53,56 ****
--- 53,63 ----
from Options import options
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
program = sys.argv[0] # For usage(); referenced by docstring above
Index: hammiesrv.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/hammiesrv.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** hammiesrv.py 1 Nov 2002 02:55:32 -0000 1.9
--- hammiesrv.py 7 Nov 2002 22:30:06 -0000 1.10
***************
*** 30,33 ****
--- 30,40 ----
import hammie
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
program = sys.argv[0] # For usage(); referenced by docstring above
Index: mboxcount.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/mboxcount.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mboxcount.py 6 Nov 2002 01:58:35 -0000 1.2
--- mboxcount.py 7 Nov 2002 22:30:07 -0000 1.3
***************
*** 36,39 ****
--- 36,46 ----
from mboxutils import get_message
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
program = sys.argv[0]
Index: mboxtest.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/mboxtest.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** mboxtest.py 23 Sep 2002 21:20:10 -0000 1.9
--- mboxtest.py 7 Nov 2002 22:30:07 -0000 1.10
***************
*** 33,36 ****
--- 33,43 ----
from Options import options
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
mbox_fmts = {"unix": mailbox.PortableUnixMailbox,
"mmdf": mailbox.MmdfMailbox,
Index: neiltrain.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/neiltrain.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** neiltrain.py 27 Sep 2002 21:18:18 -0000 1.3
--- neiltrain.py 7 Nov 2002 22:30:07 -0000 1.4
***************
*** 13,16 ****
--- 13,23 ----
import mboxutils
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
program = sys.argv[0] # For usage(); referenced by docstring above
Index: rebal.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/rebal.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rebal.py 29 Sep 2002 16:55:10 -0000 1.8
--- rebal.py 7 Nov 2002 22:30:07 -0000 1.9
***************
*** 46,49 ****
--- 46,56 ----
import getopt
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
# defaults
NPERDIR = 4000
Index: sets.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/sets.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sets.py 22 Sep 2002 06:58:36 -0000 1.1
--- sets.py 7 Nov 2002 22:30:07 -0000 1.2
***************
*** 60,63 ****
--- 60,70 ----
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
class BaseSet(object):
"""Common base class for mutable and immutable sets."""
Index: splitn.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/splitn.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** splitn.py 6 Nov 2002 02:02:08 -0000 1.3
--- splitn.py 7 Nov 2002 22:30:08 -0000 1.4
***************
*** 48,51 ****
--- 48,58 ----
import mboxutils
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
program = sys.argv[0]
Index: splitndirs.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/splitndirs.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** splitndirs.py 6 Nov 2002 02:02:43 -0000 1.6
--- splitndirs.py 7 Nov 2002 22:30:08 -0000 1.7
***************
*** 55,58 ****
--- 55,65 ----
import mboxutils
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
program = sys.argv[0]
Index: tokenizer.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/tokenizer.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** tokenizer.py 6 Nov 2002 02:12:47 -0000 1.62
--- tokenizer.py 7 Nov 2002 22:30:08 -0000 1.63
***************
*** 16,19 ****
--- 16,26 ----
from mboxutils import get_message
+ try:
+ True, False
+ except NameError:
+ # Maintain compatibility with Python 2.2
+ True, False = 1, 0
+
+
# Patch encodings.aliases to recognize 'ansi_x3_4_1968'
from encodings.aliases import aliases # The aliases dictionary
- Previous message: [Spambayes-checkins]
spambayes/pspam/pspam folder.py,1.1,1.2 profile.py,1.2,1.3
- Next message: [Spambayes-checkins] spambayes README.txt,1.40,1.41
TestDriver.py,1.27,1.28 Tester.py,1.7,1.8 chi2.py,1.7,1.8
classifier.py,1.48,1.49 hammie.py,1.36,1.37 hammiesrv.py,1.9,1.10
mboxcount.py,1.2,1.3 mboxtest.py,1.9,1.10 neiltrain.py,1.3,1.4 rebal.py,1.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Spambayes-checkins
mailing list