Re: Case sensitivity in CLASSIFY and LEARN
"Ger Hobbelt" <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Sep 30, 2008 at 1:31 AM, James Lee <csejl-/[email protected]> wrote: > I'm wondering if the CLASSIFY and LEARN statements are case sensitive. If so, does that mean I have to convert all texts into the same case before feeding them into the CLASSIFY and LEARN statements to achieve higher accuracy [...] Yup, CLASSIFY and LEARN are caseSENsitive (technically, they treat each byte value as a different one and perform no (codepage/xyz/...-)conversions whatsoever). That means, in case you want case-sensitive (or other modifying) behaviour for these two fellas, you'll need to preprocess your data using, e.g, 'translate /a-z/ /A-Z/' (see CRM QUICKREF and manual for more info). > The <nocase> flag only applies to the word pattern part of the statement, correct? Perfect score! ;-) That regex is used to 'pick' the characters (or should I say: bytes) from the input, which are bundled together to form another 'word' which will be converted into a [set of] feature[s] for training (learn) or classification (classify). > In my daemonization code (using FIFO), if I feed in a buffer that's too big I get the following error and the entire program exits: > > /usr/bin/crm: *ERROR* [...] > I used the -w flag to increase Good. Warned for that issue. This is the 'proper' fix (better: the only real viable one for CRM114 ATM). > prevent the entire program from exiting in case something like this happens? For example, is it possible to ignore this error, re-initialize and carry on (to the next iteration of a loop)? Yes, you may wish to check out the 'trap' script command: you can 'catch' any ERROR with that -- FATAL errors (reported as '*FATAL*') cannot be catched though. Again, see QUICKREF and the manual (I believe it's available on the wiki, right? Didn't check; I am lazy) for some examples of use. (Of course, this bypasses the second issue when you perform 'error recovery': your client/server protocol might need an extra to signal a particular CRM114 operation went belly up this way. ;-) ) -- Met vriendelijke groeten / Best regards, Ger Hobbelt -------------------------------------------------- web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: [email protected] mobile: +31-6-11 120 978 -------------------------------------------------- ------------------------------------------------------------------------- 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=/