Project

bard_bot

0.0
No commit activity in last 3 years
No release in over 3 years
BardBot can generate markov sentences for your from a number of Shakespearean character corpora
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.1
 Project Readme

Bard Bot -- Shakespearean Markov Build Status

Installation:

$ gem install bard_bot

Usage:

require 'bard_bot'
BardBot.config do |config|
  c.character = :lear
  c.prefix = 3
end
BardBot.generate_sentence

Available Configuration:

  • :character (default :hamlet) - Choose character corpus. Use BardBot.characters to see available. :random is also a supported option.
  • :prefix (default 2) - Markov prefix to use when generating sentences. Lower prefixes will give more chaotic output and higher prefixes will give output closer to corpus material.
  • :max_length (default 100) - Maximum length in words for a generated sentence. Sentences will terminates on a valid punctuation or the maximum length, whichever is shorter.
  • :character_dir (default :default) - Directory for corpus. Another directory besides the default can be specified here to support input.