GithubHelp home page GithubHelp logo

markov-bot's Introduction

Kunal Agrawal


An explanation of the markov depth :

It defines how many words to group before associating them with the following word.

For example, inputString = "My name is Kunal."

markovDepth = 1 Resulting Markov associations - {'is': ['Kunal.'], 'My': ['name'], 'name': ['is']}

markovDepth = 2 Resulting Markov associations - {'My name': ['is'], 'name is': ['Kunal.']}


TODO -

  • Add cmd line args
  • Make it listen to everything everyone says, except the things it itself says.
  • Break sentence on punctuations as well. Probably can just split on "" ( ) /". But don't separate period because it will be nice to have knowledge of ends of sentences.
  • Add a 5% or something chance to respond to every message. random.randint(1,100)
  • Make smart responses by building a backwards markov chains.
  • Add a chance to respond with multiple sentences.
  • Add some sort of natural language processing for sensible replies
  • Link to authorize my bot - https://discordapp.com/oauth2/authorize?&client_id=241600786470010881&scope=bot

(WORK IN PROGRESS)

How we plan to have the markov brain talk about a subject :

We have a reverse dictionary for our forward markov chain dictionary. So the above 2 depth association's reverse dictionary would look something like this - {'is': ['My name'], 'Kunal.': ['name is']}

Now, the key is followed by words which precede it. Now we can build a sentence forward and backwards from our two dictionaries!

This most efficient way of searching for the subject word is to have a third dictionary, which takes the keys from the first dictionary and splits it up into single word and associates every pair, just like you would do to the first dictionary if our markov depth was 1.

Building the sentence forward - Take dict 3, find our subject keyword in it, and follow this keyword's values down the rabbit hole markov depth times. Once we have a string of markov depth length, use this as a key for the first dictionary and building your forward sentence.

Building the sentence backwards - Since the backwards dictionary will always have keys with a depth of 1,

markov-bot's People

Contributors

kunal3 avatar

markov-bot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.