Sha256: 403424438146785fde6ab95eb02813d72b336a82f5d1ae55d4c479020bd6148e
Contents?: true
Size: 676 Bytes
Versions: 6
Compression:
Stored size: 676 Bytes
Contents
#!/usr/bin/env ruby # Markov Chain Generator # based on the Python version by Gary Burd: http://gary.burd.info/2003/11/markov-chain-generator.html # Released into the public domain, please keep this notice intact # (c) InVisible GmbH # http://www.invisible.ch # require "YAML" module KeySelector SEPARATOR = "#-#-" def new_key(key, word) return SEPARATOR if word == "\n" word or key end end require './words' if __FILE__ == $0 then storage = Storage.new file = ARGV[0] storage.load "markov.yaml" unless file if file storage.add Markov.from_file file storage.save "markov.yaml" end require 'ruby-debug' puts storage.to_words end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
markov_uuid-0.0.7 | storage.rb |
markov_uuid-0.0.6 | storage.rb |
markov_uuid-0.0.5 | storage.rb |
markov_uuid-0.0.3 | storage.rb |
markov_uuid-0.0.2 | storage.rb |
markov_uuid-0.0.1 | storage.rb |