સુધારો કરવા માટે અમારા Platinum સેવા અને વિચાર તમારા પોતાના વૈવિધ્યપૂર્ણ રચાયેલ 3D અવતાર
Self, AIML, and scripting : Evaluation flow, declaring new :response sentences and miscelany

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

દ્વારા admin પોસ્ટ Jan 25 2015, 16:37

Good idea on adding some sort of condition or processing to a case. Right now you could go to another case and assign a variable in a do() then use a "return" to go back to the original state. I think the NounVerbAdjective script does this in places.

Any variable will match any word unless you put some condition on it. So :question will match everything. To only match question words you would use,

:question {
    set #instantiation #question;
}

Also :unknown word will match any word again. If you want to check for a unknown word you could define it as,

:unknown {
    exclude #meaning :anything;
}

Note, that the Wiktionary process runs in the background, so will learn new words after the sentence has been processed. That is why the bot will normally not understand something new the first time, then understand it when you repeat it.

Also,

> case :? goto State:subjectVerbState;
to match a "?" you need it in quotes,

case "?" goto State:subjectVerbState;


ને: 719618
પોસ્ટ: Jan 25 2015, 16:37
સુધારાશે: Jan 25 2015, 16:39
જવાબો: 0
જોવાઈ: 1257, આજે: 2, સપ્તાહ: 2, મહિને: 2
મને ખાતરી છે કે છું
ધ્વજ પોસ્ટ તરીકે અપમાનજનક, અથવા ઉલ્લંઘન સાઇટ નિયમો