syncmind 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c336a73d535380ed2a2de16a7d2f0513e74a6815b3100a2a9b437c0207b2c53a
4
+ data.tar.gz: 553e8a0e737af04c806eac4aae17a4ce4bd32342d6c2d1c054c35aaec9e1996d
5
+ SHA512:
6
+ metadata.gz: 0ef1f620e188cbc94498d1761f43b0cef29e3f41aeaaaa3efcc213a966e98c2ab74ccf690058969565fbb1beac26f26f74e5c58b18131bb8d7585e01315bfb75
7
+ data.tar.gz: d26ec8b784fad04e64da6d842f17029f082ea0cdf0c58d0309018d230a5e15c674f3b71c9d9e5cec029d72b560dfdcfae0c20c45512ca2c24409774060dd7b52
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.5.1
6
+ before_install: gem install bundler -v 2.1.4
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at gitea@fake.local. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in syncmind.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
7
+ gem "rspec", "~> 3.0"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Gitea
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,44 @@
1
+ # Syncmind
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/syncmind`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'syncmind'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install syncmind
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/syncmind. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/syncmind/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
+
42
+ ## Code of Conduct
43
+
44
+ Everyone interacting in the Syncmind project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/syncmind/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "syncmind"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ module Syncmind
2
+ VERSION = "0.1.0"
3
+ end
data/lib/syncmind.rb ADDED
@@ -0,0 +1,628 @@
1
+ require "syncmind/version"
2
+
3
+ module Syncmind
4
+ class Error < StandardError; end
5
+
6
+ class PersonalityQuiz
7
+ def self.create_data_folder # Creates a data folder on your computer with placeholder script if it doesn't exist.
8
+ if File.directory?("data")
9
+ puts "Data directory already exists."
10
+ else
11
+ system("mkdir data")
12
+
13
+ open("data/script.txt", "w") { |f|
14
+ f.puts "Hello World"
15
+ }
16
+ end
17
+ end
18
+
19
+ # Do you rely on memory or list making?
20
+ def self.memory
21
+ end
22
+
23
+ # Do you tend to rely on faith or evidence?
24
+ def self.critical_thinking
25
+ end
26
+
27
+ # Do you prefer to be alone or with others?
28
+ def self.alone_time
29
+ end
30
+
31
+ # Do you accept things the way they are?
32
+ def self.accepts_things
33
+ end
34
+
35
+ # Do you keep a clean room or not?
36
+ def self.cleanliness
37
+ end
38
+
39
+ # Do you make decisions first or think through them?
40
+ def self.automatic_decisions
41
+ end
42
+
43
+ # Are you always mellow or do you relax?
44
+ def self.relaxation_check
45
+ end
46
+
47
+ # Do you prefer yes or no answers, or multiple choice?
48
+ def self.easy_answers
49
+ end
50
+
51
+ # Do you like things to be chaotic or organized?
52
+ def self.organizational
53
+ end
54
+
55
+ # Do you easily get your feelings hurt?
56
+ def self.hurt_feelings
57
+ end
58
+
59
+ # Do you work best in groups, or work best alone?
60
+ def self.group_focus
61
+ end
62
+
63
+ # Do you focus on the past, present, or future?
64
+ def self.retrospective
65
+ end
66
+
67
+ # Do you plan far ahead, or at the last minute?
68
+ def self.planning
69
+ end
70
+
71
+ # Do you prefer respect or love
72
+ def self.issues_of_respect
73
+ end
74
+
75
+ # Do you get warn out at parties or fired up?
76
+ def self.introversion
77
+ end
78
+
79
+ # Do you fit in, or stand out like a sore thumb?
80
+ def self.stand_out
81
+ end
82
+
83
+ # Do you keep your options open, or commit to a task?
84
+ def self.commitment
85
+ end
86
+
87
+ # Do you want to fix other people, or do like being fixed?
88
+ def self.fixing_others
89
+ end
90
+
91
+ # Do you prefer to talk, or be talked to?
92
+ def self.conversational
93
+ end
94
+
95
+ # Do you prefer to tell the exact event, or the meaning behind it.
96
+ def self.event_recall
97
+ end
98
+
99
+ # Do you get work done right away or delay it?
100
+ def self.procrastination
101
+ end
102
+
103
+ # Do you follow your heart or your head?
104
+ def self.mind_or_heart
105
+ end
106
+
107
+ # Do you prefer to stay at home or go out?
108
+ def self.home_alone
109
+ end
110
+
111
+ # Do you prefer the big picture or the forest?
112
+ def self.big_picture
113
+ end
114
+
115
+ # Do you do things on the fly, or plan ahead?
116
+ def self.on_the_fly
117
+ end
118
+
119
+ # Do you prefer retributes or rehabilitation?
120
+ def self.justice_or_compassion
121
+ end
122
+
123
+ # Do you find it easy to yell at others?
124
+ def self.yelling_at_others
125
+ end
126
+
127
+ # Do you prefer speculating about the theory or practicing it?
128
+ def self.theory_or_practice
129
+ end
130
+
131
+ # Do you work hard or slack off?
132
+ def self.work_ethic
133
+ end
134
+
135
+ # Do you feel comfortable with your emotions?
136
+ def self.comfort_of_emotions
137
+ end
138
+
139
+ # Do you like to perform in front of others?
140
+ def self.performance
141
+ end
142
+
143
+ # Do you prefer to know why something happened, or who, what, and when? Or both.
144
+ def self.what_is_that
145
+ end
146
+
147
+ # Operate the Default Quiz
148
+ def self.operate_quiz
149
+ SyncMind::PersonalityQuiz.memory
150
+ SyncMind::PersonalityQuiz.crtical_thinking
151
+ SyncMind::PersonalityQuiz.alone_time
152
+ SyncMind::PersonalityQuiz.accepts_things
153
+ SyncMind::PersonalityQuiz.cleanliness
154
+ SyncMind::PersonalityQuiz.automatic_decisions
155
+ SyncMind::PersonalityQuiz.relaxation_check
156
+ SyncMind::PersonalityQuiz.easy_answers
157
+ SyncMind::PersonalityQuiz.organzational
158
+ SyncMind::PersonalityQuiz.hurt_feelings
159
+ SyncMind::PersonalityQuiz.group_focus
160
+ SyncMind::PersonalityQuiz.retrospective
161
+ SyncMind::PersonalityQuiz.planning
162
+ SyncMind::PersonalityQuiz.issues_of_respect
163
+ SyncMind::PersonalityQuiz.introversion
164
+ SyncMind::PersonalityQuiz.stand_out
165
+ SyncMind::PersonalityQuiz.commitment
166
+ SyncMind::PersonalityQuiz.fixing_others
167
+ SyncMind::PersonalityQuiz.conversational
168
+ SyncMind::PersonalityQuiz.event_recall
169
+ SyncMind::PersonalityQuiz.procrastination
170
+ SyncMind::PersonalityQuiz.mind_or_heart
171
+ SyncMind::PersonalityQuiz.home_alone
172
+ SyncMind::PersonalityQuiz.big_picture
173
+ SyncMind::PersonalityQuiz.on_the_fly
174
+ SyncMind::PersonalityQuiz.justice_or_compassion
175
+ SyncMind::PersonalityQuiz.yelling_at_others
176
+ SyncMind::PersonalityQuiz.theory_or_practice
177
+ SyncMind::PersonalityQuiz.work_ethic
178
+ SyncMind::PersonalityQuiz.comfort_of_emotions
179
+ SyncMind::PersonalityQuiz.performance
180
+ SyncMind::PersonalityQuiz.what_is_that
181
+ end
182
+ end
183
+
184
+ class OperateChatBot
185
+
186
+ def self.analyze_script
187
+ loop do
188
+ require "naive_bayes"
189
+
190
+ # Checks if what you reference is a pet.
191
+ def check_pets
192
+ bot_name = File.read("bot_identity/bot_name.txt").strip
193
+ your_name = File.read("your_identity/your_identity.txt").strip
194
+
195
+ a = NaiveBayes.new(:pets, :notpets)
196
+
197
+ # Are Pets
198
+ a.train(:pets, "dog", "word")
199
+ a.train(:pets, "cat", "word")
200
+ a.train(:pets, "rat", "word")
201
+ a.train(:pets, "gerbil", "word")
202
+ a.train(:pets, "hamster", "word")
203
+ a.train(:pets, "pig", "word")
204
+ a.train(:pets, "monkey", "word")
205
+ a.train(:pets, "dog.", "word")
206
+ a.train(:pets, "cat.", "word")
207
+ a.train(:pets, "rat.", "word")
208
+ a.train(:pets, "gerbil.", "word")
209
+ a.train(:pets,"hamster.", "word")
210
+ a.train(:pets, "pig.", "word")
211
+ a.train(:pets, "monkey.", "word")
212
+ a.train(:pets, "dog,", "word")
213
+ a.train(:pets, "cat,", "word")
214
+ a.train(:pets, "rat,", "word")
215
+ a.train(:pets, "gerbil,", "word")
216
+ a.train(:pets,"hamster,", "word")
217
+ a.train(:pets, "pig,", "word")
218
+ a.train(:pets, "monkey,", "word")
219
+ a.train(:pets, "dog;", "word")
220
+ a.train(:pets, "cat;", "word")
221
+ a.train(:pets, "rat;", "word")
222
+ a.train(:pets, "gerbil;", "word")
223
+ a.train(:pets,"hamster;", "word")
224
+ a.train(:pets, "pig;", "word")
225
+ a.train(:pets, "monkey;", "word")
226
+ a.train(:pets, "dog:", "word")
227
+ a.train(:pets, "cat:", "word")
228
+ a.train(:pets, "rat:", "word")
229
+ a.train(:pets, "gerbil:", "word")
230
+ a.train(:pets,"hamster:", "word")
231
+ a.train(:pets, "pig:", "word")
232
+ a.train(:pets, "monkey:", "word")
233
+ a.train(:pets, "dog?", "word")
234
+ a.train(:pets, "cat?", "word")
235
+ a.train(:pets, "rat?", "word")
236
+ a.train(:pets, "gerbil?", "word")
237
+ a.train(:pets,"hamster?", "word")
238
+ a.train(:pets, "pig?", "word")
239
+ a.train(:pets, "monkey?", "word")
240
+
241
+ # Not Pets
242
+ a.train(:notpets, "horse", "word")
243
+ a.train(:notpets, "donkey", "word")
244
+ a.train(:notpets, "cow", "word")
245
+ a.train(:netpets, "python", "word")
246
+ a.train(:notpets, "wildcat", "word")
247
+ a.train(:notpets, "elephant", "word")
248
+ a.train(:notpets, "tiger", "word")
249
+ a.train(:notpets, "lion", "word")
250
+ a.train(:notpets, "hyena", "word")
251
+ a.train(:notpets, "bandicoot", "word")
252
+ a.train(:notpets, "panda", "word")
253
+ a.train(:notpets, "horse.", "word")
254
+ a.train(:notpets, "donkey.", "word")
255
+ a.train(:notpets, "cow.", "word")
256
+ a.train(:netpets, "python.", "word")
257
+ a.train(:notpets, "wildcat.", "word")
258
+ a.train(:notpets, "elephant.", "word")
259
+ a.train(:notpets, "tiger.", "word")
260
+ a.train(:notpets, "lion.", "word")
261
+ a.train(:notpets, "hyena.", "word")
262
+ a.train(:notpets, "bandicoot.", "word")
263
+ a.train(:notpets, "panda.", "word")
264
+ a.train(:notpets, "horse;", "word")
265
+ a.train(:notpets, "donkey;", "word")
266
+ a.train(:notpets, "cow;", "word")
267
+ a.train(:netpets, "python;", "word")
268
+ a.train(:notpets, "wildcat;", "word")
269
+ a.train(:notpets, "elephant;", "word")
270
+ a.train(:notpets, "tiger;", "word")
271
+ a.train(:notpets, "lion;", "word")
272
+ a.train(:notpets, "hyena;", "word")
273
+ a.train(:notpets, "bandicoot;", "word")
274
+ a.train(:notpets, "panda;", "word")
275
+ a.train(:notpets, "horse:", "word")
276
+ a.train(:notpets, "donkey:", "word")
277
+ a.train(:notpets, "cow:", "word")
278
+ a.train(:netpets, "python:", "word")
279
+ a.train(:notpets, "wildcat:", "word")
280
+ a.train(:notpets, "elephant:", "word")
281
+ a.train(:notpets, "tiger:", "word")
282
+ a.train(:notpets, "lion:", "word")
283
+ a.train(:notpets, "hyena:", "word")
284
+ a.train(:notpets, "bandicoot:", "word")
285
+ a.train(:notpets, "panda:", "word")
286
+ a.train(:notpets, "horse:", "word")
287
+ a.train(:notpets, "donkey?", "word")
288
+ a.train(:notpets, "cow?", "word")
289
+ a.train(:netpets, "python?", "word")
290
+ a.train(:notpets, "wildcat?", "word")
291
+ a.train(:notpets, "elephant?", "word")
292
+ a.train(:notpets, "tiger?", "word")
293
+ a.train(:notpets, "lion?", "word")
294
+ a.train(:notpets, "hyena?", "word")
295
+ a.train(:notpets, "bandicoot?", "word")
296
+ a.train(:notpets, "panda?", "word")
297
+
298
+ # Chatbot process for asking about pets.
299
+ print "#{bot_name}: Do you have any pets??\n#{your_name}: "
300
+ b = gets.chomp.split(' ')
301
+
302
+ # Classify b and convert to string.
303
+ a_class = a.classify(*b)
304
+ result = a_class[0]
305
+ decision = result.to_s
306
+
307
+ if decision == "pets"
308
+ puts "#{bot_name}: Do you love your pet?"
309
+ else
310
+ puts "#{bot_name}: Why do you have that for a pet?"
311
+ end
312
+ end
313
+
314
+ # Checks if what you reference is a hobby.
315
+ def check_hobbies
316
+ bot_name = File.read("bot_identity/bot_name.txt").strip
317
+ your_name = File.read("your_identity/your_identity.txt").strip
318
+
319
+ a = NaiveBayes.new(:hobbies, :nothobbies)
320
+
321
+ # Are Hobbies
322
+ a.train(:hobbies, "sing", "word")
323
+ a.train(:hobbies, "illustrate", "word")
324
+ a.train(:hobbies, "draw", "word")
325
+ a.train(:hobbies, "write", "word")
326
+ a.train(:hobbies, "widdle", "word")
327
+ a.train(:hobbies, "dance", "word")
328
+ a.train(:hobbies, "clog", "word")
329
+ a.train(:hobbies, "weave", "word")
330
+ a.train(:hobbies, "crochet", "word")
331
+ a.train(:hobbies, "knit", "word")
332
+ a.train(:hobbies, "swim", "word")
333
+ a.train(:hobbies, "BDSM", "word")
334
+ a.train(:hobbies, "game", "word")
335
+ a.train(:hobbies, "JRPG", "word")
336
+ a.train(:hobbies, "MMORPG", "word")
337
+ a.train(:hobbies, "FPS", "word")
338
+ a.train(:hobbies, "SIM", "word")
339
+ a.train(:hobbies, "metroidvania", "word")
340
+ a.train(:hobbies, "football", "word")
341
+ a.train(:hobbies, "baseball", "word")
342
+ a.train(:hobbies, "soccer", "word")
343
+ a.train(:hobbies, "volleyball", "word")
344
+ a.train(:hobbies, "skateboard", "word")
345
+ a.train(:hobbies, "bike", "word")
346
+ a.train(:hobbies, "skate", "word")
347
+ a.train(:hobbies, "sing.", "word")
348
+ a.train(:hobbies, "illustrate.", "word")
349
+ a.train(:hobbies, "draw.", "word")
350
+ a.train(:hobbies, "write.", "word")
351
+ a.train(:hobbies, "widdle.", "word")
352
+ a.train(:hobbies, "dance.", "word")
353
+ a.train(:hobbies, "clog.", "word")
354
+ a.train(:hobbies, "weave.", "word")
355
+ a.train(:hobbies, "crochet.", "word")
356
+ a.train(:hobbies, "knit.", "word")
357
+ a.train(:hobbies, "swim.", "word")
358
+ a.train(:hobbies, "BDSM.", "word")
359
+ a.train(:hobbies, "game.", "word")
360
+ a.train(:hobbies, "JRPG.", "word")
361
+ a.train(:hobbies, "MMORPG.", "word")
362
+ a.train(:hobbies, "FPS.", "word")
363
+ a.train(:hobbies, "SIM.", "word")
364
+ a.train(:hobbies, "metroidvania.", "word")
365
+ a.train(:hobbies, "football.", "word")
366
+ a.train(:hobbies, "baseball.", "word")
367
+ a.train(:hobbies, "soccer.", "word")
368
+ a.train(:hobbies, "volleyball.", "word")
369
+ a.train(:hobbies, "skateboard.", "word")
370
+ a.train(:hobbies, "bike.", "word")
371
+ a.train(:hobbies, "skate.", "word")
372
+ a.train(:hobbies, "illustrate;", "word")
373
+ a.train(:hobbies, "draw;", "word")
374
+ a.train(:hobbies, "write;", "word")
375
+ a.train(:hobbies, "widdle;", "word")
376
+ a.train(:hobbies, "dance;", "word")
377
+ a.train(:hobbies, "clog;", "word")
378
+ a.train(:hobbies, "weave;", "word")
379
+ a.train(:hobbies, "crochet;", "word")
380
+ a.train(:hobbies, "knit;", "word")
381
+ a.train(:hobbies, "swim;", "word")
382
+ a.train(:hobbies, "BDSM;", "word")
383
+ a.train(:hobbies, "game;", "word")
384
+ a.train(:hobbies, "JRPG;", "word")
385
+ a.train(:hobbies, "MMORPG;", "word")
386
+ a.train(:hobbies, "FPS;", "word")
387
+ a.train(:hobbies, "SIM;", "word")
388
+ a.train(:hobbies, "metroidvania;", "word")
389
+ a.train(:hobbies, "football;", "word")
390
+ a.train(:hobbies, "baseball;", "word")
391
+ a.train(:hobbies, "soccer;", "word")
392
+ a.train(:hobbies, "volleyball;", "word")
393
+ a.train(:hobbies, "skateboard;", "word")
394
+ a.train(:hobbies, "bike;", "word")
395
+ a.train(:hobbies, "skate;", "word")
396
+ a.train(:hobbies, "illustrate:", "word")
397
+ a.train(:hobbies, "draw:", "word")
398
+ a.train(:hobbies, "write:", "word")
399
+ a.train(:hobbies, "widdle:", "word")
400
+ a.train(:hobbies, "dance:", "word")
401
+ a.train(:hobbies, "clog:", "word")
402
+ a.train(:hobbies, "weave:", "word")
403
+ a.train(:hobbies, "crochet:", "word")
404
+ a.train(:hobbies, "knit:", "word")
405
+ a.train(:hobbies, "swim:", "word")
406
+ a.train(:hobbies, "BDSM:", "word")
407
+ a.train(:hobbies, "game:", "word")
408
+ a.train(:hobbies, "JRPG:", "word")
409
+ a.train(:hobbies, "MMORPG:", "word")
410
+ a.train(:hobbies, "FPS:", "word")
411
+ a.train(:hobbies, "SIM:", "word")
412
+ a.train(:hobbies, "metroidvania:", "word")
413
+ a.train(:hobbies, "football:", "word")
414
+ a.train(:hobbies, "baseball:", "word")
415
+ a.train(:hobbies, "soccer:", "word")
416
+ a.train(:hobbies, "volleyball:", "word")
417
+ a.train(:hobbies, "skateboard:", "word")
418
+ a.train(:hobbies, "bike:", "word")
419
+ a.train(:hobbies, "skate:", "word")
420
+ a.train(:hobbies, "illustrate?", "word")
421
+ a.train(:hobbies, "draw?", "word")
422
+ a.train(:hobbies, "write?", "word")
423
+ a.train(:hobbies, "widdle?", "word")
424
+ a.train(:hobbies, "dance?", "word")
425
+ a.train(:hobbies, "clog?", "word")
426
+ a.train(:hobbies, "weave?", "word")
427
+ a.train(:hobbies, "crochet?", "word")
428
+ a.train(:hobbies, "knit?", "word")
429
+ a.train(:hobbies, "swim?", "word")
430
+ a.train(:hobbies, "BDSM?", "word")
431
+ a.train(:hobbies, "game?", "word")
432
+ a.train(:hobbies, "JRPG?", "word")
433
+ a.train(:hobbies, "MMORPG?", "word")
434
+ a.train(:hobbies, "FPS?", "word")
435
+ a.train(:hobbies, "SIM?", "word")
436
+ a.train(:hobbies, "metroidvania?", "word")
437
+ a.train(:hobbies, "football?", "word")
438
+ a.train(:hobbies, "baseball?", "word")
439
+ a.train(:hobbies, "soccer?", "word")
440
+ a.train(:hobbies, "volleyball?", "word")
441
+ a.train(:hobbies, "skateboard?", "word")
442
+ a.train(:hobbies, "bike?", "word")
443
+ a.train(:hobbies, "skate?", "word")
444
+ a.train(:hobbies, "sung", "word")
445
+ a.train(:hobbies, "illustrated", "word")
446
+ a.train(:hobbies, "drew", "word")
447
+ a.train(:hobbies, "wrote", "word")
448
+ a.train(:hobbies, "widdled", "word")
449
+ a.train(:hobbies, "danced", "word")
450
+ a.train(:hobbies, "clogged", "word")
451
+ a.train(:hobbies, "wove", "word")
452
+ a.train(:hobbies, "crocheted", "word")
453
+ a.train(:hobbies, "knitted", "word")
454
+ a.train(:hobbies, "skateboarded", "word")
455
+ a.train(:hobbies, "biked", "word")
456
+ a.train(:hobbies, "skated", "word")
457
+ a.train(:hobbies, "singing", "word")
458
+ a.train(:hobbies, "illustrating", "word")
459
+ a.train(:hobbies, "drawing", "word")
460
+ a.train(:hobbies, "writing", "word")
461
+ a.train(:hobbies, "widdling", "word")
462
+ a.train(:hobbies, "dancing", "word")
463
+ a.train(:hobbies, "clogging", "word")
464
+ a.train(:hobbies, "weaving", "word")
465
+ a.train(:hobbies, "crocheting", "word")
466
+ a.train(:hobbies, "knitting", "word")
467
+ a.train(:hobbies, "skateboarding", "word")
468
+ a.train(:hobbies, "biking", "word")
469
+ a.train(:hobbies, "skating", "word")
470
+ a.train(:hobbies, "sung.", "word")
471
+ a.train(:hobbies, "illustrated.", "word")
472
+ a.train(:hobbies, "drew.", "word")
473
+ a.train(:hobbies, "wrote.", "word")
474
+ a.train(:hobbies, "widdled.", "word")
475
+ a.train(:hobbies, "danced.", "word")
476
+ a.train(:hobbies, "clogged.", "word")
477
+ a.train(:hobbies, "wove.", "word")
478
+ a.train(:hobbies, "crocheted.", "word")
479
+ a.train(:hobbies, "knitted.", "word")
480
+ a.train(:hobbies, "skateboarded.", "word")
481
+ a.train(:hobbies, "biked.", "word")
482
+ a.train(:hobbies, "skated.", "word")
483
+ a.train(:hobbies, "singing.", "word")
484
+ a.train(:hobbies, "illustrating.", "word")
485
+ a.train(:hobbies, "drawing.", "word")
486
+ a.train(:hobbies, "writing.", "word")
487
+ a.train(:hobbies, "widdling.", "word")
488
+ a.train(:hobbies, "dancing.", "word")
489
+ a.train(:hobbies, "clogging.", "word")
490
+ a.train(:hobbies, "weaving.", "word")
491
+ a.train(:hobbies, "crocheting.", "word")
492
+ a.train(:hobbies, "knitting.", "word")
493
+ a.train(:hobbies, "skateboarding.", "word")
494
+ a.train(:hobbies, "biking.", "word")
495
+ a.train(:hobbies, "skating.", "word")
496
+ a.train(:hobbies, "sung;", "word")
497
+ a.train(:hobbies, "illustrated;", "word")
498
+ a.train(:hobbies, "drew;", "word")
499
+ a.train(:hobbies, "wrote;", "word")
500
+ a.train(:hobbies, "widdled;", "word")
501
+ a.train(:hobbies, "danced;", "word")
502
+ a.train(:hobbies, "clogged;", "word")
503
+ a.train(:hobbies, "wove;", "word")
504
+ a.train(:hobbies, "crocheted;", "word")
505
+ a.train(:hobbies, "knitted;", "word")
506
+ a.train(:hobbies, "skateboarded;", "word")
507
+ a.train(:hobbies, "biked;", "word")
508
+ a.train(:hobbies, "skated;", "word")
509
+ a.train(:hobbies, "singing;", "word")
510
+ a.train(:hobbies, "illustrating;", "word")
511
+ a.train(:hobbies, "drawing;", "word")
512
+ a.train(:hobbies, "writing;", "word")
513
+ a.train(:hobbies, "widdling;", "word")
514
+ a.train(:hobbies, "dancing;", "word")
515
+ a.train(:hobbies, "clogging;", "word")
516
+ a.train(:hobbies, "weaving;", "word")
517
+ a.train(:hobbies, "crocheting;", "word")
518
+ a.train(:hobbies, "knitting;", "word")
519
+ a.train(:hobbies, "skateboarding;", "word")
520
+ a.train(:hobbies, "biking;", "word")
521
+ a.train(:hobbies, "skating;", "word")
522
+ a.train(:hobbies, "sung:", "word")
523
+ a.train(:hobbies, "illustrated:", "word")
524
+ a.train(:hobbies, "drew:", "word")
525
+ a.train(:hobbies, "wrote:", "word")
526
+ a.train(:hobbies, "widdled:", "word")
527
+ a.train(:hobbies, "danced:", "word")
528
+ a.train(:hobbies, "clogged:", "word")
529
+ a.train(:hobbies, "wove:", "word")
530
+ a.train(:hobbies, "crocheted:", "word")
531
+ a.train(:hobbies, "knitted:", "word")
532
+ a.train(:hobbies, "skateboarded:", "word")
533
+ a.train(:hobbies, "biked:", "word")
534
+ a.train(:hobbies, "skated:", "word")
535
+ a.train(:hobbies, "singing:", "word")
536
+ a.train(:hobbies, "illustrating:", "word")
537
+ a.train(:hobbies, "drawing:", "word")
538
+ a.train(:hobbies, "writing:", "word")
539
+ a.train(:hobbies, "widdling:", "word")
540
+ a.train(:hobbies, "dancing:", "word")
541
+ a.train(:hobbies, "clogging:", "word")
542
+ a.train(:hobbies, "weaving:", "word")
543
+ a.train(:hobbies, "crocheting:", "word")
544
+ a.train(:hobbies, "knitting:", "word")
545
+ a.train(:hobbies, "skateboarding:", "word")
546
+ a.train(:hobbies, "biking:", "word")
547
+ a.train(:hobbies, "skating:", "word")
548
+ a.train(:hobbies, "sung?", "word")
549
+ a.train(:hobbies, "illustrated?", "word")
550
+ a.train(:hobbies, "drew?", "word")
551
+ a.train(:hobbies, "wrote?", "word")
552
+ a.train(:hobbies, "widdled?", "word")
553
+ a.train(:hobbies, "danced?", "word")
554
+ a.train(:hobbies, "clogged?", "word")
555
+ a.train(:hobbies, "wove?", "word")
556
+ a.train(:hobbies, "crocheted?", "word")
557
+ a.train(:hobbies, "knitted?", "word")
558
+ a.train(:hobbies, "skateboarded?", "word")
559
+ a.train(:hobbies, "biked?", "word")
560
+ a.train(:hobbies, "skated?", "word")
561
+ a.train(:hobbies, "singing?", "word")
562
+ a.train(:hobbies, "illustrating?", "word")
563
+ a.train(:hobbies, "drawing?", "word")
564
+ a.train(:hobbies, "writing?", "word")
565
+ a.train(:hobbies, "widdling?", "word")
566
+ a.train(:hobbies, "dancing?", "word")
567
+ a.train(:hobbies, "clogging?", "word")
568
+ a.train(:hobbies, "weaving?", "word")
569
+ a.train(:hobbies, "crocheting?", "word")
570
+ a.train(:hobbies, "knitting?", "word")
571
+ a.train(:hobbies, "skateboarding?", "word")
572
+ a.train(:hobbies, "biking?", "word")
573
+ a.train(:hobbies, "skating?", "word")
574
+
575
+ # Not Hobbies
576
+ end
577
+
578
+ # Checks if what you reference is a job.
579
+ def check_jobs
580
+ bot_name = File.read("bot_identity/bot_name.txt").strip
581
+ your_name = File.read("your_identity/your_identity.txt").strip
582
+
583
+ a = NaiveBayes.new(:jobs, :notjobs)
584
+ end
585
+
586
+ # Checks if what you reference is a skill.
587
+ def check_skills
588
+ bot_name = File.read("bot_identity/bot_name.txt").strip
589
+ your_name = File.read("your_identity/your_identity.txt").strip
590
+
591
+ a = NaiveBayes.new(:skills, :notskills)
592
+ end
593
+
594
+ # Cheks if what you reference is a weather pattern.
595
+ def check_weather
596
+ bot_name = File.read("bot_identity/bot_name.txt").strip
597
+ your_name = File.read("your_identity/your_identity.txt").strip
598
+
599
+ a = NaiveBayes.new(:weather, :notweather)
600
+ end
601
+
602
+ iteration = File.read("data/iteration.txt") # Controls the sleep time between personality details and input.
603
+
604
+ bot_name = File.read("bot_identity/bot_name.txt").strip # Assigns chatbot name from a file. Defaults to SyncMind.
605
+
606
+ script = File.readlines("data/script.txt") # The script file the mindfile reads from.
607
+
608
+ personality_details = script.sample # Personality detail read from a script.
609
+
610
+ # Personality details on a loop.
611
+ puts "#{bot_name}: #{personality_details}"; sleep(iteration)
612
+ print "#{your_name}: "; input = gets.chomp; sleep(iteration)
613
+
614
+ if input == "I want to talk about pets."; c = check_pets # Goes to baysian pets.
615
+ elsif input == "I want to talk about hobbies."; c = check_hobbies # Goes to baysian hobbies.
616
+ elsif input == "I want to talk about jobs."; c = check_jobs # Goes to baysian jobs.
617
+ elsif input == "I want to talk about skills."; c = check_skills # Goes to baysian skills.
618
+ elsif input == "I want to talk about weather."; c = check_weather # Goes to baysian weather.
619
+ elsif input == "Goodbye!"
620
+ puts "#{bot_name}: Catch you later."
621
+ else # If not other conversational pattern checks out.
622
+ puts "#{bot_name}: I have no idea how to discuss that."
623
+ end
624
+ end
625
+ end
626
+
627
+ end
628
+ end
data/syncmind.gemspec ADDED
@@ -0,0 +1,22 @@
1
+ require_relative 'lib/syncmind/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "syncmind"
5
+ spec.version = Syncmind::VERSION
6
+ spec.authors = ["LWFlouisa"]
7
+ spec.email = ["lwflouisa@riseup.ent"]
8
+
9
+ spec.summary = %q{This RubyGem for SyncMind that takes a personality quiz, and uses that data to make a chatbot.}
10
+ spec.description = %q{SyncMind creates data from a personalityn quiz, and uses that data on your computer to create a chatbot.}
11
+ spec.homepage = ""
12
+ spec.license = "MIT"
13
+
14
+ # Specify which files should be added to the gem when it is released.
15
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
16
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
17
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+ end
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: syncmind
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - LWFlouisa
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-01-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: SyncMind creates data from a personalityn quiz, and uses that data on
14
+ your computer to create a chatbot.
15
+ email:
16
+ - lwflouisa@riseup.ent
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".gitignore"
22
+ - ".rspec"
23
+ - ".travis.yml"
24
+ - CODE_OF_CONDUCT.md
25
+ - Gemfile
26
+ - LICENSE.txt
27
+ - README.md
28
+ - Rakefile
29
+ - bin/console
30
+ - bin/setup
31
+ - lib/syncmind.rb
32
+ - lib/syncmind/version.rb
33
+ - syncmind.gemspec
34
+ homepage: ''
35
+ licenses:
36
+ - MIT
37
+ metadata: {}
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubygems_version: 3.0.6
54
+ signing_key:
55
+ specification_version: 4
56
+ summary: This RubyGem for SyncMind that takes a personality quiz, and uses that data
57
+ to make a chatbot.
58
+ test_files: []