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..

Capital Letters & Variables
 
 

Hey, all.

Has anyone else noticed some oddness in using names as variables?

Here is an example from my actual code (I didn’t sub anything out this time). First there is the rule:

u: (My wife is _*1 _*1)
$clean = ‘_0
$up = ‘_1
$clean $up. What a nice name.

(Rest assured that the variable names were subbed out from another example and there was no link intended between the discussion of a hypothetical domestic partner and household duties.)

Anyway, I then placed the above rule as a responder within a topic that had a few dummy gambits in place to fire when the rule wasn’t working. The results were as follows:

rob:_> My wife is Lydia Lunch.
REN1:_ If you’re trying for a responder and seeing these gambits, it’s not
working.
rob:_> My wife is Katya Hickenlooper.
REN1:_ Sorry, still not working.
rob:_> My wife is super cool.
REN1:_ Super cool. What a nice name.

So the mystery is solved somewhat when I try the following:

rob:_> My wife is Super Cool.
Renata1: If you’re trying for a responder and seeing these gambits, it’s not working.
rob:_> My wife is Super cool.
Renata1: Super cool. What a nice name.

Obviously, the double capped words of the name are throwing the system somewhat.

I don’t mean cram two questions into one post, but there is a related issue that is probably, uh, related.

If my rule is: 
u: (I would like _* variables) Oh! _0 variables, eh? I think we can do that for you.

And I supply an input of:
rob:_> I would like pink variables.

The output I get is:
Renata1: Oh! pink variables, eh? I think we can do that for you.

The tricky thing here is that I don’t know how to tell the system to capitalize the “p” that is the start of the new sentence. The funny thing is that the system DOES do this in the above example when I wrote my wife was “super cool.” This may be related or it may not be.

Thank you!

 

 

 
  [ # 1 ]

When the system memorizes words onto a match variable (_0 for example), it stores an original form and a canonical form.
Whether either is capitalized at the time depends on what the system thinks.

Eg.  if you have a dictionary word iPhone but there is no word iphone, then if the input is
“I have an iphone” the system would have spell corrected that to iPhone originally.

If there are both upper and lower case words, then the system has to decide whether to use the upper or lower case form.
EG “dot” and “Dot”.  It might get this wrong.

However, in any event, you can request ^pos(uppercase xxx) and ^pos(lowercase xxx) when you know something must be cased a particular way ( a name or a sentence start in output).

Does this answer your questions?

 

 
  [ # 2 ]

Then there’s this:

u: (My wife is _*1 _*1)

If you say my wife is Lydia Lynch, the system does proper name merging and Lydia_Lynch one word is the result to input.
So your code would be better as:

u: (My wife is _[*3 *2 *1] > )
    _1 = ^burst(_0 _ )
    $firstname = _1
    $lastname = _2   # if there is one…. of course the code must be more complex if you expect midde names.

 

 
  [ # 3 ]

Yes, this is super helpful. Still wrapping my head around the ^burst concept, but let me put in some manual time before I trouble you any further. Thanks, Bruce.

 

 
  login or register to react