markov_chain 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/History.txt +4 -0
- data/README.rdoc +8 -2
- data/VERSION +1 -1
- data/lib/markov_chain.rb +2 -2
- data/markov_chain.gemspec +1 -1
- metadata +3 -3
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -9,7 +9,7 @@ A simple library for creating Markov chains from strings of text.
|
|
9
9
|
require 'markov_chain'
|
10
10
|
|
11
11
|
# Generate a chain and return the results
|
12
|
-
MarkovChain.
|
12
|
+
MarkovChain.grow_string 'foo' # ["foo", "foon", "foone", "foona", "foong", "foonan", "foones" ...
|
13
13
|
|
14
14
|
# Explicitly load the default dictionary
|
15
15
|
MarkovChain.load_dictionary!
|
@@ -24,7 +24,13 @@ A simple library for creating Markov chains from strings of text.
|
|
24
24
|
MarkovChain.dictionary # '/path/to/dictionary'
|
25
25
|
|
26
26
|
# Specify the max number of words returned and the size of those words
|
27
|
-
MarkovChain.
|
27
|
+
MarkovChain.grow_string('foo', :max_size => 6, :max_word_length => 4) # ["foo", "foon", "foong", "foone", "foona", "foongl"]
|
28
|
+
|
29
|
+
== LIMITATIONS
|
30
|
+
|
31
|
+
This library currently only supports the extension of words, character by
|
32
|
+
character. In the future, it ought to be able to build a Markov Chain using
|
33
|
+
any kind of input array.
|
28
34
|
|
29
35
|
== INSTALL:
|
30
36
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/markov_chain.rb
CHANGED
data/markov_chain.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markov_chain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alex Rabarts
|