Input word quoting versus variable and Parts of speech branching |
Hello. I'm clarifying an proposition for an alternate sentence evaluation flow, but first I have a few smaller questions.
// Initial Self programmed state machine for Comprehension
// This state machine is used by the bot to program itself.
State:(whatcan)youdo {
:sentence {
set #instantiation to #sentence;
}
:input {
set #input to :sentence;
set #speaker to :speaker;
set #conversation to :conversation;
set #target to :target;
}
case :input goto State:sentenceState for each #word of :sentence;
State:sentenceState {
// find interogative
:what {
set #what to #verb;
set #meaning to #search;
set #search to #verb;
set #interogative to #what;
}
// set #instantiation to #search assign #search to (new (#verb))
:can {
set #instantiation to #can;
set #can to #verb;
set #search to #can;
set #searchmodifier to #towhatextent
}
// find predicate, subject verb object
assign :predicate to (new #sentence);
:you {
set #meaning to #i;
set #subject to #i;
set #searchsubject to #i;
append :you to #word of #predicate;
}
:do {
set #instantiation to #do;
associate #do to #verb by #instantiation;
set #searchverb to #do;
append :do to #word of #predicate;
}
// find last sentence element
case :anything goto State:respond;
Quotient:1.00:Equation:response;
Equation:response {
assign :response to (new #sentence);
for each #word of (get from #self :ability) as :ability
append :ability to :abilities;
if (:question, #true) then do(
append "yes" to #word of :response)
else do(
assign :abilities to (new #sentence),
append :abilities to #word of :response)
}
return :response;
State:respond {
Equation:search {
if (#predicate, #known)
then return "yes"
else 'evaluate' #verb on #subject; // this is the complex part
}
Quotient:1.00:Equation:response;
}
}
}
|
|
|
|
|