AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

How to implement a Chatscript bot that talk Spanish
 
 
  [ # 151 ]

following previous post…
I understand that CS can only enter topics with no-keywords “~TOPIC []”, via ^respond, am I wrong?

Thanks advanced.

 

 
  [ # 152 ]

if you want to enter a topic to respond to a user, then either it is via keywords of a topic or because you explicitly call ^respond on that topic from some other topic (be it a control topic or any other topic).  So a topic with no keywords gets entered by calling respond on it.

This ignores access to a topic in gambit mode which I presume is not relevant here

 

 
  [ # 153 ]

Thanks Bruce for support
So, is not possible to set a topic so CS only enter on it only if…  ^compute(%input - %userfirstline)<3
like…
TOPIC: ~P_HOLA keep repeat [^compute(%input - %userfirstline)<99]

and my only choice is put “^compute(%input - %userfirstline)<99” on every single rule inside that topic.


PD: Bruce Im having problems using this rule pattern…
u: U_TENGO_NUM (!$esoquedaq $age=1)
is that correct, is that possible? test if there is not $esoquedaq and $age=1, its not working for me, rule applies, even if !$esoquedaq exists.

Thanks Advanced.

 

 
  [ # 154 ]

topics accept keywords, not patterns, so you cannot write
TOPIC: ~P_HOLA keep repeat [^compute(%input - %userfirstline)<99]

Your rule looks fine. are you saying that if $esoquedaq is not null, this rule is matching?

You should be able to do this
:do $esoquedaq = null $age = 1
:testpattern (!$esoquedaq $age=1)  testing

 

 
  [ # 155 ]

eb: > :testpattern (!$esoquedaq $age=1) testing
Failed
  Adjusted Input: testing
  Canonical Input: unknown-word

that was the result.

ah sorry, my mistake, sorry there was another rule without the (!$esoquedaq), which was been called.
I solved it.

PD: by the way, what does “testing” do in…
:testpattern (!$esoquedaq $age=1) testing

Thanks Advanced.

 

 
  [ # 156 ]

(!esoquedaq $age=1)  is not the same as (!$esoquedaq $age=1)
So I dont know what you tested.

If you wanted the variable, then use the correct pattern, and try using :do to define the variable as null in one test and as a value like 1 in another.

If you wanted the word, then your :testpattern should say (...)  eqoquedaq   for one of its examples (and confirm via :prepare that the system does not spell check it into some other word

 

 
  [ # 157 ]

Thanks Bruce, yes was my mistake, sorry

I have a topic ~P_HOLA that calls two times (using loop) a topic ~P_QUESTION with many rules inside it, but I want all rules to keep and repeat except for one of them, how I would do that?

TOPIC: ~P_HOLA
  u: U_HOLA () ^respond(~P_QUESTION)
TOPIC: ~P_QUESTION repeat keep nostay []
  u: U_VIVO_EN ()
  u: U_ESO_QUEDA () <<<<I want this rule to not repeat itself, I mean, only apply once then erase.
  u: U_TENGO_NUM ()

I have try with ^erase with no result
Thanks Advanced.

 

 
  [ # 158 ]

Is there a command to GO OUT, or EXIT a topic (not a rule) and don’t come back to it anymore??? or that’s default behaviour if that topic doesn’t find output? I know ^reuse will call a rule, and ^respond will call a topic, but both return to where they were called from, am I right? what about the ^gambit.
Thanks Advanced.

 

 
  [ # 159 ]

A topic consists of gambits and responders.  If it has exhausted its gambits and you are not asking questions that trigger its responders, it is out of that topic.  You can call from a rule in the topic to exit the topic ^poptopic   ^end(TOPIC)  which have various effects, and NOSTAY as a keyword is another.

If you want to stay out of a topic for some period of time or until some condition is met, you can write preliminary rules in front of the topic like this

t: ( !$condition ) ^keep() ^end(TOPIC)
u: ( !$condition ) ^keep() ^end(TOPIC)
which says if condition is not true, nothing can happen here now (except by direct ^reuse)

t: (!~)  ^keep() ^end(topIC)
says dont gambit in this topic unless you are already in this topic. Eg a question was answered by this topic and so now it can gambit from it as a followup. but if conversation goes elsewhere immediate, it cannot return and gambit.

 

 
  [ # 160 ]

Hi, thanks bruce,
Ill check it out, what about this???

I have a topic ~P_HOLA that calls two times (using loop) a topic ~P_QUESTION with many rules inside it, but I want all rules to keep and repeat except for one of them, how I would do that?

TOPIC: ~P_HOLA
  u: U_HOLA () ^loop(2) {^respond(~P_QUESTION2)}

TOPIC: ~P_QUESTION repeat keep nostay []
  u: U_VIVO_EN ()
  u: U_ESO_QUEDA () <<<<I want this rule to only apply once then erase.
  u: U_TENGO_NUM ()

I have try with ^erase with no result
Thanks Advanced.

 

 
  [ # 161 ]

following the previous post (the post above this)
I forgot to mention something…

I have a topic ~P_HOLA that calls 6 times (using loop) a topic ~P_QUESTION with many rules inside it, but I want all rules to keep and repeat except for one of them, how I would do that?

TOPIC: ~P_HOLA
  u: U_HOLA () ^loop(6) {^respond(~P_QUESTION)}

TOPIC: ~P_QUESTION repeat keep nostay []
  u: U_VIVO_EN ()
  u: U_ESO_QUEDA () <<<<I want this rule to only apply once then erase. but I don’t want to get out of this topic, I want all rules inside this topic to continue to execute, except for this one.
  u: U_TENGO_NUM ()

I have try with ^erase and ^norepeat with no result
Thanks Advanced.

 

 
  [ # 162 ]

Hi bruce, I CS manual says the not! operand, means a word must not be found anywhere
after the current match location.
Is there a way to tell a word must not be found only next a previous one? like…
not match if there is a “de” after “soy”, but it could match if there is a de everywhere else in the sentece, so

u: ([(me llamo) (soy !de)])
could not match… soy de Argelia
but could match… soy Richard, de argelia

Thanks Advanced.

By the way, I tried to create a concept ~name, but CS says there is already a concept with that name? is that means human names? like Richard, John, Bob, etc
Where I can change that info, so I can add latin names?? Jorge, Pedro, Pablo,

Thanks Again.

 

 
  [ # 163 ]

You can capture the next word after soy and then test that

(soy _*1 _0!=de)


You can see what is in a concept with :facts ~name
You’ll see that it is not really meant for proper names. Note that CS comes with many names already defined in the dictionary, including Jorge, Pedro and Pablo.

 

 
  [ # 164 ]

Thanks andy,
I finally used…

u: ([(me llamo) (soy !de)] ~propername)

and add more latin names in the DICT
here is the definition I added to each new latin name in the DICT…

Jorge ( NOUN_HUMAN NOUN_FIRSTNAME NOUN_HE NOUN NOUN_PROPER_SINGULAR COMMON1 )

is there anything wrong about using ~propername
or the approach that I have choosed??

Thx advanced.

 

 
  [ # 165 ]

Hi, following the previous post
using this pattern rule…
([(me llamo) (soy)] ~propername)

the system is matching when I type…
soy Jorge
or
soy Jorge de Brazil

but not when I type…
soy Jorge, de Brazil

why is that?, am I doing something wrong?
how does CS manage the commas internally?

I deleted the english DICT completely, and place an spanish DICT instead, this is how I put the def for jorge
Jorge ( NOUN_HUMAN NOUN_FIRSTNAME NOUN_HE NOUN NOUN_PROPER_SINGULAR COMMON1 )


eb: > :prepare soy Jorge, de Cordoba
TokenControl: DO_ESSENTIALS DO_NUMBER_MERGE DO_PROPERNAME_MERGE DO_DATE_MERGE DO
_SPELLCHECK DO_INTERJECTION_SPLITTING DO_PARSE


Original User Input: soy Jorge, de Cordoba
Tokenized into: soy Jorge ,  de Cordoba
Spelling changed into: soy jorge ,  de Cordoba
Actual used input: soy jorge(Jorge) , de Cordoba

Xref: 1:soy   2:jorge >3   3:,  4:de >1 o5   5:Cordoba >4
1:soy   2:jorge   3:,  4:de p1   5:Cordoba p1
badparse Tagged POS 5 words: soy (MAINVERB Verb_present)  jorge (Adjective_noun)
  ,/unknown-word (Noun_singular)  de ()
  MainSentence:  Verb: soy [p1]    PRESENT
Phrase 1 : de Cordoba


Concepts:

1: soy (raw):  +~verb_present +~verb_bits +~verb +~verb_conjugate1 +~mainverb +s
oy +T~p_u-intro0
. +~health_food_shop +~store_type //
1:  (canonical):  //

2: jorge (raw):  +~adjective +~adjective_noun +jorge //
2: jorge (canonical):  //

3: , (raw):  +~noun +~noun_singular +~singular +~normal_noun_bits +~noun_bits +~
unknownword +,
. +~system_joiner //
3: unknown-word (canonical):  +unknown-word //

4: de (raw):  +~lowercase_title +~preposition +~KINDERGARTEN +~howunit +~phrase(
4-5) +de +T~p_u-intro0 //
4: de (canonical):  //  +DE +~state_abbreviations

5: Cordoba (raw):  +~noun +~noun_proper_singular +~singular +~normal_noun_bits +
~noun_bits +~object2
. +~sentenceend //  +Cordoba +~selloc +T~p_u-intro0
5: Cordoba (canonical):  //  +~propername

Sequences:
After parse TokenFlags: SPELLCHECK PRESENT USERINPUT FAULTY_PARSE NOT_SENTENCE
EBSCB_A_IRC:
eb: >

thanks advanced.

 

 

‹ First  < 9 10 11 12 13 >  Last ›
11 of 17
 
  login or register to react
‹‹ Web interaction      Why no direct_so query? ››