markov-reloaded 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/markov-reloaded.rb +1 -1
- metadata +15 -4
data/lib/markov-reloaded.rb
CHANGED
@@ -101,7 +101,7 @@ class Markov
|
|
101
101
|
#Given a maximum length, and a point at which to begin the generation(this can be either the empty list, in which case the generation begins at a random point,
|
102
102
|
# a list of elements with lengt=order, in which case it begins with them or a Method object accepting two arguments, which will be passed the Hash of data that makes up this Markov object
|
103
103
|
# and a random seed, which must then return a usable list of elements at which the generation will then start) and a seed for the random number generator and an element at which to
|
104
|
-
|
104
|
+
#terminate(defaults to "."). Generates and outputs an array corresponding to a markov chain.
|
105
105
|
def generate(maxlength, first= [], seed=(Time.now.nsec), terminator = ".")
|
106
106
|
r = Random.new seed
|
107
107
|
if first.class == Method
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markov-reloaded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,19 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
-
dependencies:
|
12
|
+
date: 2012-09-02 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: string-enumerable
|
16
|
+
requirement: &83119500 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *83119500
|
14
25
|
description: ! "markov-reloaded provides a simple interface to create markov chains.\n\tthe
|
15
26
|
system is based on hashes, but provides flexible methods to generate the chains
|
16
27
|
based on any array, and to generate suitable arrays from strings.\n\tIn addition,
|
@@ -44,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
55
|
version: '0'
|
45
56
|
requirements: []
|
46
57
|
rubyforge_project:
|
47
|
-
rubygems_version: 1.8.
|
58
|
+
rubygems_version: 1.8.11
|
48
59
|
signing_key:
|
49
60
|
specification_version: 3
|
50
61
|
summary: flexible, hash-based system for markov chain generation
|