how to write an interactive crm program?
Thomas Michael Hagen <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
i'm using crm114 to topically classify articles from a newspaper corpus
gathered from the web over the past 10 years.
the articles live in large files that contain all the material from several
different newspapers for a single day.
my crm program goes through the file, finds each article, and classifies it.
up to this point, everything works.
this is where my problem comes in: i'm trying to make the process
interactive, so that i can tell the program whether it classified each
article correctly. to do that, i have written the following function (please
excuse gmail's lack of indentation):
:interact: {
{
isolate (:user-feedback:)
syscall () (:user-feedback:) /crm interact.crm/
match (:incorrect:) [:user-feedback:] /w/ # 'w' for wrong
output /The piece was NOT classified correctly; you input
':*:incorrect:'\n/
# here is where the DSTTTR stuff will eventually go
return
}
output /The piece was classified correctly\n/
return
}
the syscall calls the following crm program:
{
isolate (:user-input:)
output /:*:user-input:/
}
i have tried various variations over this, but i haven't been able to get
anything back from the interact.crm program, since it doesn't stop and wait
for my input to populate the variable (:user-input:). this leads to the
interact function in the main program matching on an empty string - the
(:user-feedback:) variable.
the main program runs only when it gets an EOF, as it should, but the
interact.crm program doesn't seem to require an EOF. i was hoping it would
stop to wait for my input from the terminal (ended by an EOF) before it
continued.
i haven't been able to find anything on interactivity or user input from the
terminal in the documentation. crm seems very mail-oriented.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Crm114-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crm114-general