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

^burst and count
 
 

I’d like a bit of clarification on using the count option in ^burst.

I was assuming that something like ^burst(count %originalinput) would return the number of words in the original input.

But from looking at the actual code in BurstCode, then this first parameter needs to evaluate to “^count”. Is that correct? It needs to be just “once” for the other variation.

Also, counting doesn’t actually return the count as it breaks out of the loop after the first word when it is not bursting into a fact set.

How should a leading space in the data source be handled? Currently with count, then 1 will be returned (because of the early exit from the loop).

 

 
  [ # 1 ]

Older CS version had bug requiring ^count as argument instead of count. Was fixed and released.

For next version I have modified the definition of burst for single character bursts. It requires there be a separation of pieces. This means all leading and trailing instances of the burst character are removed, and redundant such characters between tokens are ignored. So u: (burst) ^burst(count %originalinput) for an input of
”  burst   the   machine   “
will return a count of 3

 

 
  login or register to react