MARKOV


about


author:Bas van Oostveen
contact:IRCNET/#dunkbots
distribution:core
license:MIT

description


Markov Talk for Gozerbot

The Chain:
(predictate) -> [list of possible words]
TODO:
  • Propabilities
  • Start searching for full sentence, not just the first ORDER_K words of a sentence
BHJTW:
  • adapted for JSONBOT

commands


commands in this plugin:
 markov-learnadd .. markov-size .. markov-onjoinadd .. markov .. markov-cfg .. markov-disable .. markov-learnlist .. markov-onjoinremove .. markov-enable .. markov-learn .. markov-learndel .. markov-cfgsave

  1. markov .. [handle_markov]

    description:this is the command to make the bot reply a markov response
    permissions:USER .. WEB .. CLOUD
    code:jsb.plugs.socket.markov_markov_command.
    examples:
    <user> ;markov nice weather
    <output> none
  2. markov-cfg .. [cmnd_cfg]

    description:the config (cfg) command.
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-cfg_command.
    examples:
    <user> ;markov-cfg
    <output> options: cfile="/home/bart/.jsb/config/plugs/jsb.plugs.socket.markov" .. command=0 .. datadir="/home/bart/.jsb" .. dir="/home/bart/.jsb/config" .. enable=[u'["testbot", "#test"]', u'["testbot", "#dunkbots"]'] .. filename="plugs/jsb.plugs.socket.markov" .. hide=[] .. isdb=False .. isgae=False .. issaved=True .. jsondb=None .. loud=0 .. modname="jsb.plugs.socket.markov" .. onjoin=[[u'testbot', - 4 more
  3. markov-cfgsave .. [cmnd_cfgsave]

    description:save config.
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-cfgsave_command.
    examples:
    <user> ;markov-cfgsave
    <output> config saved
  4. markov-disable .. [handle_markovdisable]

    description:disable markov in a channel
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-disable_command.
    examples:
    <user> ;markov-disable
    <output> #test disabled
    <user> ;markov-disable #dunkbots
    <output> #dunkbots disabled
  5. markov-enable .. [handle_markovenable]

    description:enable markov in a channel .. learn the log of that channel
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-enable_command.
    examples:
    <user> ;markov-enable
    <output> #test enabled
    <user> ;markov-enable #dunkbots
    <output> #dunkbots enabled
  6. markov-learn .. [handle_markovlearn]

    description:command to let the bot learn a log or an url .. learned data is not persisted
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-learn_command.
    examples:
    <user> ;markov-learn #dunkbots
    <output> learning log file #dunkbots
    <output> learned 0 lines
    <user> ;markov-learn http://gozerbot.org
    <output> learned 589 lines
  7. markov-learnadd .. [handle_markovlearnadd]

    description:add log or url to be learned at startup or reload
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-learnadd_command.
    examples:
    <user> ;markov-learnadd #dunkbots
    <output> #dunkbots is already in learnlist
    <user> ;markov-learnadd http://jsonbot.org
    <output> done
  8. markov-learndel .. [handle_markovlearndel]

    description:remove item from learnlist
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-learndel_command.
    examples:
    <user> ;markov-learndel #dunkbots
    <output> done
    <user> ;markov-learndel http://jsonbot.org
    <output> done
  9. markov-learnlist .. [handle_markovlearnlist]

    description:show the learnlist
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-learnlist_command.
    examples:
    <user> ;markov-learnlist
    <output> ['#test']
  10. markov-onjoinadd .. [handle_markovonjoinadd]

    description:add channel to onjoin list
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-onjoinadd_command.
    examples:
    <user> ;markov-onjoinadd
    <output> #test added
    <user> ;markov-onjoinadd #dunkbots
    <output> #dunkbots added
  11. markov-onjoinremove .. [handle_markovonjoinremove]

    description:remove channel from onjoin list
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-onjoinremove_command.
    examples:
    <user> ;markov-onjoinremove
    <output> #test removed
    <user> ;markov-onjoinremove #dunkbots
    <output> #dunkbots removed
  12. markov-size .. [handle_markovsize]

    description:markov-size .. returns size of markovchains
    permissions:OPER
    code:jsb.plugs.socket.markov_markov-size_command.
    examples:
    <user> ;markov-size
    <output> I know 6320 phrases

Table Of Contents

Previous topic

LMGT

Next topic

MPD

This Page