WeaverBot 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/lib/WeaverBot.rb +109 -3
- data/lib/WeaverBot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78d2eef337b8a1bd5feafe7434e007c50211f14b7963b5dc9d13a438190ef7d3
|
|
4
|
+
data.tar.gz: 6385d15375aef124fc8442348285be8849c3cee39ba23b67e1d6e6317790bfcb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a82f560809ec6ad0dc3b9f5d6416eb84402075497de4b34a234b6a1b6c7be6354da62468ba51219aeeabfd2423cde9712b65366b97935f7e626c8800b445d5ba
|
|
7
|
+
data.tar.gz: bf35d059d7f833551ea298f8622d81838bc21cc19d87536e6ce31aec95ba8a11e1eacdae0c8d3f2f35ef5951f538853707ed4711c784a62d2046e3183fe135d6
|
data/lib/WeaverBot.rb
CHANGED
|
@@ -2,6 +2,100 @@ require "WeaverBot/version"
|
|
|
2
2
|
|
|
3
3
|
module WeaverBot
|
|
4
4
|
class Error < StandardError; end
|
|
5
|
+
|
|
6
|
+
# class AILanguage
|
|
7
|
+
# def self.train_language
|
|
8
|
+
# require "naive_bayes"
|
|
9
|
+
# end
|
|
10
|
+
#
|
|
11
|
+
# def self.classify_word
|
|
12
|
+
# require "naive_bayes"
|
|
13
|
+
# end
|
|
14
|
+
#
|
|
15
|
+
# def self.classify_many_words
|
|
16
|
+
# require "naive_bayes"
|
|
17
|
+
# end
|
|
18
|
+
#
|
|
19
|
+
# def self.train_aiml_on_words
|
|
20
|
+
# require "duck_duck_go"
|
|
21
|
+
# require "naive_bayes"
|
|
22
|
+
# end
|
|
23
|
+
# end
|
|
24
|
+
|
|
25
|
+
## This is a list of image drawing methods. Later addition will involve TTY.
|
|
26
|
+
class AIDrawing
|
|
27
|
+
def self.line
|
|
28
|
+
require "rules_ai"
|
|
29
|
+
|
|
30
|
+
RulesAi::Rules_Set.line
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.square
|
|
34
|
+
require "rules_ai"
|
|
35
|
+
|
|
36
|
+
RulesAi::Rules_Set.square
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.cube
|
|
40
|
+
require "rules_ai"
|
|
41
|
+
|
|
42
|
+
RulesAi::Rules_Set.cube
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.hyper
|
|
46
|
+
require "rules_ai"
|
|
47
|
+
|
|
48
|
+
RulesAi::Rules_Set.hyper
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def self.image
|
|
52
|
+
image_number = File.read("data/image/number/input.txt").strip.to_i
|
|
53
|
+
image_list = File.readlines("data/image/images/image_list.txt")
|
|
54
|
+
|
|
55
|
+
active_image = image_list[image_number]
|
|
56
|
+
|
|
57
|
+
system("jp2a #{active_image}.jpeg")
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
## This is a list of common AI rules across chatbots.
|
|
62
|
+
class AIRulesets
|
|
63
|
+
def self.give_hours
|
|
64
|
+
require "rules_ai"
|
|
65
|
+
|
|
66
|
+
RulesAi::Rules_Set.hours_passed
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def self.tesla_multiplication
|
|
70
|
+
require "rules_ai"
|
|
71
|
+
|
|
72
|
+
RulesAi::Rules_Set.tesla_multiplication
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def self.autonomous_prompting
|
|
76
|
+
require "rules_ai"
|
|
77
|
+
|
|
78
|
+
RulesAi::Rules_Set.autonomous_prompting
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def self.calculate_hyper
|
|
82
|
+
require "rules_ai"
|
|
83
|
+
|
|
84
|
+
RulesAi::Rules_Set.calculate_hyper
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def self.estimate_digest
|
|
88
|
+
require "rules_ai"
|
|
89
|
+
|
|
90
|
+
RulesAi::Rules_Set.estimate_digest
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def self.write_poetry
|
|
94
|
+
require "rules_ai"
|
|
95
|
+
|
|
96
|
+
RulesAi::Rules_Set.write_poetry
|
|
97
|
+
end
|
|
98
|
+
end
|
|
5
99
|
|
|
6
100
|
class Data
|
|
7
101
|
def self.download
|
|
@@ -16,6 +110,8 @@ module WeaverBot
|
|
|
16
110
|
end
|
|
17
111
|
|
|
18
112
|
class Perform
|
|
113
|
+
|
|
114
|
+
## I haven't included Write Renpy Script, as that still need to be bug tested.
|
|
19
115
|
def self.chatbot
|
|
20
116
|
require "programr"
|
|
21
117
|
|
|
@@ -35,10 +131,20 @@ module WeaverBot
|
|
|
35
131
|
|
|
36
132
|
reaction = robot.get_reaction(s)
|
|
37
133
|
|
|
38
|
-
if
|
|
39
|
-
|
|
134
|
+
if reaction == ""
|
|
40
135
|
STDOUT.puts "#{bot_name} << I have no idea."
|
|
41
|
-
elsif reaction == "
|
|
136
|
+
elsif reaction == "Lets check the hours."; WeaverBot::AIRulesets.give_hours
|
|
137
|
+
elsif reaction == "Lets do Tesla arithmetic."; WeaverBot::AIRulesets.tesla_multiplication
|
|
138
|
+
elsif reaction == "Lets give a morning prompt."; WeaverBot::AIRulesets.autonomous_prompting
|
|
139
|
+
elsif reaction == "Lets measure a hypercube."; WeaverBot::AIRulesets.calculate_hyper
|
|
140
|
+
elsif reaction == "Lets estimate digest size."; WeaverBot::AIRulesets.estimate_digest
|
|
141
|
+
elsif reaction == "Lets write some poetry."; WeaverBot::AIRulesets.write_poetry
|
|
142
|
+
elsif reaction == "Lets draw a line."; WeaverBot::AIRulesets.line
|
|
143
|
+
elsif reaction == "Lets draw a square."; WeaverBot::AIRulesets.square
|
|
144
|
+
elsif reaction == "Lets draw a cube."; WeaverBot::AIRulesets.cube
|
|
145
|
+
elsif reaction == "Lets draw a hyper."; WeaverBot::AIRulesets.hyper
|
|
146
|
+
elsif reaction == "Lets draw a image."; WeaverBot::AIRulesets.image
|
|
147
|
+
elsif reaction == "Closing"; MyBot::Purge.old_data; abort
|
|
42
148
|
else
|
|
43
149
|
STDOUT.puts "#{bot_name} << #{reaction}"
|
|
44
150
|
end
|
data/lib/WeaverBot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: WeaverBot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LWFlouisa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-12-
|
|
11
|
+
date: 2020-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: programr
|