Hello !
I’m getting a weird behavior with the rejoinder pattern matching as you can see in the following debug trace. The try here is to catch the second sentence if the first failed before.
testuser: > yes, good
.Pushing Topic ~preprocesstopic
.Enter Topic:
.Topic: ~preprocesstopic linear Gambits:
..try t:0.0 @0:
.. ** Match: t: ^if 00k( ! $topicdata ) 00V{ $topicdata = ^jsoncreate ( permanent object ) } 004 ^if 00F( ...
.Result: NOPROBLEM Topic: ~preprocesstopic
Popping Topic.Pushing Topic ~multiplesentencescontrol
.Enter Topic:
.Topic: ~multiplesentencescontrol linear Statements:
..try u:0.0 @0: pattern: ( _* )
..( _* )+
.. ** Match: u: ( _* ) $$sentencecounter += 1 $_tmp = ^savesentence ( $$sentencecounter ) ^respond ( ~anal…
.. Wildcards: _0=~yes / ~yes (1-1)
...Respond trying ~analizesentence
....Pushing Topic ~analizesentence
....Enter Topic:
....Topic: ~analizesentence linear Statements:
....,try u:0.0 @0: pattern: ( collecteddatajson )
....,( collecteddatajson- Remaining pattern: )
....,try u:1.0 @0: pattern: ( $backtointroduction $button )
....,( $backtointroduction- Remaining pattern: $button )
....Result: NOPROBLEM Topic: ~analizesentence
...Popping Topic ~multiplesentencescontrol
.Result: ENDSENTENCE Topic: ~multiplesentencescontrol
.Popping Topic ~multiplesentencescontrol.Pushing Topic ~multiplesentencescontrol
.Enter Topic:
.Topic: ~multiplesentencescontrol linear Statements:
..try u:0.0 @0: pattern: ( _* )
..( _* )+
.. ** Match: u: ( _* ) $$sentencecounter += 1 $_tmp = ^savesentence ( $$sentencecounter ) ^respond ( ~anal…
.. Wildcards: _0=good / good (1-1)
...Respond trying ~analizesentence
....Pushing Topic ~analizesentence
....Enter Topic:
....Topic: ~analizesentence linear Statements:
....,try u:0.0 @0: pattern: ( collecteddatajson )
....,( collecteddatajson- Remaining pattern: )
....,try u:1.0 @0: pattern: ( $backtointroduction $button )
....,( $backtointroduction- Remaining pattern: $button )
....Result: NOPROBLEM Topic: ~analizesentence
...Popping Topic ~multiplesentencescontrol
..try u:1.0 @0: pattern: ( )
..( )+
.. ** Match: u: ( ) $_count = 0 ^loop ( $$sentencecounter ) 018 { $_count += 1 ^restoresentence ( $_count ...
....Respond trying ~processonesentence
....,Pushing Topic ~processonesentence
....,Enter Topic:
....,Topic: ~processonesentence linear Statements:
....,.try u:0.0 @0: pattern: ( %input<%userfirstline )
....,.( %input(3)<%userfirstline(1)- Remaining pattern: )
....,.try u:1.0 @0: pattern: ( %input>=1 )
....,.( %input(3)>=1+ )+
....,. ** Match: u: ( %input>=1 ) $responsecount = %response ^if 00f( ! $data ) 00G{ $topiccurrent = $topict…
....,.try u:2.0 @0: pattern: ( )
....,.( )+
....,. ** Match: u: ( ) ^currenttopic ( ) ^if 00m( %response != 0 ) 00q{ ^end ( INPUT ) } 004 ^if 00w( %respon…
....,....Pushing Topic ~mycoin
try rejoinder for: ~mycoin 0.1
....,....,try a:0.1 @0: pattern: ( ~goodness )
....,....,( ~goodness- Remaining pattern: )
....,....,try a:0.2 @0: pattern: ( [ ~badness ~negativeemotions ] )
....,....,(
....,....,[ ~badness- ~negativeemotions- ]-
....,...., Remaining pattern: )
....,....,try a:0.3 @0: pattern: ( )
....,....,( )+
....,...., ** Match: a: ( ) Woot! \n ^cleandataandbacktointro ( )
....,....Popping Topic ~mycoin
....,Result: ENDINPUT Topic: ~processonesentence
....Popping Topic ~multiplesentencescontrol
.Result: ENDINPUT Topic: ~multiplesentencescontrol
.Popping Topic ~multiplesentencescontrol
.Pushing Topic ~postprocesstopic
.Enter Topic:
.Topic: ~postprocesstopic linear Gambits:
..try t:0.0 @0: pattern: ( $backtointroduction !$button )
..( $backtointroduction(true)+ !$button()+ )+
.. ** Match: t: ( $backtointroduction !$button ) ^log ( OUTPUT_ECHO “^Clean postprocess \n” ) ^cleandata (...
Clean postprocess
Clean postprocess
Gambit trying ~introductions
....Pushing Topic ~introductions
....Enter Topic:
....Topic: ~introductions linear Gambits:
....,try t:0.0 @0: pattern: ( %input<%userfirstline %input>0 )
....,( %input(3)<%userfirstline(1)- Remaining pattern: %input>0 )
....,try t:1.0 @0: pattern: ( %input>=1 !%more )
....,( %input(3)>=1+ !%more- Remaining pattern: )
....,try t:2.0 @0: pattern: ( %input<%userfirstline )
....,( %input(3)<%userfirstline(1)- Remaining pattern: )
....Result: NOPROBLEM Topic: ~introductions
....Popping Topic ~introductions
..try t:1.0 @0: pattern: ( $backtointroduction $button )
..( $backtointroduction- Remaining pattern: $button )
..try t:2.0 @0: pattern: ( ! $cs_token=$std_cstoken )
..( !$cs_token(67336959)=$std_cstoken(67336959)- Remaining pattern: )
..try t:3.0 @0: pattern: ( $$tmptoken )
..( $$tmptoken- Remaining pattern: )
.Result: NOPROBLEM Topic: ~postprocesstopic
Popping Topic
Respond: user:testuser bot:mybot ip: (~mycoin) 3 yes, good ==> Woot! When:Mar05’18-15:17:33 Why:~mycoin.0.3.~multiplesentencescontrol.1.0 F:13402
bot: Woot!
The engine is splitting correctly the INPUT and I’m getting the second part where I would like to match my rejoinder :
.. Wildcards: _0=good / good (1-1)
Then, the engine is trying the rejoinders…
try rejoinder for: ~mycoin 0.1
....,....,try a:0.1 @0: pattern: ( ~goodness )
....,....,( ~goodness- Remaining pattern: )
....,....,try a:0.2 @0: pattern: ( [ ~badness ~negativeemotions ] )
....,....,(
....,....,[ ~badness- ~negativeemotions- ]-
....,...., Remaining pattern: )
....,....,try a:0.3 @0: pattern: ( )
....,....,( )+
....,...., ** Match: a: ( ) Woot! \n ^cleandataandbacktointro ( )
So, good not matched ~goodness. :testpattern works.
Do you know why my rejoinder is not working please ?
Thank you for your help ^_^