|
Posted: May 14, 2016 |
[ # 181 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
you mean ^disable(RULE )?
|
|
|
|
|
Posted: May 14, 2016 |
[ # 182 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
In this topic I have 45 rules, I want 42 of them to be repeated, and only 3 of them to send output once n then never repeat.
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) ^disable() <<< THIS CAN BE PUT HERE, but it simple deletes the rule at all, without sending output anytime.
u: (eee) ^NoRepeat() <<< THIS CAN’T BE PUT HERE, OTHERWISE CSBOT WILL NOT BE BUILT
u: (fff) ^erase() <<< THIS CAN’T BE PUT HERE EITHER, OTHERWISE CSBOT WILL NOT BE BUILT
So I guess my only solution is this…
TOPIC: ~INTRO [aaa bbb ccc ddd eee fff ]
u: (aaa) ^keep() this will be repeated if needed
u: (bbb) ^keep() this will be repeated if needed
u: (ccc) ^keep() this will be repeated if needed
u: (ddd) this will be applied just once, then never repeat
u: (eee) this will be applied just once, then never repeat
u: (fff) this will be applied just once, then never repeat
|
|
|
|
|
Posted: May 14, 2016 |
[ # 183 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
put them into a subtopic and invoke that.
|
|
|
|
|
Posted: May 14, 2016 |
[ # 184 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Thanks Bruce, that subtopic workaround worked fine.
Bruce, I understood how to set the irregular noun_singular and noun_plural in the DICT
I did this and it worked…
chaval ( NOUN NOUN_SINGULAR COMMON4 COMMON1 KINDERGARTEN posdefault:NOUN ) plural=chavales
chavales ( NOUN NOUN_PLURAL COMMON4 COMMON1 KINDERGARTEN posdefault:NOUN ) plural=chaval
I have noticed that words that only add “s” to form their plural, doesn’t have their plural form added to the DICT, like
table ( meanings=8 glosses=8 NOUN_ABSTRACT VERB_PRESENT VERB_INFINITIVE NOUN VERB NOUN_SINGULAR COMMON4 COMMON1 NOUN_NODETERMINER KINDERGARTEN posdefault:NOUN VERB_DIRECTOBJECT )
Please correct me if Im wrong, tahnks advanced.
PD: Bruce please but I’m still dealing with the MALE and FEMALE words in spanish, which are almost 60% of them, please I hope you could see them, I emailed them.
Thanks again for your support bruce.
|
|
|
|
|
Posted: May 14, 2016 |
[ # 185 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
RULES for using sufixs to define words’ gender
This rule is most used in Adjectives. eg.
“él es Rápido” (means he is fast) converts to “ella es Rápida” (means she is fast)
“él esta Petado” (means he is Fulled, comes from the verb “Petar” which means To full, its a verb conjugation that acts as an adjective, every verb in the DICT has this adjective conjugation) converts to “ella esta Petada” (means she is fulled)
Also is used for People Professions. eg.
“abogado” (means male layer) converts to “abogada” (means female layer)
“administrador” (means male administrator) converts to “administradora” (means female administrator)
Words most likely end with “o”, “r”, and less likely end with “e” and the rest of the consonants (like “n”)
Words that end with “o”, “r”, “n” or other consonants, are male words and can convert to female words…
if they end with “o” they can convert to female words by replacing “o” with “a”.eg. “dueño-dueña”
if they end with “r”,“n” or other consonants they can convert to female words by adding “a” at the end. eg. “entrenador-entranadora”, “patron-patrona”
Words that end with “e” are both male and female words, so they don’t need to convert by adding “o” or “a”.
There are only a few words that end with “e” that are only male words, so they can change to female by replacing “e” with “a”...
jefe-jefa
presidente-presidenta
Thanks Advanced Bruce, thanks Again for your support.
|
|
|
|
|
Posted: May 16, 2016 |
[ # 186 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi, is there a command or some other way to display de all variables values?, I would like to display all variables that are not null, is there a command to show them all at once? thanks advanced.
|
|
|
|
|
Posted: May 16, 2016 |
[ # 187 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
:variables (see debugging manual) or more restricted :variables user
|
|
|
|
|
Posted: May 16, 2016 |
[ # 188 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Thanks Bruce, it worked fine, could yo please tell me if there is a way to create a list in CS?? or using vars as reference?
thanks advanced.
|
|
|
|
|
Posted: May 16, 2016 |
[ # 189 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Depends…. A list is a series of facts. You could create a json array and populate it with the values of your list. A variable can point to that json array that was created. (probably you would be using PERMANENT so the list crosses volleys)
|
|
|
|
|
Posted: May 16, 2016 |
[ # 190 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
could you tell me in which manual can I find more info about that? could you please provide and example bruce
PD: I have a doubt, everytime CS engine comes to a line like…
if(%rand>50) it will create the random number no?, let’s say it is a loop, every loop index will have a diferent random number right?
by the way, can I nest if statements, inside if statements?
thx advanced.
|
|
|
|
|
Posted: May 20, 2016 |
[ # 191 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi, I have this word in my spanish DICT, its an adjective…
nuevo ( ADJECTIVE ADJECTIVE_NORMAL ADJECTIVE_NOT_PREDICATE COMMON4 COMMON2 KINDERGARTEN posdefault:ADJECTIVE ADJECTIVE_GOOD_SUBJECT_COMPLEMENT )
my simplecontrol.top looks like this..
$cs_language = spanish
$cs_token = #DO_INTERJECTION_SPLITTING | #DO_SUBSTITUTE_SYSTEM | #DO_NUMBER_MERGE | #DO_DATE_MERGE | #DO_PROPERNAME_MERGE | #DO_SPELLCHECK | #DO_PARSE
but this pattern rule doesn’t work,
u: (!!~adjective !!mayor !!menor !!fin [de en]) You said de or end
am I doing something wrong?
If I type “soy fin de” the rule doesn’t match, so its ok
but…
If I type “soy nuevo en” the rule matchs, so the rule fails
I would like CS to detect the ~adjective ~verb n ~adverb, how can I do that??? thanks advanced.
EDIT> I’m almost shure the error is caused due to the !!, cuz I tried with ! and it worked.
But its important that the adjective is not found anywhere before the [de en] but it could be after the [de en], thanks advanced.
In fact, currently Im using !! to say “not before…” I don’t know if it is a good practice. anyway is been very usefull, but it doesn’t work with ~adjective, tahnks again.
|
|
|
|
|
Posted: May 21, 2016 |
[ # 192 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi, just to add some research
and if you try this rule…
(*~2 !!mayor !!menor !!fin [de en])
CS will load up,
but if you test the pattern rule, CS will crash.
Hope you could check it out please,
thanks advanced.
|
|
|
|
|
Posted: May 23, 2016 |
[ # 193 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi Bruce
my $cs_token is
$cs_language = spanish
$cs_token = #DO_INTERJECTION_SPLITTING | #DO_SUBSTITUTE_SYSTEM | #DO_NUMBER_MERGE | #DO_DATE_MERGE | #DO_PROPERNAME_MERGE | #DO_SPELLCHECK | #DO_PARSE
So far I’m using this pattern rule…
u: ([(me llamo) soy] ~propername)
and it works fine, in my spanish DICT I have hundreds of male and female names set like…
Marco ( NOUN_HUMAN NOUN_FIRSTNAME NOUN_HE NOUN NOUN_PROPER_SINGULAR COMMON1 )
Mariana ( NOUN_HUMAN NOUN_FIRSTNAME NOUN_SHE NOUN NOUN_PROPER_SINGULAR COMMON1 )
But I would like CS to differenciate between male and female proper names, so it react different when talks to a man or a girl.
Is there a way to do that without having to create a ~concept listing only female names and another ~concept listing only male names?
I remember you once told me, something about it…
Bruce: A concept cannot be triggered by a pair of words directly.
But you CAN create a topic that will do that. It can be run early in your control script or be run as $cs_prepass which happens before $cs_controlmain
u: ( _~verb_infinitive _0?~verb_noobject ) ^mark(~dualconcept1 _0)
and other such rules
Could you please tell me if that applies in this case?, could it be something like…
u: (_~propername _0?~NOUN_SHE) ^mark(~dualconcept1 _0)
putting this below $cs_controlmain in the simplecontrol.top, right?
and then I call it in my pattern rule using ~dualconcept1, am I right?
what are the other such rules, are there some other alternatives to do the same?
Could you please expand a little about this? thanks advanced.
|
|
|
|
|
Posted: Jun 3, 2016 |
[ # 194 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi Bruce, I’ve been trying to use this…
t: If you poured coffee over me or let me fall into the bathtub what do you think would happen?
a: REJOINN(por que) I want you to think about and understand my vulnerabilities.
a: (malogras) y luego? ^setrejoinder({input}REJOINN) # here I have try input, ouput, or without any {tag}
a: (estropeas) Yes.
a: (mueres) Precisely.
but it doesn’t work for me,
when I type malogras, CS goes out the topic. doesn’t even print “y luego?” all other rejoinders work fine.
I just can’t get the ^setrejoinder to work.
am I doing something wrong??
thanks advanced.
PD: do you think I should post this general issues (not specifically spanish bot) in other thread?
I’ve read about ^sequence in the manual but I don’t quite get it thanks again.
|
|
|
|
|
Posted: Jun 19, 2016 |
[ # 195 ]
|
|
Senior member
Total posts: 179
Joined: Feb 11, 2015
|
Hi bruce
I have this pattern…
([de en] !!donde _*1 ) $xaa = ‘_0 \[ COD_EBSCB_A_cIRCch_PAE_$uloc=unkn $xaa \]
where _0 is always the name of a place, like a city or town, but there are thousands and are unpredictable
so when user says “de irac” CS correct it as, “de iria”
I would like _0 to not be spell checked ever, I would like that word to be print just as the user typed it, how could I do it?
I used the ‘, but it only gets the canonical form,
I also read in advanced manual about IGNORESPELLING, but it is used in concepts, and I can’t create a concept of places that I don’t known
Thanks Advanced.
|
|
|
|