Home > marko

marko

Marko is a project mainly written in Python, it's free.

bog simple markov

Help on module marko:

NAME marko

FILE marko.py

DESCRIPTION bog simple markov module use: instantiate a Markov() use slurpfile, slurpstring to feed use markov, vokram, markov2 for output command line example: run marko.py -h

CLASSES builtin.object Markov Sqlite

class Markov(__builtin__.object)
 |  base markov class
 |  
 |  Methods defined here:
 |  
 |  __init__(self, db, name)
 |      only sqlite supported at the moment
 |  
 |  markov(self, phrase)
 |      chain starting with phrase
 |  
 |  markov2(self, phrase)
 |      chain containing phrase
 |  
 |  slurpfile(self, file)
 |      feed the engine a file
 |  
 |  slurpstring(self, string)
 |      feed the engine a string
 |  
 |  vokram(self, phrase)
 |      chain ending in phrase
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)

class Sqlite(__builtin__.object)
 |  Methods defined here:
 |  
 |  __init__(self, name)
 |      sqlite database
 |  
 |  commit(self)
 |  
 |  insert(self, triple)
 |  
 |  next(self, word1, word2)
 |  
 |  omid(self, word)
 |  
 |  onext(self, word)
 |  
 |  oprev(self, word)
 |  
 |  prev(self, word1, word2)
 |  
 |  rand(self)
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)