From: Bill Y. <ws...@me...> - 2004-09-21 00:27:48
|
From: Jeffrey Rice <jef...@fi...> At 01:35 PM 9/20/2004, Bill Yerazunis wrote: >You _will_ need to redo the mailfilter.crm program, because it >uses only two .css files. Can we get any hints on how to do this? I am getting better at CRM's syntax but this seems a little too much. How does one get CRM to decide between the best match amoung several css files? Well, in the CLASSIFY statement, you can have any number (as long as it's less than 127) .css files: CLASSIFY [:mytext:] (file1.css file2.css file3.css ...) (:stats:)... Then, get the result by using MATCHs to take apart the :stats: variable; the second line says: Best match to file #somenumber (somefilename.css), weight... So, just grab the filename (with a MATCH statement- don't forget to put escaping backslashes in front of the literal parens): MATCH [:stats:] ( :: :best_file_name: ) /\(([^\)]+)\)/ and now :best_file_name: is the name of the .css file that matched best. Also, I have been monkeying around and was wondering if someone could explain the differences between microgroom and the Arne optimization. Microgrooming is a way to handle overflowing .css files. It selectively (and randomly!) deletes old, mostly-insignificant data to make room for new, more significant data. Arne optimization uses the fact that if "foo" is not in the database, then "foo bar" can't be there either- and skips all of the tests associated with looking for "foo bar" automagically. Of course, you can't do this if microgrooming has thrown away the "foo". That's why you should either use microgrooming or Arne optimization, but never both - and you should stay consistent in which you choose to use. -Bill Yerazunis |