Giter VIP home page Giter VIP logo

hubot-markov's Introduction

Hubot Markov Model

Generates a markov model based on everything that your Hubot sees in your chat.

Installing

  1. Add hubot-markov to your package.json with npm install --save hubot-markov:
  "dependencies": {
    "hubot-markov": "~1.6.0"
  },
  1. Require the module in external-scripts.json:
["hubot-markov"]
  1. Run npm update and restart your Hubot.

Commands

Saying anything at all in chat appends to the model. The robot is always watching!

Hubot: markov will randomly generate text based on the current contents of its model.

Hubot: markov your mother is a will generate a random phrase seeded with the phrase you give it. This command might output "your mother is a classy lady", for example. Remember: Hubot is an innocent soul, and what he says only acts as a mirror for everything in your hearts.

Hubot: remarkov and Hubot: mmarkov are similar, but traverse node transitions in different directions: remarkov chains backwards from a given ending state, and mmarkov chains both forward and backward.

Configuring

The Hubot markov model can optionally be configured by four environment variables:

HUBOT_MARKOV_PLY controls the order of the model that's built; effectively, how many previous states (words) are considered to choose the next state. You can bump this up if you'd like, but the default of 1 is both economical with storage and maximally hilarious.

HUBOT_MARKOV_LEARN_MIN controls the minimum length of a phrase that will be used to train the model, default 1. Set this higher to avoid training your model with a bunch of immediate terminal transitions like "lol".

HUBOT_MARKOV_GENERATE_MAX controls the maximum size of a markov chain that will be generated by the "markov" command.

HUBOT_MARKOV_RESPOND_CHANCE controls the chance that Hubot will respond un-prompted to a message it sees by using the last word in the message as the seed. Set this to a value between 0 and 1.0 to enable the feature. Leaving this variable unset or setting it to 0 will disable the feature.

HUBOT_MARKOV_NOREVERSE, if set, will prevent the reverse model from being generated. This saves some space in your database, but doesn't let you use remarkov or mmarkov.

HUBOT_MARKOV_IGNORELIST is interpreted as a comma-separated list of usernames to ignore for purposes of markov indexing. You can use this to prevent the output of other bots or integrations from clogging up your model. By default, Hubot sees all messages.

hubot-markov's People

Contributors

atiaxi avatar bsiegel avatar ollitapa avatar rgbkrk avatar smashwilson avatar stormwarning avatar tombell avatar

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.