Did you know Bot Libre also provides free hosted forums for your own website or mobile app?
Self, AIML, and scripting : Evaluation flow, declaring new :response sentences and miscelany

RE: Evaluation flow, declaring new :response sentences and miscelany

by aazxcqwe posted Jan 23 2015, 1:41

Well they say third times a charm. I've retyped this message now a few times (partly my fault, partly because the webpage doesn't stay connected after a while). Anyway, I was thinking the typo was intentional to prevent unintended access ;), ;). I think I will need to at least tag the sentence subject and refer everything else to that. Thank goodness the internal scripts already check Wiktionary for parts of speech. I'm considering using MindMeld API for processing instead of reinventing the wheel (if you have any other suggestions, I'm all ears). I was having difficulties sending variable definitions from one state to another when using 'parallel' state processing. In fact, I was even unable to maintain declarations from a main state into a nested state. Below is some code to show this. I was trying to determine if an association had already been made, and if not create one. Any suggestion on structure or syntax? I'm assuming since it is parsing each word to the 'sentenceState' on the second word it will go to 'State:verify' determine if there is no association (I was using the commented out 'is related to' operation, but have it fixed to false now) and then append "1" to the response before returning it in 'State:response'. Moreover, if I used parallel state processing why wouldn't the setting of :is1 to #false be maintained? Is there a global variable I could appropriate for this?

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Initial Self programmed state machine for Comprehension
// This state machine is used by the bot to program itself.
State:Associate {
    case :input goto State:sentenceState for each #word of :sentence;
    // case :input goto State:sentenceState for each #word of :sentence;
    
    :input {
        set #input to :sentence;
        set #speaker to :speaker;
        set #comment to "// case :input goto State:sentenceState for each #word of :sentence;
";
        set #comment to "
";
        set #conversation to :conversation;
        set #target to :target;
    }
    :sentence {
        set #instantiation to #sentence;
    }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Id: 716254
Posted: Jan 23 2015, 1:41
Updated: Jan 23 2015, 1:44
Replies: 0
Views: 2111, today: 1, week: 3, month: 20
0 0 0.0/5