markov_text_generator 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rubocop.yml +9 -0
- data/.travis.yml +4 -0
- data/.yardopts +13 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +35 -0
- data/cucumber.yml +7 -0
- data/lib/markov_text_generator/api/.DS_Store +0 -0
- data/lib/markov_text_generator/api/errors.rb +9 -0
- data/lib/markov_text_generator/api/interface.rb +19 -0
- data/lib/markov_text_generator/api/model/knowledge/.DS_Store +0 -0
- data/lib/markov_text_generator/api/model/knowledge/entry.rb +43 -0
- data/lib/markov_text_generator/api/model/knowledge/registry.rb +26 -0
- data/lib/markov_text_generator/api/model/knowledge.rb +36 -0
- data/lib/markov_text_generator/api/model.rb +46 -0
- data/lib/markov_text_generator/api/utils/data_structures/linked_list/impl.rb +96 -0
- data/lib/markov_text_generator/api/utils/data_structures/linked_list/node.rb +20 -0
- data/lib/markov_text_generator/api/utils/data_structures/linked_list.rb +16 -0
- data/lib/markov_text_generator/api/utils/data_structures.rb +9 -0
- data/lib/markov_text_generator/api/utils.rb +11 -0
- data/lib/markov_text_generator/api.rb +8 -0
- data/lib/markov_text_generator/version.rb +3 -0
- data/lib/markov_text_generator.rb +34 -0
- data/markov_text_generator.gemspec +32 -0
- data/script/console +7 -0
- metadata +185 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1dcfe1e3e463585143b71beb8916412fcf67d9cc
|
4
|
+
data.tar.gz: 7f58008ba3b34ccc108fd48abc80be1ae7257489
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a99ef44789f25a01d5bcff79b42f58e7b14edddca0f2305e9504218185abd2b886881ba66aa3c9057c0c6a65faf8f085e82b1c3f62cb09adb142b40ce6012e75
|
7
|
+
data.tar.gz: a7a04d3e49d898e97e458f124a237de0f8ae4d15f8df41a11db0d0046984b2d030b02870b1e6e878b7b833bfe62491992b908f4afc9ca755dd84eebbef5ed25e
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--plugin 'yard-cucumber'
|
2
|
+
--protected
|
3
|
+
--no-private
|
4
|
+
--embed-mixin ClassMethods
|
5
|
+
--tag yard.signature:"YARD Tag Signature"
|
6
|
+
--tag valid_values:"Valid values"
|
7
|
+
--tag default_value:"Default value"
|
8
|
+
--type-name-tag yard.tag:"YARD Tag"
|
9
|
+
--type-name-tag yard.directive:"YARD Directive"
|
10
|
+
--hide-tag yard.tag
|
11
|
+
--hide-tag yard.directive
|
12
|
+
--hide-tag yard.signature
|
13
|
+
-
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Roman Lishtaba
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# MarkovTextGenerator
|
2
|
+
|
3
|
+
This is simple implementation of the probability distribution based on the current state and not on the sequence of events that is preceded it.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'markov_text_generator'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install markov_text_generator
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
model = MarkovTextGenerator.new
|
24
|
+
|
25
|
+
model.train 'hello world, hello buddy, hello world'
|
26
|
+
|
27
|
+
model.predict_next_word_for 'hello'
|
28
|
+
|
29
|
+
#=> 'world' # Most likely
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rlishtaba/markov_text_generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
34
|
+
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
39
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/clean'
|
3
|
+
|
4
|
+
CLEAN.include(
|
5
|
+
'pkg',
|
6
|
+
'doc',
|
7
|
+
'coverage',
|
8
|
+
'*.gem'
|
9
|
+
)
|
10
|
+
|
11
|
+
desc 'Run all tests and collect code coverage'
|
12
|
+
task :cov do
|
13
|
+
ENV['SIMPLECOV'] = 'features'
|
14
|
+
Rake::Task['default'].invoke
|
15
|
+
end
|
16
|
+
|
17
|
+
require 'cucumber/rake/task'
|
18
|
+
|
19
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
20
|
+
t.fork = true
|
21
|
+
t.profile = :default
|
22
|
+
end
|
23
|
+
|
24
|
+
task cucumber: :features
|
25
|
+
|
26
|
+
require 'rspec/core/rake_task'
|
27
|
+
|
28
|
+
desc 'Run RSpec'
|
29
|
+
RSpec::Core::RakeTask.new do |t|
|
30
|
+
t.fail_on_error = false
|
31
|
+
t.verbose = true
|
32
|
+
t.rspec_opts = '--format RspecJunitFormatter --out rspec.xml --tag ~wip'
|
33
|
+
end
|
34
|
+
|
35
|
+
task default: [:spec, :features]
|
data/cucumber.yml
ADDED
Binary file
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
module Interface
|
4
|
+
include MarkovTextGenerator::Api::Utils
|
5
|
+
|
6
|
+
def train(sentence)
|
7
|
+
fail NotImplementedError, sentence
|
8
|
+
end
|
9
|
+
|
10
|
+
def retrain(sentence)
|
11
|
+
fail NotImplementedError, sentence
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate(max_words)
|
15
|
+
fail NotImplementedError, max_words
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
Binary file
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
class Model
|
4
|
+
class Knowledge
|
5
|
+
class RandomProxy
|
6
|
+
def initialize
|
7
|
+
@engine = Random
|
8
|
+
end
|
9
|
+
|
10
|
+
def generate(size)
|
11
|
+
@engine.rand size
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Entry
|
16
|
+
def initialize(word, random_generator = RandomProxy.new)
|
17
|
+
@current_word = word
|
18
|
+
@random_generator = random_generator
|
19
|
+
@next_words = []
|
20
|
+
end
|
21
|
+
|
22
|
+
def add_next_word(word)
|
23
|
+
@next_words.push word
|
24
|
+
end
|
25
|
+
|
26
|
+
def predict_next_word
|
27
|
+
@next_words[random_pick]
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_s
|
31
|
+
@current_word
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def random_pick
|
37
|
+
@random_generator.generate @next_words.length
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
class Model
|
4
|
+
class Knowledge
|
5
|
+
class Registry
|
6
|
+
def initialize
|
7
|
+
@registry = {}
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_new_entry(key)
|
11
|
+
@registry[key] ||= Entry.new key
|
12
|
+
@registry[key]
|
13
|
+
end
|
14
|
+
|
15
|
+
def clear!
|
16
|
+
@registry.clear
|
17
|
+
end
|
18
|
+
|
19
|
+
def [](key)
|
20
|
+
@registry.fetch key
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
class Model
|
4
|
+
class Knowledge
|
5
|
+
autoload :Entry, 'markov_text_generator/api/model/knowledge/entry'
|
6
|
+
autoload :Registry, 'markov_text_generator/api/model/knowledge/registry'
|
7
|
+
include MarkovTextGenerator::Api::Utils
|
8
|
+
|
9
|
+
def initialize(registry = Registry.new)
|
10
|
+
@registry = registry
|
11
|
+
end
|
12
|
+
|
13
|
+
def train(list)
|
14
|
+
list.each do |node|
|
15
|
+
entry = add_new_entry node.data
|
16
|
+
entry.add_next_word node.succ.data if node.succ
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def predict_next_word(key)
|
21
|
+
@registry[key].predict_next_word
|
22
|
+
end
|
23
|
+
|
24
|
+
def clear!
|
25
|
+
@registry.clear!
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def add_new_entry(data)
|
31
|
+
@registry.add_new_entry data
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
class Model
|
4
|
+
include MarkovTextGenerator::Api::Interface
|
5
|
+
autoload :Knowledge, 'markov_text_generator/api/model/knowledge'
|
6
|
+
|
7
|
+
CLEAN = /\W+/
|
8
|
+
|
9
|
+
def initialize(knowledge = Knowledge.new)
|
10
|
+
@knowledge = knowledge
|
11
|
+
end
|
12
|
+
|
13
|
+
def train(sentence)
|
14
|
+
words = prepare_string(sentence).split
|
15
|
+
list = process_data words
|
16
|
+
@knowledge.train list
|
17
|
+
end
|
18
|
+
|
19
|
+
def retrain(sentence)
|
20
|
+
become_silly!
|
21
|
+
train sentence
|
22
|
+
end
|
23
|
+
|
24
|
+
def predict_next_word_for(key)
|
25
|
+
@knowledge.predict_next_word key
|
26
|
+
end
|
27
|
+
|
28
|
+
def become_silly!
|
29
|
+
@knowledge.clear!
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def process_data(collection)
|
35
|
+
list = make_linked_list
|
36
|
+
collection.each_with_object(list) do |item, object|
|
37
|
+
object.push item
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def prepare_string(sentence)
|
42
|
+
sentence.gsub CLEAN, ' '
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
module Utils
|
4
|
+
module DataStructures
|
5
|
+
module LinkedList
|
6
|
+
class Impl
|
7
|
+
include MarkovTextGenerator::Api::Errors
|
8
|
+
include Enumerable
|
9
|
+
attr_reader :length
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@head = nil
|
13
|
+
@tail = nil
|
14
|
+
@length = 0
|
15
|
+
@op_counter = 0
|
16
|
+
end
|
17
|
+
|
18
|
+
def unshift(data)
|
19
|
+
link_head_node data
|
20
|
+
end
|
21
|
+
|
22
|
+
def push(data)
|
23
|
+
link_tail_node data
|
24
|
+
end
|
25
|
+
|
26
|
+
def first
|
27
|
+
@head ? @head.dup : fail_index_error
|
28
|
+
end
|
29
|
+
|
30
|
+
def last
|
31
|
+
@tail ? @tail.dup : fail_index_error
|
32
|
+
end
|
33
|
+
|
34
|
+
def each(&block)
|
35
|
+
next_node = @head
|
36
|
+
nodes = []
|
37
|
+
while next_node
|
38
|
+
nodes << next_node
|
39
|
+
next_node = next_node.succ
|
40
|
+
end
|
41
|
+
nodes.each(&block)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def link_head_node(data)
|
47
|
+
prev_head = @head
|
48
|
+
node = make_node data, nil, prev_head
|
49
|
+
@head = node
|
50
|
+
|
51
|
+
if prev_head
|
52
|
+
prev_head.pred = node
|
53
|
+
else
|
54
|
+
@tail = node
|
55
|
+
end
|
56
|
+
|
57
|
+
bump_length!
|
58
|
+
bump_op_counter!
|
59
|
+
end
|
60
|
+
|
61
|
+
def link_tail_node(data)
|
62
|
+
prev_tail = @tail
|
63
|
+
node = make_node data, prev_tail, nil
|
64
|
+
@tail = node
|
65
|
+
|
66
|
+
if prev_tail
|
67
|
+
prev_tail.succ = node
|
68
|
+
else
|
69
|
+
@head = node
|
70
|
+
end
|
71
|
+
|
72
|
+
bump_length!
|
73
|
+
bump_op_counter!
|
74
|
+
end
|
75
|
+
|
76
|
+
def make_node(data, pred = nil, succ = nil)
|
77
|
+
Node.new data, pred, succ
|
78
|
+
end
|
79
|
+
|
80
|
+
def bump_length!
|
81
|
+
@length = @length.next
|
82
|
+
end
|
83
|
+
|
84
|
+
def bump_op_counter!
|
85
|
+
@op_counter = @op_counter.next
|
86
|
+
end
|
87
|
+
|
88
|
+
def fail_index_error(message = nil)
|
89
|
+
fail IndexError, message
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
module Utils
|
4
|
+
module DataStructures
|
5
|
+
module LinkedList
|
6
|
+
class Node
|
7
|
+
attr_accessor :pred, :succ
|
8
|
+
attr_reader :data
|
9
|
+
|
10
|
+
def initialize(data, pred = nil, succ = nil)
|
11
|
+
@data = data
|
12
|
+
@pred = pred
|
13
|
+
@succ = succ
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
module Utils
|
4
|
+
module DataStructures
|
5
|
+
module LinkedList
|
6
|
+
autoload :Node, 'markov_text_generator/api/utils/data_structures/linked_list/node'
|
7
|
+
autoload :Impl, 'markov_text_generator/api/utils/data_structures/linked_list/impl'
|
8
|
+
|
9
|
+
def self.new
|
10
|
+
Impl.new
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module MarkovTextGenerator
|
2
|
+
module Api
|
3
|
+
autoload :Errors, 'markov_text_generator/api/errors'
|
4
|
+
autoload :Utils, 'markov_text_generator/api/utils'
|
5
|
+
autoload :Interface, 'markov_text_generator/api/interface'
|
6
|
+
autoload :Model, 'markov_text_generator/api/model'
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__))
|
2
|
+
require 'markov_text_generator/version'
|
3
|
+
require 'English'
|
4
|
+
require 'pathname'
|
5
|
+
require 'logger'
|
6
|
+
|
7
|
+
module MarkovTextGenerator
|
8
|
+
autoload :Api, 'markov_text_generator/api'
|
9
|
+
|
10
|
+
class << self
|
11
|
+
|
12
|
+
# @example
|
13
|
+
#
|
14
|
+
# model = MarkovTextGenerator.new
|
15
|
+
#
|
16
|
+
# model.train 'hello world, hello buddy, hello world'
|
17
|
+
#
|
18
|
+
# model.predict_next_word_for 'hello'
|
19
|
+
#
|
20
|
+
# #=> 'world' # Most likely
|
21
|
+
#
|
22
|
+
def new
|
23
|
+
Api::Model.new
|
24
|
+
end
|
25
|
+
|
26
|
+
def logger
|
27
|
+
@logger ||= Logger.new $stdout
|
28
|
+
end
|
29
|
+
|
30
|
+
def root
|
31
|
+
@root ||= Pathname File.expand_path('../../', __FILE__)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'markov_text_generator/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'markov_text_generator'
|
8
|
+
spec.version = MarkovTextGenerator::VERSION
|
9
|
+
spec.authors = ['Roman Lishtaba']
|
10
|
+
spec.email = ['roman@lishtaba.com']
|
11
|
+
|
12
|
+
spec.summary = 'Simple Markov text generator '
|
13
|
+
spec.description = 'Simple Markov text generator example'
|
14
|
+
spec.homepage = 'https://github.com/rlishtaba/markov_text_generator'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = 'exe'
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
spec.add_development_dependency 'rubocop'
|
27
|
+
spec.add_development_dependency 'simplecov'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
29
|
+
spec.add_development_dependency 'cucumber', '~> 1.3'
|
30
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
31
|
+
spec.add_development_dependency 'yard'
|
32
|
+
end
|
data/script/console
ADDED
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: markov_text_generator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Roman Lishtaba
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: cucumber
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec_junit_formatter
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: yard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Simple Markov text generator example
|
126
|
+
email:
|
127
|
+
- roman@lishtaba.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- ".rubocop.yml"
|
134
|
+
- ".travis.yml"
|
135
|
+
- ".yardopts"
|
136
|
+
- CODE_OF_CONDUCT.md
|
137
|
+
- Gemfile
|
138
|
+
- LICENSE.txt
|
139
|
+
- README.md
|
140
|
+
- Rakefile
|
141
|
+
- cucumber.yml
|
142
|
+
- lib/markov_text_generator.rb
|
143
|
+
- lib/markov_text_generator/api.rb
|
144
|
+
- lib/markov_text_generator/api/.DS_Store
|
145
|
+
- lib/markov_text_generator/api/errors.rb
|
146
|
+
- lib/markov_text_generator/api/interface.rb
|
147
|
+
- lib/markov_text_generator/api/model.rb
|
148
|
+
- lib/markov_text_generator/api/model/knowledge.rb
|
149
|
+
- lib/markov_text_generator/api/model/knowledge/.DS_Store
|
150
|
+
- lib/markov_text_generator/api/model/knowledge/entry.rb
|
151
|
+
- lib/markov_text_generator/api/model/knowledge/registry.rb
|
152
|
+
- lib/markov_text_generator/api/utils.rb
|
153
|
+
- lib/markov_text_generator/api/utils/data_structures.rb
|
154
|
+
- lib/markov_text_generator/api/utils/data_structures/linked_list.rb
|
155
|
+
- lib/markov_text_generator/api/utils/data_structures/linked_list/impl.rb
|
156
|
+
- lib/markov_text_generator/api/utils/data_structures/linked_list/node.rb
|
157
|
+
- lib/markov_text_generator/version.rb
|
158
|
+
- markov_text_generator.gemspec
|
159
|
+
- script/console
|
160
|
+
homepage: https://github.com/rlishtaba/markov_text_generator
|
161
|
+
licenses:
|
162
|
+
- MIT
|
163
|
+
metadata: {}
|
164
|
+
post_install_message:
|
165
|
+
rdoc_options: []
|
166
|
+
require_paths:
|
167
|
+
- lib
|
168
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
requirements: []
|
179
|
+
rubyforge_project:
|
180
|
+
rubygems_version: 2.2.2
|
181
|
+
signing_key:
|
182
|
+
specification_version: 4
|
183
|
+
summary: Simple Markov text generator
|
184
|
+
test_files: []
|
185
|
+
has_rdoc:
|