confabulator 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use 1.9.2@confabulator --create
1
+ rvm use 1.9.3@confabulator --create
@@ -1,10 +1,10 @@
1
1
  # Confabulator
2
2
 
3
- A recursive Ruby templating language for the procedural generation of random sentences.
3
+ A recursive syntax for the procedural generation of random sentences in Ruby.
4
4
 
5
5
  ## Why do I care?
6
6
 
7
- Perhaps you want to generate emails, text messages, or webpages that are all readable, but have different wording. Perhaps you're writing a game and want to vary character dialog. Perhaps you don't need a reason.
7
+ Perhaps you want to generate emails, text messages, or webpages that are all readable, but have different wordings. Perhaps you're writing a game and want to vary character dialog. Perhaps you're writing a testing language and need a concise way to express linguistic possibilities. Perhaps you don't need a reason.
8
8
 
9
9
  ## Install
10
10
 
@@ -87,13 +87,26 @@ Sometimes you want to insert user generated content without having to escape eve
87
87
 
88
88
  At the moment, sequences of more than one backtick are never allowed inside of a protected region.
89
89
 
90
+ ### Enumerating possible confabulations
91
+
92
+ You can output an array of all possible confabulations using `all_confabulations`, like so:
93
+
94
+ > Confabulator::Parser.new("{Hello|Hi} {world|there}").all_confabulations
95
+ => [
96
+ "Hello world",
97
+ "Hello there",
98
+ "Hi world",
99
+ "Hi there"
100
+ ]
101
+
102
+ Internally, this calls `tree`, which outputs a simplified confabulation parse tree.
103
+
90
104
  ## Next Steps
91
105
 
92
106
  Here are some things that could be added to this library:
93
107
 
94
- * Depth limits
95
- * Better escaping
96
- * Learning through back propagation of a reward signal and optimization of the choice nodes to make the rewarded or penalized outcome more or less likely, respectively.
108
+ * Depth limits / recursion detection
109
+ * Learning through back propagation of a reward signal and optimization of the choice nodes to make the rewarded or penalized outcome more or less likely.
97
110
  * Whatever you want!
98
111
 
99
112
  ## Helping out
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Confabulator::VERSION
8
8
  s.authors = ["Andrew Cantino"]
9
9
  s.email = ["andrew@iterationlabs.com"]
10
- s.homepage = ""
10
+ s.homepage = "https://github.com/cantino/confabulator"
11
11
  s.summary = %q{Ruby generative grammer for conversational text}
12
12
  s.description = %q{}
13
13
 
@@ -21,5 +21,6 @@ Gem::Specification.new do |s|
21
21
  # specify any dependencies here; for example:
22
22
  s.add_development_dependency "rspec"
23
23
  s.add_runtime_dependency "treetop"
24
+ s.add_runtime_dependency "loggability"
24
25
  s.add_runtime_dependency "linguistics"
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module Confabulator
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -127,7 +127,7 @@ describe Confabulator do
127
127
  end
128
128
 
129
129
  describe "listing all possible confabulations" do
130
- it "should be able to enumerate all possible onfabulations" do
130
+ it "should be able to enumerate all possible confabulations" do
131
131
  k = Confabulator::Knowledge.new
132
132
  k.add "friend" => "{friend|pal}"
133
133
  k.add "from" => "your [friend:c]"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confabulator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-25 00:00:00.000000000Z
12
+ date: 2013-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70350927242820 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,31 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70350927242820
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: treetop
27
- requirement: &70350927242400 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: loggability
48
+ requirement: !ruby/object:Gem::Requirement
28
49
  none: false
29
50
  requirements:
30
51
  - - ! '>='
@@ -32,10 +53,15 @@ dependencies:
32
53
  version: '0'
33
54
  type: :runtime
34
55
  prerelease: false
35
- version_requirements: *70350927242400
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
36
62
  - !ruby/object:Gem::Dependency
37
63
  name: linguistics
38
- requirement: &70350927241980 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
39
65
  none: false
40
66
  requirements:
41
67
  - - ! '>='
@@ -43,7 +69,12 @@ dependencies:
43
69
  version: '0'
44
70
  type: :runtime
45
71
  prerelease: false
46
- version_requirements: *70350927241980
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
47
78
  description: ''
48
79
  email:
49
80
  - andrew@iterationlabs.com
@@ -67,7 +98,7 @@ files:
67
98
  - spec/spec_helper.rb
68
99
  - src/confabulator_language.treetop
69
100
  - test_grammer.rb
70
- homepage: ''
101
+ homepage: https://github.com/cantino/confabulator
71
102
  licenses: []
72
103
  post_install_message:
73
104
  rdoc_options: []
@@ -87,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
118
  version: '0'
88
119
  requirements: []
89
120
  rubyforge_project: confabulator
90
- rubygems_version: 1.8.10
121
+ rubygems_version: 1.8.23
91
122
  signing_key:
92
123
  specification_version: 3
93
124
  summary: Ruby generative grammer for conversational text