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

Questions on “bad number” in rule label ^reuse
 
 

At compile time, I got “bad number” warning for every ^reuse() call accessing a rule label, as shown in the scree shot.

They are getting annoying as the script size grows. How can I avoid them? Many thanks.

Image Attachments
cs_bad_number.png
 

 
  [ # 1 ]

I’d need to see source to see what was happening. The source around 10 lines of book.top at 85 would probably do

 

 
  [ # 2 ]

Please see the attached screen copy. Thanks.

Image Attachments
sc_bad_number_label.png
 

 
  [ # 3 ]

Nope, not enough data to regenerate the error. Maybe I need the file.

Also, rather than (why do not) and such, you are better off with “why do not”  when you want a phrase. And
{to see if it be on the shelf} does not work. You are saying ignore any 1 of those words, not the phrase. Because phrases are limited to 5 long, you’d need to do {"to see if it be"} {"on the shelf"}

 

 
  [ # 4 ]

Thanks for the “why do not” phrasing comment. Will certainly do that.

I actually know the {....} issue. Probably not tested at that spot. Thanks anyway.

I’ll see how I can send enough data to reproduce the symptom.

 

 
  [ # 5 ]

I can close this one now. As I just moved to 5.53, there are no such compile-time warnings any longer.

Many thanks.

 

 
  [ # 6 ]

That said, as I’m trying to use ” ” instead of ( ) inside { } as you reminded, in some circumstances only ( ) will work, like illustrated in the screen copy attached.

But other times, quoted phrases do work. This is sort of annoying though, and maybe that’s why I learned to use parenthesis instead of quotes…

Thanks.

Image Attachments
sc_paren_vs_quote.png
 

 
  [ # 7 ]

Quoted phrase checking has an overhead applied to all rules (lookiing at all sequences of 5 words in a row throughout a sentence) so since phrases are usually small, I don’t widen it.  It costs more on the rule to use ( ) for the same thing, but it is not a cost applied to all rules as a consequence, and I doubt performance is an issue for you so ( ) makes fine sense as well.

I’d have to check further, but I really think will have really substituted away so matching the “” will not work unless you remove the substitution.  Why (I really think) works I dont know yet.

 

 
  [ # 8 ]

Having checked further, using the current system I cannot get your 2nd pattern to match. Which is what I would expect as the word “really” disappears from input unless you have a different substitutions file from me

 

 
  [ # 9 ]

In my case I have the noise.txt disabled for my requirement, so the word “really” is not substituted away.

I wonder if it could be my token control setting which is like the following:

  $cs_token = #DO_SUBSTITUTE_SYSTEM | #DO_DATE_MERGE | #DO_PARSE

Thanks.

 

 
  [ # 10 ]

Did you remove the noise.txt file (since you are using DO_SUBSTITUTE_SYSTEM you did not turn it off at the token control).

 

 
  [ # 11 ]

I took your token control, added this:
$cs_token -= #DO_NOISE
then ran the 1st test pattern with the quotes in my simple bot and it worked fine.

 

 
  [ # 12 ]

Yes, I got it now. Will fix it in that way. Many thanks.

 

 
  login or register to react