Skip to content

makarenk0/PhaticChatBot_Telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhaticChatBot_Telegram

Chat bot which maintains phatic dialogue with user.

Guide

For users:
Just search in telegram @PhaticChatBotor just go to PhaticChatBot
Start conversation with him.

For owners:
Chat bot has some commands:

  • /help - helping information
  • /info - short information about storage content
  • /add <storage key> <word types to add> <word to add>
    - adding new words(only words, not sentences patterns) to storage(not working yet)
    This commands is supposed to simplify patterns.json updating
  • /metric <metric name> - used to display some metrics, for example cpu use percentage, available RAM etc.
    Command without parametr will display possible parametrs

If you want to modify sentences pattrens you have to write manually in `patterns.json`.

Example of pattern

"Statements" : {
    ">p (i|you) >v >a *" : ">r >v >r >p really >a * ?",
}

The key of the element means which pattern is expected, the value means how to generate answer
For example here fits phrase I am a programmer, and the answer will be Are you really a programmer ?

>p after > goes key token which means that in this place could be any pronoun which bot knows. Similarly >v - verb, >a - article
>r means "replace next word with a word from Replacements" For example it's useful when you want to change you -> i and etc.
* means any other word
also after key token you can specify in brackets which words could be here
For example: in ">p (i|you) >v >a *" in pronoun place could be only i or you

Remember:
⏬ Patterns finder reads object from top to the bottom

"Statements" : {
   ">p (i|you) >v >a *" : ">r >v >r >p really >a * ?",
   ">p >v >a *" : ">v >p really >a * ?",
}

⏬ which means that you have to place more specific patterns higher and general ones - lower

Libs, frameworks and deployment

Frameworks: .NET Framework 4.7.2, ASP.NET 3.0
Libs: Porter2Stemmer, Telegram.Bot
Deployed to Microsoft Azure
Interaction with Telegram through webhooks

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published