Re: Case sensitivity in CLASSIFY and LEARN

Bill Yerazunis <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
   From: James Lee <csejl-/[email protected]>

   It appears that CRM114 is not able to trap this particular error
   where a variable is too big for the isolated data area.  To test
   the trap statement I ran the following and saw the output fine.

   {
       window
       {
	    input (:fifo:) [nonexistentfile]
       }
       trap /.*/
       {
	    output /error caught\n/
       }
   }

   But if I provide the name of a large file (16M) that actually
   exists instead the program exits without any output.  Any idea
   what's going on here?  I'm currently running
   20070810-BlameTheSegfault.  Thanks.

Because that's not an error.  CRM114 read itself in a full buffer
worth, and that worked just fine.

Now, it _is_ an interesting question... _should_ it be an error?!?
(or at least a warning)???  

The actual code you have:

    input (:my_var:) [ some_huge_file ]

is really just a succinct way of saying:

    input (:my_var:) [ some_huge_file 0 max_bytes_available ]

   read from file "some_huge_file", 
   with initial offset of 0 bytes (that is, lseek to 0 first)
   and read a _maximum_ of max_bytes_available bytes.

which may or may not be what you want.

However, in the interim, you will find two things:

1) adding anything substantial to the isolated data pool will
   cause an error;

2) you can always just check the length of the string read in, and
   if it's too long, take appropriate action.

The second may do what you want. 

Note that in the spam classification game, we've found that the
first 2 to 8Kbytes of the message are far more important than the
rest (for one thing, if the spammer has added word salad, this cuts
the salad away).

    - Bill Yerazunis

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
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.