AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Parsing features

Hi there!
For example I have such a rule:
u: ( << 3 day subscription >> ) Glad u join us.
If input is “Paid for a 3 day subscription yesterday” - it works correctly, but when first word belongs to concepts (~yes, ~no, ~emohello, etc.) “Yes, I paid for a 3 day subscription.” - it fails. If belonging to concepts word is on second, third… last position in sentence - it works too.
What am I doing wrong?


  [ # 1 ]

Nothing… but any time a sentence begins with an interjection (the concepts you named are all considered that, but not all concepts are interjections), then the system breaks it into two sentences.

My control topic would decide what to do with the interjection (many can be ignored) and perhaps merely move on to the 2nd sentence. Or both sentences might cause output.

You can “suppress” interjections entirely if you want to.  They are all defined via the substitutes.txt file in LIVEDATA. You could simply remove that file (or edit them out)


  [ # 2 ]

The substitutions file tells the system to rewrite the actual word with something else (or delete it). If the word is actually rewritten to be a ~word, that is considered an interjection.  It is ALSO a concept for pattern matching.


  [ # 3 ]

Thanks a lot.


  [ # 4 ]

Idea with substitutes is too useful to remove it completely. Anyway, this feature causes crash in linux. I’ve removed some code in mainSystem (part with “if (wordCount > 1 && wordStarts[1][0] == ‘~’)” ), and it is working awesome now.


  [ # 5 ]

I will change interjection spliiting system to be controllable from flag.  WHen you say “xxx causes crash in linux” can you provide more details. It should not crash anything and I should fix whatever you are referring to.


  [ # 6 ]

It crashes with “segmentation fault”. I promise, we’ll try to recreate occuring error soon.
One more question please: how can I process each sentence? It means, for example, input is: “It’s good day, isn’t it? How are you?” And bot generates output for each sentence: “Yes, it is. I’m fine, you?”


  [ # 7 ]

The control topic for the example Harry bot is in (topic: ~control )
Most of its output code has control under this: %response == 0
which says as long as you don’t have any output, try this…
So, once it has output, it is happy.

If you want each sentence to be responded to separately, then you want something more like this:

u: ($code=main)
    $$have = %respond
    $currenttopic = %topic

%respond == $$have # replacing all the existing tests of %response == 0

This would note what the output count is at start of processing, and try until it changes it.


  [ # 8 ]



  login or register to react