spambayes/spambayes Corpus.py,1.20,1.21

"Tony Meyer" <[email protected]>
Newsgroups gmane.mail.spam.spambayes.cvs
Message-ID <[email protected]>
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15429/spambayes

Modified Files:
	Corpus.py 
Log Message:
Remove the code that removed the notations from messages as this is now
handled more centrally elsewhere.

Index: Corpus.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/Corpus.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Corpus.py	14 Jul 2004 07:15:38 -0000	1.20
--- Corpus.py	16 Mar 2005 03:22:53 -0000	1.21
***************
*** 185,214 ****
          msg = fromcorpus[key]
          msg.load() # ensure that the substance has been loaded
- 
-         # If the notate_to or notate_subject options are set, then the
-         # message in the cache has this information, and it will get used
-         # in training, which is not ideal.  So if that option is set, strip
-         # that data before training.  The only time I can see this failing
-         # is if the option is changed at some point, so older messages
-         # don't have the notation, but some other program did do the same
-         # notation, which would be lost. This shouldn't be a big deal,
-         # though.
-         if fromCache:
-             for header, header_opt in (("Subject", "notate_subject"),
-                                        ("To", "notate_to")):
-                 # For Python 2.2, which doesn't allow "string in string".
-                 if isinstance(options["Headers", header_opt],
-                               types.StringTypes):
-                     notate_opt = (options["Headers", header_opt],)
-                 else:
-                     notate_opt = options["Headers", header_opt]
- 
-                 for opt, tag in (("ham", "header_ham_string"),
-                                  ("spam", "header_spam_string"),
-                                  ("unsure", "header_unsure_string")):
-                     if opt in notate_opt and msg[header] is not None and \
-                        msg[header].startswith("%s," % options["Headers", tag]):
-                         msg.replace_header(header, msg[header][len(tag)+1:])
- 
          fromcorpus.removeMessage(msg)
          self.addMessage(msg)
--- 185,188 ----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.