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

Additional file with synonyms
 
 

I want to create a big file with synonyms. The idea is that when user write something and there is no exact pattern in standard .rive file, the script open additional file with synonyms and match the most fitting reply. (For example: you told to bot “you are a dumb”, but the closest pattern is “you are a moron”)

***

The semi-code with examples:

msg = input(‘you are a dumb’)
if bot doesn’t recognize a word ‘dumb’:
open synonyms.rive
find a line with ‘dumb’
check other synonyms in line

if there is a word that matches with any of the answers:
  go to standard .rive files in brain
  find a pattern with the best match (example: ‘you are a moron’)
  send a reply (‘You are not nice!’)

***

Example of synonyms.rive

// Synonyms

+ (dumb|idiot|moron)
+ (cat|kitty|kitten)
+ (girl|lady|woman)

***

I know that RiveScript can use synonyms, but I want to resolve it in different way - it will be easier to manage one file with synonyms dictionary. I just found a dictionary related to my native language and it also includes grammatical variations, as it is highly fusional. I want to change the way RiveScript works a bit. I know this will slow down the bot, but I don’t care about it right now.

I will be grateful for some advice.

 

 
  login or register to react