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
 
 
  [ # 166 ]

First off, I expect to release a new version this weekend with a pattern operator for saying “dont see this on the next word” ... while !not means dont see this anywhere in the rest of the sentence !!not means dont see this as the next word.  Like $var means for the rest of volleys and $$var means for this volley

 

 
  [ # 167 ]

thanks bruce, it sounds pretty logic, but
is it ok to use ~propername?? in 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 DICT definition for jorge
Jorge ( NOUN_HUMAN NOUN_FIRSTNAME NOUN_HE NOUN NOUN_PROPER_SINGULAR COMMON1 )

thanks advanced.

 

 
  [ # 168 ]

regarding to the not! behaviour, please let me imagine…

! means “must not be found anywhere after the current match location”
! when placed at start of the pattern, means “not anywhere in the sentence at all”
but it would be really helpfull in spanish to have something like…
1. “must not be found anywhere before the current match location”
2. “dont see this on the previous word” cuz currently Im using… (_*1 soy _0!=pero)
so, perhaps the code could look like this…

>! = “must not be found anywhere after the current match location”
<! = “must not be found anywhere before the current match location”
>!! = “dont see this on the next word”
<!! = “dont see this on the previous word”

I know it may not be feasible, but anyway I got to share this since its really worthy, thanks for your support bruce.

 

 
  [ # 169 ]

one already has @_3-  to match backwards, so you can test things without additional features

 

 
  [ # 170 ]

Hi bruce, tahnks,
I read something about that in advanced manual, but I didn’t quite get it, could you pleas provide examples of how
Forward matching @_n+ and backward matching is @_n- actually work??
thanks advanced.

 

 
  [ # 171 ]

Simple example. Suppose you want to find a date and month. It could be in either 2nd January or January 2nd format.

u: ( _~monthname)  $$month = ‘_0 _10 = _0 ^refine()
  a: ( @_10+ _~placenumber) $$date = ‘_0  
  a: (@_10-  _~placenumber) $$date = ‘_0

in the first a:, having found a month we JUMP to there in the sentence and scan forwards.
in the second a:, having found a month we JUMP to there in the sentence and then begin scanning backwards. The pattern moves forwards but the sentence as we match is moving backwards.

 

 
  [ # 172 ]

Hi Bruce, thanks for your support

u: (soy !![de en])
is really a helpfull thing, thanks for that

I tried the matching backwards, but…

  u: U_TEST_FBMATCH (perro) _10 = gato ^refine()
      a: (@_10+ perro) you said first perro, then gato #this recognized when I typed “perro gato”
      a: (@_10- perro) you said first gato, then perro #this didn’t recognize when I typed “gato perro”

this pattern rule above, didn’t find backward matching for me, am I doing something wrong?

#### my simple control config is…
$cs_language = spanish
$cs_token = #DO_INTERJECTION_SPLITTING | #DO_ESSENTIALS | #DO_NUMBER_MERGE | #DO_DATE_MERGE | #DO_PROPERNAME_MERGE | #DO_SPELLCHECK | #DO_PARSE
$cs_response = #response_removespacebeforecomma | #response_alterunderscores | #response_removetilde   # is the same as default but without #Response_upperstart

#### my DICT definitions for gato and perro are…
( NOUN NOUN_SINGULAR COMMON4 COMMON1 KINDERGARTEN posdefault:NOUN VERB_DIRECTOBJECT )

####
eb: > :prepare gato perro
TokenControl: DO_ESSENTIALS DO_NUMBER_MERGE DO_PROPERNAME_MERGE DO_DATE_MERGE DO
_SPELLCHECK DO_INTERJECTION_SPLITTING DO_PARSE


Original User Input: gato perro
Tokenized into: gato perro
Actual used input: gato perro

Xref: 1:gato >2   2:perro
1:gato   2:perro
badparse Tagged POS 2 words: gato (Adjective_noun)  perro (MAINSUBJECT Noun_sing
ular)
  MainSentence: Subj: [ gato] perro PRESENT


Concepts:

1: gato (raw):  +~adjective +~adjective_noun +~KINDERGARTEN +gato //
1: gato (canonical):  //

2: perro (raw):  +~noun +~noun_singular +~singular +~normal_noun_bits +~noun_bit
s +~KINDERGARTEN +~mainsubject
. +~sentenceend +perro //
2: perro (canonical):  //

Sequences:

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

Thanks Advanced.

 

 
  [ # 173 ]

backward matching does NOT do the same thing as forward matching.   
a: (@_10- perro) you said first gato, then perro #this didn’t recognize when I typed “gato perro”
It WOULD match “perro gato”  because you went to gato and then scanned backwards to find perro

 

 
  [ # 174 ]

Hi Bruce

I don’t understand?

if this is my pattern rule..

  u: U_TEST_FBMATCH (perro) _10 = gato ^refine()
      a: (@_10+ perro) AAAA
      a: (@_10- perro) BBBB

if I type “perro gato” I get… AAAA
but if I type “gato perro” I get a quibble response

why is that? shouldn’t it say BBBB ??

thanks advanced.

 

 
  [ # 175 ]

your rules are not anchored… You need to set _10 to the LOCATION of a match
u: (_perro) _10 = _0 ^refine()

 

 
  [ # 176 ]

Thanks Bruce,
all these worked fine
a: (@_10+ perro)
a: (@_10- perro)
a: (@_10+ ![perro lobo])
a: (@_10- ![perro lobo])
a: (@_10+ !!perro)

but I think this rule…

a: (@_10- !!perro)  # it matchs “perro gato”

I think it should match any sentence with “gato” that doesn’t have the word “perro” just before it
so it could match “perro eats gato” and it couldn’t match “perro gato”
but instead it just match any sentence with “perro” anywhere before “gato” like… “perro gato”

In the same way it would be nice to these work as well

a: (@_10+ *~2 !!perro) # will match “gato feo perro”, won’t match “gato feo malo perro”, but it fails cuz it doesn’t match “gato feo malo gordo perro”
a: (@_10+ *~2 !![perro lobo])

Thanks Advanced.

 

 
  [ # 177 ]

I have tried this as the Advanced manual says
Concept: ~verbs ONLY_VERB (sit sleep)
but when building CS it shows an error…


ERROR SUMMARY:
  line 11 of EBSCB_A_cIRCchpm_at.top: CONCEPT-4 Unknown concept property ONLY_VE
RB
1 topic files were missing.
r
1 errors - press Enter to quit. Then fix and try again

My DICT have all conjugations of “estar”
I would like to create a ~concept that could include all conjugations of estar.
so a pattern like
(como ~verbestar)
would match “como estas” or “como estamos”

Thanks Advanced.

 

 
  [ # 178 ]

Hi Bruce,
about the Topic Control Flags
the advanced manual says…
Erase – (default) erase responders that successfully generate output. (Gambitsautomatically erase unless you suppress them specifically.
NoRepeat – (default) do not generate output if it matches output made recently

I know they are the default behaviour, and also that they can be applied to TOPICS like

TOPIC: ~OUTRO NoRepeat [keyword]

But what if I want to repeat most of the rule patterns in a rule, except for one or two, apply a NoRepeat Flag or Erase Flag in a singular pattern rule is not possible, eg…

TOPIC: ~INTRO keep [aaa bbb ccc ddd eee fff ]
  u: (aaa) this will be repeated if needed
  u: (bbb) this will be repeated if needed
  u: (ccc) this will be repeated if needed
  u: (ddd) this will be repeated if needed
  u: (eee) ^NoRepeat() this particular rule won’t be repeated
  u: (fff) ^erase() this particular rule won’t be repeated

I thought of using the ^erase or ^NoRepeat, in a single pattern rule, but when doing so, CS won’t build the bot, saying…
apparent call to ^NoRepeat is not yet defined.

am I doing something wrong?? currently I’m creating a Var to workaround it, isn’t there any other way?

  u: (!$erasevar fff) $erasevar this particular rule won’t be repeated

Thanks Advanced.

 

 
  [ # 179 ]

True. You can individually keep or erase, and only individually repeat not individually norepeat.

 

 
  [ # 180 ]

According to my test, I can’t put ^erase() individually in a patter rule either, CS shows the same message as ^NoRepeat()

Thanks Bruce:

PD I have realized that in the english DICT some words has a definition that ends with…
() plural=alkalies
alkali ( meanings=2 glosses=1 NOUN NOUN_SINGULAR COMMON2 COMMON1 NOUN_NODETERMINER posdefault:NOUN ) plural=alkalies
I guess I can define irregular plurals that way in spanish DICT too, am I wrong?
Currently Im having problems with the male female words, I guess I would have to duplicate all DICT my nouns adjectives, etc, so I can have male and female words, is there a way CS could detect them?
like
man-woman
son-daughter

in spanish almost 60% of words, has a female counterpart, eg.
layer (abogado-abogada)
designer (diseñador-diseñadora)
employee (empleado-empleada)
administrator (administador-administradora)

or add that feature for spanish? the spanish rules for converting male words into female words, are really simple. Hope you could add it to CS, I took the liberty to email them to you.

Thanks again Bruce, thx for your support.

 

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