I am trying to get it so a person using the CLIPS terminal can simply enter this: The plant is yellow in color. As opposed to this, (assert(templatename(slotname "The plant is yellow in color."))) . Basically, I want the user to simply enter the sentence and then that sentence becomes the fact, no assert commands, no quotation marks. The template has only one slot (I know you shouldn't use a template then in that case, but have no choice really).
Basically, what I want is the users input to be passed to the assertion statement. The response's aren't printed out until the input end is given (I tried also running the program with input prompts, but could never get that working, partly because I have problems getting the facts to be asserted by the user after the run command is used, right now the user has to use the assert commands after loading the program, and then only after making the assertions, can they tell it to run.
Here is how I would like it to run: load clips program in terminal user types run Prompts for input: User gives input. User's inputs are used as facts until the user inputs "end" end causes the facts that were derived from the input facts to be printed out (but only the resulting facts, not the user input facts being printed again.)
The way it does run: load clips program in terminal user makes assertion statements user types run program outputs resulting facts to terminal
I know part of the solution is to use a variable with question mark at the beginning, and I tried implementing that as a variable for input, but it didn't work. Also, I think I could make this work using a batch script, but unfortunately, the entire thing has to be in CLIPS.