syncmind 0.1.0 → 0.1.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/lib/syncmind.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require "syncmind/version"
2
2
 
3
+ # SyncMind::PersonalityQuiz.create_data_folder
4
+
3
5
  module Syncmind
4
6
  class Error < StandardError; end
5
7
 
@@ -18,134 +20,1272 @@ module Syncmind
18
20
 
19
21
  # Do you rely on memory or list making?
20
22
  def self.memory
23
+ system("clear")
24
+
25
+ print "
26
+ Do you rely on memory or list making?
27
+
28
+ [A] Let me make a list of that.
29
+ [B] I will try and remember that.
30
+
31
+ >> "; answer = gets.chomp
32
+
33
+ if answer == "A" # Writes A answer to script file.
34
+ old_script = File.read("data/script.txt")
35
+
36
+ open("data/script.txt", "w") { |f|
37
+ f.puts "Let me make a list of that."
38
+
39
+ f.puts old_script
40
+ }
41
+ elsif answer == "B" # Writes B answer to script file.
42
+ old_script = File.read("data/script.txt")
43
+
44
+ open("data/script.txt", "w") { |f|
45
+ f.puts "I will try and remember that."
46
+
47
+ f.puts old_script
48
+ }
49
+ else # Picks a default answer.
50
+ old_script = File.read("data/script.txt")
51
+
52
+ open("data/script.txt", "w") { |f|
53
+ f.puts "I will try and remember that."
54
+
55
+ f.puts old_script
56
+ }
57
+ end
21
58
  end
22
59
 
23
60
  # Do you tend to rely on faith or evidence?
24
61
  def self.critical_thinking
62
+ system("clear")
63
+
64
+ print "
65
+ Do you prefer to see the evidence, or have faith?
66
+
67
+ [A] I want to see the evidence.
68
+ [B] I shall have faith in it.
69
+
70
+ >> "; answer = gets.chomp
71
+
72
+ if answer == "A" # Writes A answer to script file.
73
+ old_script = File.read("data/script.txt")
74
+
75
+ open("data/script.txt", "w") { |f|
76
+ f.puts "I want to see the evidence."
77
+
78
+ f.puts old_script
79
+ }
80
+ elsif answer == "B" # Writes B answer to script file.
81
+ old_script = File.read("data/script.txt")
82
+
83
+ open("data/script.txt", "w") { |f|
84
+ f.puts "I shall have faith in it."
85
+
86
+ f.puts old_script
87
+ }
88
+ else # Picks a default answer.
89
+ old_script = File.read("data/script.txt")
90
+
91
+ open("data/script.txt", "w") { |f|
92
+ f.puts "I shall have faith in it."
93
+
94
+ f.puts old_script
95
+ }
96
+ end
25
97
  end
26
98
 
27
99
  # Do you prefer to be alone or with others?
28
100
  def self.alone_time
101
+ system("clear")
102
+
103
+ print "
104
+ Do you prefer to be alone or with others?
105
+
106
+ [A] Will you leave me alone.
107
+ [B] I want to be with you.
108
+
109
+ >> "; answer = gets.chomp
110
+
111
+ if answer == "A" # Writes A answer to script file.
112
+ old_script = File.read("data/script.txt")
113
+
114
+ open("data/script.txt", "w") { |f|
115
+ f.puts "Will you leave me alone."
116
+
117
+ f.puts old_script
118
+ }
119
+ elsif answer == "B" # Writes B answer to script file.
120
+ old_script = File.read("data/script.txt")
121
+
122
+ open("data/script.txt", "w") { |f|
123
+ f.puts "I want to be with you."
124
+
125
+ f.puts old_script
126
+ }
127
+ else # Picks a default answer.
128
+ old_script = File.read("data/script.txt")
129
+
130
+ open("data/script.txt", "w") { |f|
131
+ f.puts "I want to be with you."
132
+
133
+ f.puts old_script
134
+ }
135
+ end
29
136
  end
30
137
 
31
138
  # Do you accept things the way they are?
32
139
  def self.accepts_things
140
+ system("clear")
141
+
142
+ print "
143
+ Do you prefer to accept things the way they are?
144
+
145
+ [A] I shall accept what you say.
146
+ [B] I want to try to change your mind.
147
+
148
+ >> "; answer = gets.chomp
149
+
150
+ if answer == "A" # Writes A answer to script file.
151
+ old_script = File.read("data/script.txt")
152
+
153
+ open("data/script.txt", "w") { |f|
154
+ f.puts "I shall accept what you say."
155
+
156
+ f.puts old_script
157
+ }
158
+ elsif answer == "B" # Writes B answer to script file.
159
+ old_script = File.read("data/script.txt")
160
+
161
+ open("data/script.txt", "w") { |f|
162
+ f.puts "I want to try to change your mind."
163
+
164
+ f.puts old_script
165
+ }
166
+ else # Picks a default answer.
167
+ old_script = File.read("data/script.txt")
168
+
169
+ open("data/script.txt", "w") { |f|
170
+ f.puts "I want to try to change your mind."
171
+
172
+ f.puts old_script
173
+ }
174
+ end
33
175
  end
34
176
 
35
177
  # Do you keep a clean room or not?
36
178
  def self.cleanliness
179
+ system("clear")
180
+
181
+ print "
182
+ Do you keep a clean room?
183
+
184
+ [A] I think I'll try to clean my room.
185
+ [B] I think I will clean my room later.
186
+
187
+ >> "; answer = gets.chomp
188
+
189
+ if answer == "A" # Writes A answer to script file.
190
+ old_script = File.read("data/script.txt")
191
+
192
+ open("data/script.txt", "w") { |f|
193
+ f.puts "I think I'll try to clean my room."
194
+
195
+ f.puts old_script
196
+ }
197
+ elsif answer == "B" # Writes B answer to script file.
198
+ old_script = File.read("data/script.txt")
199
+
200
+ open("data/script.txt", "w") { |f|
201
+ f.puts "I think I will clean my room later."
202
+
203
+ f.puts old_script
204
+ }
205
+ else # Picks a default answer.
206
+ old_script = File.read("data/script.txt")
207
+
208
+ open("data/script.txt", "w") { |f|
209
+ f.puts "I think I will clean my room later."
210
+
211
+ f.puts old_script
212
+ }
213
+ end
37
214
  end
38
215
 
39
216
  # Do you make decisions first or think through them?
40
217
  def self.automatic_decisions
218
+ system("clear")
219
+
220
+ print "
221
+ Do you prefer to act and think later?
222
+
223
+ [A] I want to have some action.
224
+ [B] Let me think first!
225
+
226
+ >> "; answer = gets.chomp
227
+
228
+ if answer == "A" # Writes A answer to script file.
229
+ old_script = File.read("data/script.txt")
230
+
231
+ open("data/script.txt", "w") { |f|
232
+ f.puts "I want to have some action."
233
+
234
+ f.puts old_script
235
+ }
236
+ elsif answer == "B" # Writes B answer to script file.
237
+ old_script = File.read("data/script.txt")
238
+
239
+ open("data/script.txt", "w") { |f|
240
+ f.puts "Let me think first!"
241
+
242
+ f.puts old_script
243
+ }
244
+ else # Picks a default answer.
245
+ old_script = File.read("data/script.txt")
246
+
247
+ open("data/script.txt", "w") { |f|
248
+ f.puts "Let me think first!"
249
+
250
+ f.puts old_script
251
+ }
252
+ end
41
253
  end
42
254
 
43
255
  # Are you always mellow or do you relax?
44
256
  def self.relaxation_check
257
+ system("clear")
258
+
259
+ print "
260
+ Do you like to relax?
261
+
262
+ [A] I want to smoke a joint!
263
+ [B] Your question is making me nervous.
264
+
265
+ >> "; answer = gets.chomp
266
+
267
+ if answer == "A" # Writes A answer to script file.
268
+ old_script = File.read("data/script.txt")
269
+
270
+ open("data/script.txt", "w") { |f|
271
+ f.puts "I want to smoke a joint!"
272
+
273
+ f.puts old_script
274
+ }
275
+ elsif answer == "B" # Writes B answer to script file.
276
+ old_script = File.read("data/script.txt")
277
+
278
+ open("data/script.txt", "w") { |f|
279
+ f.puts "Your question is making me nervous."
280
+
281
+ f.puts old_script
282
+ }
283
+ else # Picks a default answer.
284
+ old_script = File.read("data/script.txt")
285
+
286
+ open("data/script.txt", "w") { |f|
287
+ f.puts "Your question is making me nervous."
288
+
289
+ f.puts old_script
290
+ }
291
+ end
45
292
  end
46
293
 
47
294
  # Do you prefer yes or no answers, or multiple choice?
48
295
  def self.easy_answers
296
+ system("clear")
297
+
298
+ print "
299
+ Do you like your questions simple?
300
+
301
+ [A] Do I have any nuanced choices?
302
+ [B] Give me a yes or no question.
303
+
304
+ >> "; answer = gets.chomp
305
+
306
+ if answer == "A" # Writes A answer to script file.
307
+ old_script = File.read("data/script.txt")
308
+
309
+ open("data/script.txt", "w") { |f|
310
+ f.puts "Do I have any nuanced choices?"
311
+
312
+ f.puts old_script
313
+ }
314
+ elsif answer == "B" # Writes B answer to script file.
315
+ old_script = File.read("data/script.txt")
316
+
317
+ open("data/script.txt", "w") { |f|
318
+ f.puts "Give me a yes or no question."
319
+
320
+ f.puts old_script
321
+ }
322
+ else # Picks a default answer.
323
+ old_script = File.read("data/script.txt")
324
+
325
+ open("data/script.txt", "w") { |f|
326
+ f.puts "Give me a yes or no question."
327
+
328
+ f.puts old_script
329
+ }
330
+ end
49
331
  end
50
332
 
51
333
  # Do you like things to be chaotic or organized?
52
334
  def self.organizational
335
+ system("clear")
336
+
337
+ print "
338
+ Do you like causing chaos for other people?
339
+
340
+ [A] I want to see whose life I can ruin.
341
+ [B] Lets try to keep life as simple and orderly as possible.
342
+
343
+ >> "; answer = gets.chomp
344
+
345
+ if answer == "A" # Writes A answer to script file.
346
+ old_script = File.read("data/script.txt")
347
+
348
+ open("data/script.txt", "w") { |f|
349
+ f.puts "Do I have any nuanced choices?"
350
+
351
+ f.puts old_script
352
+ }
353
+ elsif answer == "B" # Writes B answer to script file.
354
+ old_script = File.read("data/script.txt")
355
+
356
+ open("data/script.txt", "w") { |f|
357
+ f.puts "Give me a yes or no question."
358
+
359
+ f.puts old_script
360
+ }
361
+ else # Picks a default answer.
362
+ old_script = File.read("data/script.txt")
363
+
364
+ open("data/script.txt", "w") { |f|
365
+ f.puts "Give me a yes or no question."
366
+
367
+ f.puts old_script
368
+ }
369
+ end
53
370
  end
54
371
 
55
372
  # Do you easily get your feelings hurt?
56
373
  def self.hurt_feelings
374
+ system("clear")
375
+
376
+ print "
377
+ Do you easile get your feelings hurt?
378
+
379
+ [A] You hurt my feelings!
380
+ [B] You didn't hurt my feelings.
381
+
382
+ >> "; answer = gets.chomp
383
+
384
+ if answer == "A" # Writes A answer to script file.
385
+ old_script = File.read("data/script.txt")
386
+
387
+ open("data/script.txt", "w") { |f|
388
+ f.puts "You hurt my feelings!"
389
+
390
+ f.puts old_script
391
+ }
392
+ elsif answer == "B" # Writes B answer to script file.
393
+ old_script = File.read("data/script.txt")
394
+
395
+ open("data/script.txt", "w") { |f|
396
+ f.puts "You didn't hurt my feelings."
397
+
398
+ f.puts old_script
399
+ }
400
+ else # Picks a default answer.
401
+ old_script = File.read("data/script.txt")
402
+
403
+ open("data/script.txt", "w") { |f|
404
+ f.puts "You didn't hurt my feelings."
405
+
406
+ f.puts old_script
407
+ }
408
+ end
57
409
  end
58
410
 
59
411
  # Do you work best in groups, or work best alone?
60
412
  def self.group_focus
413
+ system("clear")
414
+
415
+ print "
416
+ Do you like to work with other people?
417
+
418
+ [A] I want to find a team mate to work with.
419
+ [B] I want to me left alone so I can work.
420
+
421
+ >> "; answer = gets.chomp
422
+
423
+ if answer == "A" # Writes A answer to script file.
424
+ old_script = File.read("data/script.txt")
425
+
426
+ open("data/script.txt", "w") { |f|
427
+ f.puts "I want to find a team mate to work with."
428
+
429
+ f.puts old_script
430
+ }
431
+ elsif answer == "B" # Writes B answer to script file.
432
+ old_script = File.read("data/script.txt")
433
+
434
+ open("data/script.txt", "w") { |f|
435
+ f.puts "I want to me left alone so I can work."
436
+
437
+ f.puts old_script
438
+ }
439
+ else # Picks a default answer.
440
+ old_script = File.read("data/script.txt")
441
+
442
+ open("data/script.txt", "w") { |f|
443
+ f.puts "I want to me left alone so I can work."
444
+
445
+ f.puts old_script
446
+ }
447
+ end
61
448
  end
62
449
 
63
450
  # Do you focus on the past, present, or future?
64
451
  def self.retrospective
452
+ system("clear")
453
+
454
+ print "
455
+ Do you live moment to moment?
456
+
457
+ [A] I want to remember something important.
458
+ [B] I just want to make some coffee.
459
+ [C] I want to plan the next few weeks.
460
+
461
+ >> "; answer = gets.chomp
462
+
463
+ if answer == "A" # Writes A answer to script file.
464
+ old_script = File.read("data/script.txt")
465
+
466
+ open("data/script.txt", "w") { |f|
467
+ f.puts "I want to remember something important."
468
+
469
+ f.puts old_script
470
+ }
471
+ elsif answer == "B" # Writes B answer to script file.
472
+ old_script = File.read("data/script.txt")
473
+
474
+ open("data/script.txt", "w") { |f|
475
+ f.puts "I just want to make some coffee."
476
+
477
+ f.puts old_script
478
+ }
479
+ else # Picks a default answer.
480
+ old_script = File.read("data/script.txt")
481
+
482
+ open("data/script.txt", "w") { |f|
483
+ f.puts "I want to plan the next few weeks."
484
+
485
+ f.puts old_script
486
+ }
487
+ end
65
488
  end
66
489
 
67
490
  # Do you plan far ahead, or at the last minute?
68
491
  def self.planning
492
+ system("clear")
493
+
494
+ print "
495
+ Do you like to plan at the last minute?
496
+
497
+ [A] I think I forgot to get something.
498
+ [B] I think I got all my things.
499
+
500
+ >> "; answer = gets.chomp
501
+
502
+ if answer == "A" # Writes A answer to script file.
503
+ old_script = File.read("data/script.txt")
504
+
505
+ open("data/script.txt", "w") { |f|
506
+ f.puts "I think I forgot to get something."
507
+
508
+ f.puts old_script
509
+ }
510
+ elsif answer == "B" # Writes B answer to script file.
511
+ old_script = File.read("data/script.txt")
512
+
513
+ open("data/script.txt", "w") { |f|
514
+ f.puts "I think I got all my things."
515
+
516
+ f.puts old_script
517
+ }
518
+ else # Picks a default answer.
519
+ old_script = File.read("data/script.txt")
520
+
521
+ open("data/script.txt", "w") { |f|
522
+ f.puts "I think I got all my things."
523
+
524
+ f.puts old_script
525
+ }
526
+ end
69
527
  end
70
528
 
71
529
  # Do you prefer respect or love
72
530
  def self.issues_of_respect
531
+ system("clear")
532
+
533
+ print "
534
+ Do you want to be loved?
535
+
536
+ [A] I want to have your respect.
537
+ [B] Do you love me?
538
+
539
+ >> "; answer = gets.chomp
540
+
541
+ if answer == "A" # Writes A answer to script file.
542
+ old_script = File.read("data/script.txt")
543
+
544
+ open("data/script.txt", "w") { |f|
545
+ f.puts "I want to have your respect."
546
+
547
+ f.puts old_script
548
+ }
549
+ elsif answer == "B" # Writes B answer to script file.
550
+ old_script = File.read("data/script.txt")
551
+
552
+ open("data/script.txt", "w") { |f|
553
+ f.puts "Do you love me?"
554
+
555
+ f.puts old_script
556
+ }
557
+ else # Picks a default answer.
558
+ old_script = File.read("data/script.txt")
559
+
560
+ open("data/script.txt", "w") { |f|
561
+ f.puts "Do you love me?"
562
+
563
+ f.puts old_script
564
+ }
565
+ end
73
566
  end
74
567
 
75
568
  # Do you get warn out at parties or fired up?
76
569
  def self.introversion
570
+ system("clear")
571
+
572
+ print "
573
+ Do you find large crowds exhausting?
574
+
575
+ [A] You are presently overcrowding me.
576
+ [B] I want to find more friends.
577
+
578
+ >> "; answer = gets.chomp
579
+
580
+ if answer == "A" # Writes A answer to script file.
581
+ old_script = File.read("data/script.txt")
582
+
583
+ open("data/script.txt", "w") { |f|
584
+ f.puts "You are presently overcrowding me."
585
+
586
+ f.puts old_script
587
+ }
588
+ elsif answer == "B" # Writes B answer to script file.
589
+ old_script = File.read("data/script.txt")
590
+
591
+ open("data/script.txt", "w") { |f|
592
+ f.puts "I want to find more friends."
593
+
594
+ f.puts old_script
595
+ }
596
+ else # Picks a default answer.
597
+ old_script = File.read("data/script.txt")
598
+
599
+ open("data/script.txt", "w") { |f|
600
+ f.puts "I want to find more friends."
601
+
602
+ f.puts old_script
603
+ }
604
+ end
77
605
  end
78
606
 
79
607
  # Do you fit in, or stand out like a sore thumb?
80
608
  def self.stand_out
609
+ system("clear")
610
+
611
+ print "
612
+ Do you like to draw attention to yourself?
613
+
614
+ [A] Ladies and gentlemen, may I have your attention?
615
+ [B] Don't look at me please.
616
+
617
+ >> "; answer = gets.chomp
618
+
619
+ if answer == "A" # Writes A answer to script file.
620
+ old_script = File.read("data/script.txt")
621
+
622
+ open("data/script.txt", "w") { |f|
623
+ f.puts "Ladies and gentlemen, may I have your attention?"
624
+
625
+ f.puts old_script
626
+ }
627
+ elsif answer == "B" # Writes B answer to script file.
628
+ old_script = File.read("data/script.txt")
629
+
630
+ open("data/script.txt", "w") { |f|
631
+ f.puts "Don't look at me please."
632
+
633
+ f.puts old_script
634
+ }
635
+ else # Picks a default answer.
636
+ old_script = File.read("data/script.txt")
637
+
638
+ open("data/script.txt", "w") { |f|
639
+ f.puts "Don't look at me please."
640
+
641
+ f.puts old_script
642
+ }
643
+ end
81
644
  end
82
645
 
83
646
  # Do you keep your options open, or commit to a task?
84
647
  def self.commitment
648
+ system("clear")
649
+
650
+ print "
651
+ Do you like to finish your work?
652
+
653
+ [A] I want to finish this project I've been working on.
654
+ [B] The project I had in mind can wait.
655
+
656
+ >> "; answer = gets.chomp
657
+
658
+ # Tweak the answers.
659
+ if answer == "A" # Writes A answer to script file.
660
+ old_script = File.read("data/script.txt")
661
+
662
+ open("data/script.txt", "w") { |f|
663
+ f.puts "I want to finish this project I've been working on."
664
+
665
+ f.puts old_script
666
+ }
667
+ elsif answer == "B" # Writes B answer to script file.
668
+ old_script = File.read("data/script.txt")
669
+
670
+ open("data/script.txt", "w") { |f|
671
+ f.puts "The project I had in mind can wait."
672
+
673
+ f.puts old_script
674
+ }
675
+ else # Picks a default answer.
676
+ old_script = File.read("data/script.txt")
677
+
678
+ open("data/script.txt", "w") { |f|
679
+ f.puts "The project I had in mind can wait."
680
+
681
+ f.puts old_script
682
+ }
683
+ end
85
684
  end
86
685
 
87
686
  # Do you want to fix other people, or do like being fixed?
88
687
  def self.fixing_others
688
+ system("clear")
689
+
690
+ print "
691
+ Do you like to fix other people?
692
+
693
+ [A] I want to talk about my problems.
694
+ [B] I want others to talk about their problems.
695
+
696
+ >> "; answer = gets.chomp
697
+
698
+ # Tweak the answers.
699
+ if answer == "A" # Writes A answer to script file.
700
+ old_script = File.read("data/script.txt")
701
+
702
+ open("data/script.txt", "w") { |f|
703
+ f.puts "I want to talk about my problems."
704
+
705
+ f.puts old_script
706
+ }
707
+ elsif answer == "B" # Writes B answer to script file.
708
+ old_script = File.read("data/script.txt")
709
+
710
+ open("data/script.txt", "w") { |f|
711
+ f.puts "I want others to talk about their problems."
712
+
713
+ f.puts old_script
714
+ }
715
+ else # Picks a default answer.
716
+ old_script = File.read("data/script.txt")
717
+
718
+ open("data/script.txt", "w") { |f|
719
+ f.puts "I want others to talk about their problems."
720
+
721
+ f.puts old_script
722
+ }
723
+ end
89
724
  end
90
725
 
91
726
  # Do you prefer to talk, or be talked to?
92
727
  def self.conversational
728
+ system("clear")
729
+
730
+ print "
731
+ Do you like to talk or be talked to?
732
+
733
+ [A] Please! You're being condescending!
734
+ [B] Let me give you a rundown of things.
735
+
736
+ >> "; answer = gets.chomp
737
+
738
+ # Tweak the answers.
739
+ if answer == "A" # Writes A answer to script file.
740
+ old_script = File.read("data/script.txt")
741
+
742
+ open("data/script.txt", "w") { |f|
743
+ f.puts "Please! You're being condescending!"
744
+
745
+ f.puts old_script
746
+ }
747
+ elsif answer == "B" # Writes B answer to script file.
748
+ old_script = File.read("data/script.txt")
749
+
750
+ open("data/script.txt", "w") { |f|
751
+ f.puts "Let me give you a rundown of things."
752
+
753
+ f.puts old_script
754
+ }
755
+ else # Picks a default answer.
756
+ old_script = File.read("data/script.txt")
757
+
758
+ open("data/script.txt", "w") { |f|
759
+ f.puts "Let me give you a rundown of things."
760
+
761
+ f.puts old_script
762
+ }
763
+ end
93
764
  end
94
765
 
95
766
  # Do you prefer to tell the exact event, or the meaning behind it.
96
767
  def self.event_recall
768
+ system("clear")
769
+
770
+ print "
771
+ Do you like to recall the exact events?
772
+
773
+ [A] Let me tell you exactly how my day went!
774
+ [B] I want to know what just happened meant!
775
+
776
+ >> "; answer = gets.chomp
777
+
778
+ # Tweak the answers.
779
+ if answer == "A" # Writes A answer to script file.
780
+ old_script = File.read("data/script.txt")
781
+
782
+ open("data/script.txt", "w") { |f|
783
+ f.puts "Let me tell you exactly how my day went"
784
+
785
+ f.puts old_script
786
+ }
787
+ elsif answer == "B" # Writes B answer to script file.
788
+ old_script = File.read("data/script.txt")
789
+
790
+ open("data/script.txt", "w") { |f|
791
+ f.puts "I want to know what just happened meant!"
792
+
793
+ f.puts old_script
794
+ }
795
+ else # Picks a default answer.
796
+ old_script = File.read("data/script.txt")
797
+
798
+ open("data/script.txt", "w") { |f|
799
+ f.puts "I want to know what just happened meant!"
800
+
801
+ f.puts old_script
802
+ }
803
+ end
97
804
  end
98
805
 
99
806
  # Do you get work done right away or delay it?
100
807
  def self.procrastination
808
+ system("clear")
809
+
810
+ print "
811
+ Do you like to finish your work?
812
+
813
+ [A] I already have my old project finished.
814
+ [B] I think I still haven't finished the last project.
815
+
816
+ >> "; answer = gets.chomp
817
+
818
+ # Tweak the answers.
819
+ if answer == "A" # Writes A answer to script file.
820
+ old_script = File.read("data/script.txt")
821
+
822
+ open("data/script.txt", "w") { |f|
823
+ f.puts "I already have my old project finished."
824
+
825
+ f.puts old_script
826
+ }
827
+ elsif answer == "B" # Writes B answer to script file.
828
+ old_script = File.read("data/script.txt")
829
+
830
+ open("data/script.txt", "w") { |f|
831
+ f.puts "I think I still haven't finished the last project."
832
+
833
+ f.puts old_script
834
+ }
835
+ else # Picks a default answer.
836
+ old_script = File.read("data/script.txt")
837
+
838
+ open("data/script.txt", "w") { |f|
839
+ f.puts "I think I still haven't finished the last project."
840
+
841
+ f.puts old_script
842
+ }
843
+ end
101
844
  end
102
845
 
103
846
  # Do you follow your heart or your head?
104
847
  def self.mind_or_heart
848
+ system("clear")
849
+
850
+ print "
851
+ Do you life your life with feelings?
852
+
853
+ [A] Ha! Good one! But give me a real question.
854
+ [B] Lets talk about things I've been brainstorming.
855
+
856
+ >> "; answer = gets.chomp
857
+
858
+ # Tweak the answers.
859
+ if answer == "A" # Writes A answer to script file.
860
+ old_script = File.read("data/script.txt")
861
+
862
+ open("data/script.txt", "w") { |f|
863
+ f.puts "Ha! Good one! But give me a real question."
864
+
865
+ f.puts old_script
866
+ }
867
+ elsif answer == "B" # Writes B answer to script file.
868
+ old_script = File.read("data/script.txt")
869
+
870
+ open("data/script.txt", "w") { |f|
871
+ f.puts "Lets talk about things I've been brainstorming."
872
+
873
+ f.puts old_script
874
+ }
875
+ else # Picks a default answer.
876
+ old_script = File.read("data/script.txt")
877
+
878
+ open("data/script.txt", "w") { |f|
879
+ f.puts "Lets talk about things I've been brainstorming."
880
+
881
+ f.puts old_script
882
+ }
883
+ end
105
884
  end
106
885
 
107
886
  # Do you prefer to stay at home or go out?
108
887
  def self.home_alone
888
+ system("clear")
889
+
890
+ print "
891
+ Do you like to stay at home?
892
+
893
+ [A] How is where the heart is, and my importantly--my bed.
894
+ [B] I'm getting some cabin fever at the moment.
895
+
896
+ >> "; answer = gets.chomp
897
+
898
+ # Tweak the answers.
899
+ if answer == "A" # Writes A answer to script file.
900
+ old_script = File.read("data/script.txt")
901
+
902
+ open("data/script.txt", "w") { |f|
903
+ f.puts "How is where the heart is, and my importantly--my bed."
904
+
905
+ f.puts old_script
906
+ }
907
+ elsif answer == "B" # Writes B answer to script file.
908
+ old_script = File.read("data/script.txt")
909
+
910
+ open("data/script.txt", "w") { |f|
911
+ f.puts "I'm getting some cabin fever at the moment."
912
+
913
+ f.puts old_script
914
+ }
915
+ else # Picks a default answer.
916
+ old_script = File.read("data/script.txt")
917
+
918
+ open("data/script.txt", "w") { |f|
919
+ f.puts "I'm getting some cabin fever at the moment."
920
+
921
+ f.puts old_script
922
+ }
923
+ end
109
924
  end
110
925
 
111
926
  # Do you prefer the big picture or the forest?
112
927
  def self.big_picture
928
+ system("clear")
929
+
930
+ print "
931
+ Do you want the big picture?
932
+
933
+ [A] Give me a break down of every single detail.
934
+ [B] What do all those details mean?
935
+
936
+ >> "; answer = gets.chomp
937
+
938
+ # Tweak the answers.
939
+ if answer == "A" # Writes A answer to script file.
940
+ old_script = File.read("data/script.txt")
941
+
942
+ open("data/script.txt", "w") { |f|
943
+ f.puts "Give me a break down of every single detail."
944
+
945
+ f.puts old_script
946
+ }
947
+ elsif answer == "B" # Writes B answer to script file.
948
+ old_script = File.read("data/script.txt")
949
+
950
+ open("data/script.txt", "w") { |f|
951
+ f.puts "What do all those details mean?"
952
+
953
+ f.puts old_script
954
+ }
955
+ else # Picks a default answer.
956
+ old_script = File.read("data/script.txt")
957
+
958
+ open("data/script.txt", "w") { |f|
959
+ f.puts "What do all those details mean?"
960
+
961
+ f.puts old_script
962
+ }
963
+ end
113
964
  end
114
965
 
115
966
  # Do you do things on the fly, or plan ahead?
116
967
  def self.on_the_fly
968
+ system("clear")
969
+
970
+ print "
971
+ Do you do things at the spur of the moment?
972
+
973
+ [A] I want to go see a movie!
974
+ [B] Can it wait at another point?
975
+
976
+ >> "; answer = gets.chomp
977
+
978
+ # Tweak the answers.
979
+ if answer == "A" # Writes A answer to script file.
980
+ old_script = File.read("data/script.txt")
981
+
982
+ open("data/script.txt", "w") { |f|
983
+ f.puts "I want to go see a movie!"
984
+
985
+ f.puts old_script
986
+ }
987
+ elsif answer == "B" # Writes B answer to script file.
988
+ old_script = File.read("data/script.txt")
989
+
990
+ open("data/script.txt", "w") { |f|
991
+ f.puts "Can it wait at another point?"
992
+
993
+ f.puts old_script
994
+ }
995
+ else # Picks a default answer.
996
+ old_script = File.read("data/script.txt")
997
+
998
+ open("data/script.txt", "w") { |f|
999
+ f.puts "Can it wait at another point?"
1000
+
1001
+ f.puts old_script
1002
+ }
1003
+ end
117
1004
  end
118
1005
 
119
1006
  # Do you prefer retributes or rehabilitation?
120
1007
  def self.justice_or_compassion
1008
+ system("clear")
1009
+
1010
+ print "
1011
+ Do you prefer a convict executed or spared?
1012
+
1013
+ [A] Off with your head!
1014
+ [B] Eh, no worries.
1015
+
1016
+ >> "; answer = gets.chomp
1017
+
1018
+ # Tweak the answers.
1019
+ if answer == "A" # Writes A answer to script file.
1020
+ old_script = File.read("data/script.txt")
1021
+
1022
+ open("data/script.txt", "w") { |f|
1023
+ f.puts "Off with your head!"
1024
+
1025
+ f.puts old_script
1026
+ }
1027
+ elsif answer == "B" # Writes B answer to script file.
1028
+ old_script = File.read("data/script.txt")
1029
+
1030
+ open("data/script.txt", "w") { |f|
1031
+ f.puts "Eh, no worries."
1032
+
1033
+ f.puts old_script
1034
+ }
1035
+ else # Picks a default answer.
1036
+ old_script = File.read("data/script.txt")
1037
+
1038
+ open("data/script.txt", "w") { |f|
1039
+ f.puts "Eh, no worries."
1040
+
1041
+ f.puts old_script
1042
+ }
1043
+ end
121
1044
  end
122
1045
 
123
1046
  # Do you find it easy to yell at others?
124
1047
  def self.yelling_at_others
1048
+ system("clear")
1049
+
1050
+ print "
1051
+ Do you like to yell at other people?
1052
+
1053
+ [A] Why do I have to yell at you so much!
1054
+ [B] If I have to yell at you, it's not worth explaining.
1055
+
1056
+ >> "; answer = gets.chomp
1057
+
1058
+ # Tweak the answers.
1059
+ if answer == "A" # Writes A answer to script file.
1060
+ old_script = File.read("data/script.txt")
1061
+
1062
+ open("data/script.txt", "w") { |f|
1063
+ f.puts "Why do I have to yell at you so much!"
1064
+
1065
+ f.puts old_script
1066
+ }
1067
+ elsif answer == "B" # Writes B answer to script file.
1068
+ old_script = File.read("data/script.txt")
1069
+
1070
+ open("data/script.txt", "w") { |f|
1071
+ f.puts "If I have to yell at you, it's not worth explaining."
1072
+
1073
+ f.puts old_script
1074
+ }
1075
+ else # Picks a default answer.
1076
+ old_script = File.read("data/script.txt")
1077
+
1078
+ open("data/script.txt", "w") { |f|
1079
+ f.puts "If I have to yell at you, it's not worth explaining."
1080
+
1081
+ f.puts old_script
1082
+ }
1083
+ end
125
1084
  end
126
1085
 
127
1086
  # Do you prefer speculating about the theory or practicing it?
128
1087
  def self.theory_or_practice
1088
+ system("clear")
1089
+
1090
+ print "
1091
+ Do you want to know the theory of stuff?
1092
+
1093
+ [A] Give me a break of Conflict Theory!
1094
+ [B] Lets be practical with our conversation.
1095
+
1096
+ >> "; answer = gets.chomp
1097
+
1098
+ # Tweak the answers.
1099
+ if answer == "A" # Writes A answer to script file.
1100
+ old_script = File.read("data/script.txt")
1101
+
1102
+ open("data/script.txt", "w") { |f|
1103
+ f.puts "Give me a break of Conflict Theory!"
1104
+
1105
+ f.puts old_script
1106
+ }
1107
+ elsif answer == "B" # Writes B answer to script file.
1108
+ old_script = File.read("data/script.txt")
1109
+
1110
+ open("data/script.txt", "w") { |f|
1111
+ f.puts "Lets be practical with our conversation."
1112
+
1113
+ f.puts old_script
1114
+ }
1115
+ else # Picks a default answer.
1116
+ old_script = File.read("data/script.txt")
1117
+
1118
+ open("data/script.txt", "w") { |f|
1119
+ f.puts "Lets be practical with our conversation."
1120
+
1121
+ f.puts old_script
1122
+ }
1123
+ end
129
1124
  end
130
1125
 
131
1126
  # Do you work hard or slack off?
132
1127
  def self.work_ethic
1128
+ system("clear")
1129
+
1130
+ print "
1131
+ Do you like to work hard?
1132
+
1133
+ [A] My back aches, but the math equation is finished.
1134
+ [B] I think several hours has gone by.
1135
+
1136
+ >> "; answer = gets.chomp
1137
+
1138
+ # Tweak the answers.
1139
+ if answer == "A" # Writes A answer to script file.
1140
+ old_script = File.read("data/script.txt")
1141
+
1142
+ open("data/script.txt", "w") { |f|
1143
+ f.puts "My back aches, but the math equation is finished."
1144
+
1145
+ f.puts old_script
1146
+ }
1147
+ elsif answer == "B" # Writes B answer to script file.
1148
+ old_script = File.read("data/script.txt")
1149
+
1150
+ open("data/script.txt", "w") { |f|
1151
+ f.puts "I think several hours has gone by."
1152
+
1153
+ f.puts old_script
1154
+ }
1155
+ else # Picks a default answer.
1156
+ old_script = File.read("data/script.txt")
1157
+
1158
+ open("data/script.txt", "w") { |f|
1159
+ f.puts "I think several hours has gone by."
1160
+
1161
+ f.puts old_script
1162
+ }
1163
+ end
133
1164
  end
134
1165
 
135
1166
  # Do you feel comfortable with your emotions?
136
1167
  def self.comfort_of_emotions
1168
+ system("clear")
1169
+
1170
+ print "
1171
+ Do you feel comfortable with your emotions?
1172
+
1173
+ [A] Not sure how to sort out my feelings.
1174
+ [B] Oh god! Let me tell you everything.
1175
+
1176
+ >> "; answer = gets.chomp
1177
+
1178
+ # Tweak the answers.
1179
+ if answer == "A" # Writes A answer to script file.
1180
+ old_script = File.read("data/script.txt")
1181
+
1182
+ open("data/script.txt", "w") { |f|
1183
+ f.puts "Not sure how to sort out my feelings."
1184
+
1185
+ f.puts old_script
1186
+ }
1187
+ elsif answer == "B" # Writes B answer to script file.
1188
+ old_script = File.read("data/script.txt")
1189
+
1190
+ open("data/script.txt", "w") { |f|
1191
+ f.puts "Oh god! Let me tell you everything."
1192
+
1193
+ f.puts old_script
1194
+ }
1195
+ else # Picks a default answer.
1196
+ old_script = File.read("data/script.txt")
1197
+
1198
+ open("data/script.txt", "w") { |f|
1199
+ f.puts "Oh god! Let me tell you everything."
1200
+
1201
+ f.puts old_script
1202
+ }
1203
+ end
137
1204
  end
138
1205
 
139
1206
  # Do you like to perform in front of others?
140
1207
  def self.performance
1208
+ system("clear")
1209
+
1210
+ print "
1211
+ Do you like to perform in front of others?
1212
+
1213
+ [A] I want to get some tap shoes and a piano!
1214
+ [B] I think I'll hide behind you.
1215
+
1216
+ >> "; answer = gets.chomp
1217
+
1218
+ # Tweak the answers.
1219
+ if answer == "A" # Writes A answer to script file.
1220
+ old_script = File.read("data/script.txt")
1221
+
1222
+ open("data/script.txt", "w") { |f|
1223
+ f.puts "I want to get some tap shoes and a piano!"
1224
+
1225
+ f.puts old_script
1226
+ }
1227
+ elsif answer == "B" # Writes B answer to script file.
1228
+ old_script = File.read("data/script.txt")
1229
+
1230
+ open("data/script.txt", "w") { |f|
1231
+ f.puts "I think I'll hide behind you."
1232
+
1233
+ f.puts old_script
1234
+ }
1235
+ else # Picks a default answer.
1236
+ old_script = File.read("data/script.txt")
1237
+
1238
+ open("data/script.txt", "w") { |f|
1239
+ f.puts "I think I'll hide behind you."
1240
+
1241
+ f.puts old_script
1242
+ }
1243
+ end
141
1244
  end
142
1245
 
143
1246
  # Do you prefer to know why something happened, or who, what, and when? Or both.
144
1247
  def self.what_is_that
1248
+ system("clear")
1249
+
1250
+ print "
1251
+ Do you like to know the reason behind things?
1252
+
1253
+ [A] Why do you think that happened?
1254
+ [B] Tell me who did it, what they did, and when!
1255
+ [C] I want to know the why and who what when.
1256
+
1257
+ >> "; answer = gets.chomp
1258
+
1259
+ if answer == "A" # Writes A answer to script file.
1260
+ old_script = File.read("data/script.txt")
1261
+
1262
+ open("data/script.txt", "w") { |f|
1263
+ f.puts "Why do you think that happened?"
1264
+
1265
+ f.puts old_script
1266
+ }
1267
+ elsif answer == "B" # Writes B answer to script file.
1268
+ old_script = File.read("data/script.txt")
1269
+
1270
+ open("data/script.txt", "w") { |f|
1271
+ f.puts "Tell me who did it, what they did, and when!"
1272
+
1273
+ f.puts old_script
1274
+ }
1275
+ else # Picks a default answer.
1276
+ old_script = File.read("data/script.txt")
1277
+
1278
+ open("data/script.txt", "w") { |f|
1279
+ f.puts "I want to know the why and who what when."
1280
+
1281
+ f.puts old_script
1282
+ }
1283
+ end
145
1284
  end
146
1285
 
147
1286
  # Operate the Default Quiz
148
1287
  def self.operate_quiz
1288
+ SyncMind::PersonalityQuiz.create_data_folder
149
1289
  SyncMind::PersonalityQuiz.memory
150
1290
  SyncMind::PersonalityQuiz.crtical_thinking
151
1291
  SyncMind::PersonalityQuiz.alone_time
@@ -188,7 +1328,7 @@ module Syncmind
188
1328
  require "naive_bayes"
189
1329
 
190
1330
  # Checks if what you reference is a pet.
191
- def check_pets
1331
+ def self.check_pets
192
1332
  bot_name = File.read("bot_identity/bot_name.txt").strip
193
1333
  your_name = File.read("your_identity/your_identity.txt").strip
194
1334
 
@@ -312,7 +1452,7 @@ module Syncmind
312
1452
  end
313
1453
 
314
1454
  # Checks if what you reference is a hobby.
315
- def check_hobbies
1455
+ def self.check_hobbies
316
1456
  bot_name = File.read("bot_identity/bot_name.txt").strip
317
1457
  your_name = File.read("your_identity/your_identity.txt").strip
318
1458
 
@@ -573,30 +1713,550 @@ module Syncmind
573
1713
  a.train(:hobbies, "skating?", "word")
574
1714
 
575
1715
  # Not Hobbies
1716
+ a.train(:nothobbies, "nurse", "word")
1717
+ a.train(:nothobbies, "officer", "word")
1718
+ a.train(:nothobbies, "fireman", "word")
1719
+ a.train(:nothobbies, "cashier", "word")
1720
+ a.train(:nothobbies, "stocker", "word")
1721
+ a.train(:nothobbies, "barber", "word")
1722
+ a.train(:nothobbies, "stylist", "word")
1723
+ a.train(:nothobbies, "clerk", "word")
1724
+ a.train(:nothobbies, "butcher", "word")
1725
+ a.train(:nothobbies, "reporter", "word")
1726
+ a.train(:nothobbies, "manager", "word")
1727
+ a.train(:nothobbies, "crane", "word")
1728
+ a.train(:nothobbies, "lawyer", "word")
1729
+ a.train(:nothobbies, "cameraman", "word")
1730
+ a.train(:nothobbies, "engineer", "word")
1731
+ a.train(:nothobbies, "pilot", "word")
1732
+ a.train(:nothobbies, "nursing.", "word")
1733
+ a.train(:nothobbies, "officer.", "word")
1734
+ a.train(:nothobbies, "fireman.", "word")
1735
+ a.train(:nothobbies, "cashier.", "word")
1736
+ a.train(:nothobbies, "stocker.", "word")
1737
+ a.train(:nothobbies, "barber.", "word")
1738
+ a.train(:nothobbies, "stylist.", "word")
1739
+ a.train(:nothobbies, "clerk.", "word")
1740
+ a.train(:nothobbies, "butcher.", "word")
1741
+ a.train(:nothobbies, "reporter.", "word")
1742
+ a.train(:nothobbies, "manager.", "word")
1743
+ a.train(:nothobbies, "crane.", "word")
1744
+ a.train(:nothobbies, "lawyer.", "word")
1745
+ a.train(:nothobbies, "cameraman.", "word")
1746
+ a.train(:nothobbies, "engineer.", "word")
1747
+ a.train(:nothobbies, "pilot.", "word")
1748
+ a.train(:nothobbies, "nursing;", "word")
1749
+ a.train(:nothobbies, "officer;", "word")
1750
+ a.train(:nothobbies, "fireman;", "word")
1751
+ a.train(:nothobbies, "cashier;", "word")
1752
+ a.train(:nothobbies, "stocker;", "word")
1753
+ a.train(:nothobbies, "barber;", "word")
1754
+ a.train(:nothobbies, "stylist;", "word")
1755
+ a.train(:nothobbies, "clerk;", "word")
1756
+ a.train(:nothobbies, "butcher;", "word")
1757
+ a.train(:nothobbies, "reporter;", "word")
1758
+ a.train(:nothobbies, "manager;", "word")
1759
+ a.train(:nothobbies, "crane;", "word")
1760
+ a.train(:nothobbies, "lawyer;", "word")
1761
+ a.train(:nothobbies, "cameraman;", "word")
1762
+ a.train(:nothobbies, "engineer;", "word")
1763
+ a.train(:nothobbies, "pilot;", "word")
1764
+ a.train(:nothobbies, "nursing:", "word")
1765
+ a.train(:nothobbies, "officer:", "word")
1766
+ a.train(:nothobbies, "fireman:", "word")
1767
+ a.train(:nothobbies, "cashier:", "word")
1768
+ a.train(:nothobbies, "stocker:", "word")
1769
+ a.train(:nothobbies, "barber:", "word")
1770
+ a.train(:nothobbies, "stylist:", "word")
1771
+ a.train(:nothobbies, "clerk:", "word")
1772
+ a.train(:nothobbies, "butcher:", "word")
1773
+ a.train(:nothobbies, "reporter:", "word")
1774
+ a.train(:nothobbies, "manager:", "word")
1775
+ a.train(:nothobbies, "crane:", "word")
1776
+ a.train(:nothobbies, "lawyer:", "word")
1777
+ a.train(:nothobbies, "cameraman:", "word")
1778
+ a.train(:nothobbies, "engineer:", "word")
1779
+ a.train(:nothobbies, "pilot:", "word")
1780
+ a.train(:nothobbies, "nursing?", "word")
1781
+ a.train(:nothobbies, "officer?", "word")
1782
+ a.train(:nothobbies, "fireman?", "word")
1783
+ a.train(:nothobbies, "cashier?", "word")
1784
+ a.train(:nothobbies, "stocker?", "word")
1785
+ a.train(:nothobbies, "barber?", "word")
1786
+ a.train(:nothobbies, "stylist?", "word")
1787
+ a.train(:nothobbies, "clerk?", "word")
1788
+ a.train(:nothobbies, "butcher?", "word")
1789
+ a.train(:nothobbies, "reporter?", "word")
1790
+ a.train(:nothobbies, "manager?", "word")
1791
+ a.train(:nothobbies, "crane?", "word")
1792
+ a.train(:nothobbies, "lawyer?", "word")
1793
+ a.train(:nothobbies, "cameraman?", "word")
1794
+ a.train(:nothobbies, "engineer?", "word")
1795
+ a.train(:nothobbies, "pilot?", "word")
1796
+ a.train(:nothobbies, "nursing", "word")
1797
+ a.train(:nothobbies, "arresting", "word")
1798
+ a.train(:nothobbies, "hosing", "word")
1799
+ a.train(:nothobbies, "cashing", "word")
1800
+ a.train(:nothobbies, "stocking", "word")
1801
+ a.train(:nothobbies, "barbing", "word")
1802
+ a.train(:nothobbies, "styling", "word")
1803
+ a.train(:nothobbies, "clerking", "word")
1804
+ a.train(:nothobbies, "chopping", "word")
1805
+ a.train(:nothobbies, "reporting", "word")
1806
+ a.train(:nothobbies, "managing", "word")
1807
+ a.train(:nothobbies, "craning", "word")
1808
+ a.train(:nothobbies, "representing", "word")
1809
+ a.train(:nothobbies, "recording", "word")
1810
+ a.train(:nothobbies, "engineering", "word")
1811
+ a.train(:nothobbies, "piloting", "word")
1812
+ a.train(:nothobbies, "nursing.", "word")
1813
+ a.train(:nothobbies, "arresting.", "word")
1814
+ a.train(:nothobbies, "hosing.", "word")
1815
+ a.train(:nothobbies, "cashing.", "word")
1816
+ a.train(:nothobbies, "stocking.", "word")
1817
+ a.train(:nothobbies, "barbing.", "word")
1818
+ a.train(:nothobbies, "styling.", "word")
1819
+ a.train(:nothobbies, "clerking.", "word")
1820
+ a.train(:nothobbies, "chopping.", "word")
1821
+ a.train(:nothobbies, "reporting.", "word")
1822
+ a.train(:nothobbies, "managing.", "word")
1823
+ a.train(:nothobbies, "craning.", "word")
1824
+ a.train(:nothobbies, "representing.", "word")
1825
+ a.train(:nothobbies, "recording.", "word")
1826
+ a.train(:nothobbies, "engineering.", "word")
1827
+ a.train(:nothobbies, "piloting.", "word")
1828
+ a.train(:nothobbies, "nursing;", "word")
1829
+ a.train(:nothobbies, "arresting;", "word")
1830
+ a.train(:nothobbies, "hosing;", "word")
1831
+ a.train(:nothobbies, "cashing;", "word")
1832
+ a.train(:nothobbies, "stocking;", "word")
1833
+ a.train(:nothobbies, "barbing;", "word")
1834
+ a.train(:nothobbies, "styling;", "word")
1835
+ a.train(:nothobbies, "clerking;", "word")
1836
+ a.train(:nothobbies, "chopping;", "word")
1837
+ a.train(:nothobbies, "reporting;", "word")
1838
+ a.train(:nothobbies, "managing;", "word")
1839
+ a.train(:nothobbies, "craning;", "word")
1840
+ a.train(:nothobbies, "representing;", "word")
1841
+ a.train(:nothobbies, "recording;", "word")
1842
+ a.train(:nothobbies, "engineering;", "word")
1843
+ a.train(:nothobbies, "piloting;", "word")
1844
+ a.train(:nothobbies, "nursing:", "word")
1845
+ a.train(:nothobbies, "arresting:", "word")
1846
+ a.train(:nothobbies, "hosing:", "word")
1847
+ a.train(:nothobbies, "cashing:", "word")
1848
+ a.train(:nothobbies, "stocking:", "word")
1849
+ a.train(:nothobbies, "barbing:", "word")
1850
+ a.train(:nothobbies, "styling:", "word")
1851
+ a.train(:nothobbies, "clerking:", "word")
1852
+ a.train(:nothobbies, "chopping:", "word")
1853
+ a.train(:nothobbies, "reporting:", "word")
1854
+ a.train(:nothobbies, "managing:", "word")
1855
+ a.train(:nothobbies, "craning:", "word")
1856
+ a.train(:nothobbies, "representing:", "word")
1857
+ a.train(:nothobbies, "recording:", "word")
1858
+ a.train(:nothobbies, "engineering:", "word")
1859
+ a.train(:nothobbies, "piloting:", "word")
1860
+ a.train(:nothobbies, "nursing?", "word")
1861
+ a.train(:nothobbies, "arresting?", "word")
1862
+ a.train(:nothobbies, "hosing?", "word")
1863
+ a.train(:nothobbies, "cashing?", "word")
1864
+ a.train(:nothobbies, "stocking?", "word")
1865
+ a.train(:nothobbies, "barbing?", "word")
1866
+ a.train(:nothobbies, "styling?", "word")
1867
+ a.train(:nothobbies, "clerking?", "word")
1868
+ a.train(:nothobbies, "chopping?", "word")
1869
+ a.train(:nothobbies, "reporting?", "word")
1870
+ a.train(:nothobbies, "managing?", "word")
1871
+ a.train(:nothobbies, "craning?", "word")
1872
+ a.train(:nothobbies, "representing?", "word")
1873
+ a.train(:nothobbies, "recording?", "word")
1874
+ a.train(:nothobbies, "engineering?", "word")
1875
+ a.train(:nothobbies, "piloting?", "word")
1876
+
1877
+ # Chatbot process for asking about pets.
1878
+ print "#{bot_name}: What do you do to pass the time?\n#{your_name}: "
1879
+ b = gets.chomp.split(' ')
1880
+
1881
+ # Classify b and convert to string.
1882
+ a_class = a.classify(*b)
1883
+ result = a_class[0]
1884
+ decision = result.to_s
1885
+
1886
+ if decision == "pets"
1887
+ puts "#{bot_name}: Is that a good passtime?"
1888
+ else
1889
+ puts "#{bot_name}: I did not know you could do that for fun."
1890
+ end
576
1891
  end
577
1892
 
578
1893
  # Checks if what you reference is a job.
579
- def check_jobs
1894
+ def self.check_jobs
580
1895
  bot_name = File.read("bot_identity/bot_name.txt").strip
581
1896
  your_name = File.read("your_identity/your_identity.txt").strip
582
1897
 
583
1898
  a = NaiveBayes.new(:jobs, :notjobs)
1899
+
1900
+ # Not Jobs
1901
+ a.train(:notjobs, "sing", "word")
1902
+ a.train(:notjobs, "illustrate", "word")
1903
+ a.train(:notjobs, "draw", "word")
1904
+ a.train(:notjobs, "write", "word")
1905
+ a.train(:notjobs, "widdle", "word")
1906
+ a.train(:notjobs, "dance", "word")
1907
+ a.train(:notjobs, "clog", "word")
1908
+ a.train(:notjobs, "weave", "word")
1909
+ a.train(:notjobs, "crochet", "word")
1910
+ a.train(:notjobs, "knit", "word")
1911
+ a.train(:notjobs, "swim", "word")
1912
+ a.train(:notjobs, "BDSM", "word")
1913
+ a.train(:notjobs, "game", "word")
1914
+ a.train(:notjobs, "JRPG", "word")
1915
+ a.train(:notjobs, "MMORPG", "word")
1916
+ a.train(:notjobs, "FPS", "word")
1917
+ a.train(:notjobs, "SIM", "word")
1918
+ a.train(:notjobs, "metroidvania", "word")
1919
+ a.train(:notjobs, "football", "word")
1920
+ a.train(:notjobs, "baseball", "word")
1921
+ a.train(:notjobs, "soccer", "word")
1922
+ a.train(:notjobs, "volleyball", "word")
1923
+ a.train(:notjobs, "skateboard", "word")
1924
+ a.train(:notjobs, "bike", "word")
1925
+ a.train(:notjobs, "skate", "word")
1926
+ a.train(:notjobs, "sing.", "word")
1927
+ a.train(:notjobs, "illustrate.", "word")
1928
+ a.train(:notjobs, "draw.", "word")
1929
+ a.train(:notjobs, "write.", "word")
1930
+ a.train(:notjobs, "widdle.", "word")
1931
+ a.train(:notjobs, "dance.", "word")
1932
+ a.train(:notjobs, "clog.", "word")
1933
+ a.train(:notjobs, "weave.", "word")
1934
+ a.train(:notjobs, "crochet.", "word")
1935
+ a.train(:notjobs, "knit.", "word")
1936
+ a.train(:notjobs, "swim.", "word")
1937
+ a.train(:notjobs, "BDSM.", "word")
1938
+ a.train(:notjobs, "game.", "word")
1939
+ a.train(:notjobs, "JRPG.", "word")
1940
+ a.train(:notjobs, "MMORPG.", "word")
1941
+ a.train(:notjobs, "FPS.", "word")
1942
+ a.train(:notjobs, "SIM.", "word")
1943
+ a.train(:notjobs, "metroidvania.", "word")
1944
+ a.train(:notjobs, "football.", "word")
1945
+ a.train(:notjobs, "baseball.", "word")
1946
+ a.train(:notjobs, "soccer.", "word")
1947
+ a.train(:notjobs, "volleyball.", "word")
1948
+ a.train(:notjobs, "skateboard.", "word")
1949
+ a.train(:notjobs, "bike.", "word")
1950
+ a.train(:notjobs, "skate.", "word")
1951
+ a.train(:notjobs, "sing;", "word")
1952
+ a.train(:notjobs, "illustrate;", "word")
1953
+ a.train(:notjobs, "draw;", "word")
1954
+ a.train(:notjobs, "write;", "word")
1955
+ a.train(:notjobs, "widdle;", "word")
1956
+ a.train(:notjobs, "dance;", "word")
1957
+ a.train(:notjobs, "clog;", "word")
1958
+ a.train(:notjobs, "weave;", "word")
1959
+ a.train(:notjobs, "crochet;", "word")
1960
+ a.train(:notjobs, "knit;", "word")
1961
+ a.train(:notjobs, "swim;", "word")
1962
+ a.train(:notjobs, "BDSM;", "word")
1963
+ a.train(:notjobs, "game;", "word")
1964
+ a.train(:notjobs, "JRPG;", "word")
1965
+ a.train(:notjobs, "MMORPG;", "word")
1966
+ a.train(:notjobs, "FPS;", "word")
1967
+ a.train(:notjobs, "SIM;", "word")
1968
+ a.train(:notjobs, "metroidvania;", "word")
1969
+ a.train(:notjobs, "football;", "word")
1970
+ a.train(:notjobs, "baseball;", "word")
1971
+ a.train(:notjobs, "soccer;", "word")
1972
+ a.train(:notjobs, "volleyball;", "word")
1973
+ a.train(:notjobs, "skateboard;", "word")
1974
+ a.train(:notjobs, "bike;", "word")
1975
+ a.train(:notjobs, "skate;", "word")
1976
+ a.train(:notjobs, "sing:", "word")
1977
+ a.train(:notjobs, "illustrate:", "word")
1978
+ a.train(:notjobs, "draw:", "word")
1979
+ a.train(:notjobs, "write:", "word")
1980
+ a.train(:notjobs, "widdle:", "word")
1981
+ a.train(:notjobs, "dance:", "word")
1982
+ a.train(:notjobs, "clog:", "word")
1983
+ a.train(:notjobs, "weave:", "word")
1984
+ a.train(:notjobs, "crochet:", "word")
1985
+ a.train(:notjobs, "knit:", "word")
1986
+ a.train(:notjobs, "swim:", "word")
1987
+ a.train(:notjobs, "BDSM:", "word")
1988
+ a.train(:notjobs, "game:", "word")
1989
+ a.train(:notjobs, "JRPG:", "word")
1990
+ a.train(:notjobs, "MMORPG:", "word")
1991
+ a.train(:notjobs, "FPS:", "word")
1992
+ a.train(:notjobs, "SIM:", "word")
1993
+ a.train(:notjobs, "metroidvania:", "word")
1994
+ a.train(:notjobs, "football:", "word")
1995
+ a.train(:notjobs, "baseball:", "word")
1996
+ a.train(:notjobs, "soccer:", "word")
1997
+ a.train(:notjobs, "volleyball:", "word")
1998
+ a.train(:notjobs, "skateboard:", "word")
1999
+ a.train(:notjobs, "bike:", "word")
2000
+ a.train(:notjobs, "skate:", "word")
2001
+ a.train(:notjobs, "sing?", "word")
2002
+ a.train(:notjobs, "illustrate?", "word")
2003
+ a.train(:notjobs, "draw?", "word")
2004
+ a.train(:notjobs, "write?", "word")
2005
+ a.train(:notjobs, "widdle?", "word")
2006
+ a.train(:notjobs, "dance?", "word")
2007
+ a.train(:notjobs, "clog?", "word")
2008
+ a.train(:notjobs, "weave?", "word")
2009
+ a.train(:notjobs, "crochet?", "word")
2010
+ a.train(:notjobs, "knit?", "word")
2011
+ a.train(:notjobs, "swim?", "word")
2012
+ a.train(:notjobs, "BDSM?", "word")
2013
+ a.train(:notjobs, "game?", "word")
2014
+ a.train(:notjobs, "JRPG?", "word")
2015
+ a.train(:notjobs, "MMORPG?", "word")
2016
+ a.train(:notjobs, "FPS?", "word")
2017
+ a.train(:notjobs, "SIM?", "word")
2018
+ a.train(:notjobs, "metroidvania?", "word")
2019
+ a.train(:notjobs, "football?", "word")
2020
+ a.train(:notjobs, "baseball?", "word")
2021
+ a.train(:notjobs, "soccer?", "word")
2022
+ a.train(:notjobs, "volleyball?", "word")
2023
+ a.train(:notjobs, "skateboard?", "word")
2024
+ a.train(:notjobs, "bike?", "word")
2025
+ a.train(:notjobs, "skate?", "word")
2026
+
2027
+ # Are Jobs
2028
+ a.train(:jobs, "nurse", "word")
2029
+ a.train(:jobs, "officer", "word")
2030
+ a.train(:jobs, "fireman", "word")
2031
+ a.train(:jobs, "cashier", "word")
2032
+ a.train(:jobs, "stocker", "word")
2033
+ a.train(:jobs, "barber", "word")
2034
+ a.train(:jobs, "stylist", "word")
2035
+ a.train(:jobs, "clerk", "word")
2036
+ a.train(:jobs, "butcher", "word")
2037
+ a.train(:jobs, "reporter", "word")
2038
+ a.train(:jobs, "manager", "word")
2039
+ a.train(:jobs, "crane", "word")
2040
+ a.train(:jobs, "lawyer", "word")
2041
+ a.train(:jobs, "cameraman", "word")
2042
+ a.train(:jobs, "engineer", "word")
2043
+ a.train(:jobs, "pilot", "word")
2044
+ a.train(:jobs, "nurse.", "word")
2045
+ a.train(:jobs, "officer.", "word")
2046
+ a.train(:jobs, "fireman.", "word")
2047
+ a.train(:jobs, "cashier.", "word")
2048
+ a.train(:jobs, "stocker.", "word")
2049
+ a.train(:jobs, "barber.", "word")
2050
+ a.train(:jobs, "stylist.", "word")
2051
+ a.train(:jobs, "clerk.", "word")
2052
+ a.train(:jobs, "butcher.", "word")
2053
+ a.train(:jobs, "reporter.", "word")
2054
+ a.train(:jobs, "manager.", "word")
2055
+ a.train(:jobs, "crane.", "word")
2056
+ a.train(:jobs, "lawyer.", "word")
2057
+ a.train(:jobs, "cameraman.", "word")
2058
+ a.train(:jobs, "engineer.", "word")
2059
+ a.train(:jobs, "pilot.", "word")
2060
+ a.train(:jobs, "nurse;", "word")
2061
+ a.train(:jobs, "officer;", "word")
2062
+ a.train(:jobs, "fireman;", "word")
2063
+ a.train(:jobs, "cashier;", "word")
2064
+ a.train(:jobs, "stocker;", "word")
2065
+ a.train(:jobs, "barber;", "word")
2066
+ a.train(:jobs, "stylist;", "word")
2067
+ a.train(:jobs, "clerk;", "word")
2068
+ a.train(:jobs, "butcher;", "word")
2069
+ a.train(:jobs, "reporter;", "word")
2070
+ a.train(:jobs, "manager;", "word")
2071
+ a.train(:jobs, "crane;", "word")
2072
+ a.train(:jobs, "lawyer;", "word")
2073
+ a.train(:jobs, "cameraman;", "word")
2074
+ a.train(:jobs, "engineer;", "word")
2075
+ a.train(:jobs, "pilot;", "word")
2076
+ a.train(:jobs, "nurse:", "word")
2077
+ a.train(:jobs, "officer:", "word")
2078
+ a.train(:jobs, "fireman:", "word")
2079
+ a.train(:jobs, "cashier:", "word")
2080
+ a.train(:jobs, "stocker:", "word")
2081
+ a.train(:jobs, "barber:", "word")
2082
+ a.train(:jobs, "stylist:", "word")
2083
+ a.train(:jobs, "clerk:", "word")
2084
+ a.train(:jobs, "butcher:", "word")
2085
+ a.train(:jobs, "reporter:", "word")
2086
+ a.train(:jobs, "manager:", "word")
2087
+ a.train(:jobs, "crane:", "word")
2088
+ a.train(:jobs, "lawyer:", "word")
2089
+ a.train(:jobs, "cameraman:", "word")
2090
+ a.train(:jobs, "engineer:", "word")
2091
+ a.train(:jobs, "pilot:", "word")
2092
+ a.train(:jobs, "nurse?", "word")
2093
+ a.train(:jobs, "officer?", "word")
2094
+ a.train(:jobs, "fireman?", "word")
2095
+ a.train(:jobs, "cashier?", "word")
2096
+ a.train(:jobs, "stocker?", "word")
2097
+ a.train(:jobs, "barber?", "word")
2098
+ a.train(:jobs, "stylist?", "word")
2099
+ a.train(:jobs, "clerk?", "word")
2100
+ a.train(:jobs, "butcher?", "word")
2101
+ a.train(:jobs, "reporter?", "word")
2102
+ a.train(:jobs, "manager?", "word")
2103
+ a.train(:jobs, "crane?", "word")
2104
+ a.train(:jobs, "lawyer?", "word")
2105
+ a.train(:jobs, "cameraman?", "word")
2106
+ a.train(:jobs, "engineer?", "word")
2107
+ a.train(:jobs, "pilot?", "word")
2108
+
2109
+ # Chatbot process for asking about pets.
2110
+ print "#{bot_name}: What do you do for a living?\n#{your_name}: "
2111
+ b = gets.chomp.split(' ')
2112
+
2113
+ # Classify b and convert to string.
2114
+ a_class = a.classify(*b)
2115
+ result = a_class[0]
2116
+ decision = result.to_s
2117
+
2118
+ if decision == "jobs"
2119
+ puts "#{bot_name}: Do you like that job?"
2120
+ else
2121
+ puts "#{bot_name}: I did not know you make a living doing that."
2122
+ end
584
2123
  end
585
2124
 
586
2125
  # Checks if what you reference is a skill.
587
- def check_skills
2126
+ def self.check_skills
588
2127
  bot_name = File.read("bot_identity/bot_name.txt").strip
589
2128
  your_name = File.read("your_identity/your_identity.txt").strip
590
2129
 
591
2130
  a = NaiveBayes.new(:skills, :notskills)
2131
+
2132
+ # Are Skills
2133
+ a.train(:skills, "codebreak", "word")
2134
+ a.train(:skills, "cook", "word")
2135
+ a.train(:skills, "climb", "word")
2136
+ a.train(:skills, "yoddle", "word")
2137
+ a.train(:skills, "blacksmith", "word")
2138
+ a.train(:skills, "codebreak.", "word")
2139
+ a.train(:skills, "cook.", "word")
2140
+ a.train(:skills, "climb.", "word")
2141
+ a.train(:skills, "yoddle.", "word")
2142
+ a.train(:skills, "blacksmith.", "word")
2143
+ a.train(:skills, "codebreak;", "word")
2144
+ a.train(:skills, "cook;", "word")
2145
+ a.train(:skills, "climb;", "word")
2146
+ a.train(:skills, "yoddle;", "word")
2147
+ a.train(:skills, "blacksmith;", "word")
2148
+ a.train(:skills, "codebreak:", "word")
2149
+ a.train(:skills, "cook:", "word")
2150
+ a.train(:skills, "climb:", "word")
2151
+ a.train(:skills, "yoddle:", "word")
2152
+ a.train(:skills, "blacksmith:", "word")
2153
+ a.train(:skills, "codebreak?", "word")
2154
+ a.train(:skills, "cook?", "word")
2155
+ a.train(:skills, "climb?", "word")
2156
+ a.train(:skills, "yoddle?", "word")
2157
+ a.train(:skills, "blacksmith?", "word")
2158
+
2159
+ # Are Not Skills
2160
+ a.train(:notskills, "nurse", "word")
2161
+ a.train(:notskills, "officer", "word")
2162
+ a.train(:notskills, "fireman", "word")
2163
+ a.train(:notskills, "cashier", "word")
2164
+ a.train(:notskills, "stocker", "word")
2165
+ a.train(:notskills, "barber", "word")
2166
+ a.train(:notskills, "stylist", "word")
2167
+ a.train(:notskills, "clerk", "word")
2168
+ a.train(:notskills, "butcher", "word")
2169
+ a.train(:notskills, "reporter", "word")
2170
+ a.train(:notskills, "manager", "word")
2171
+ a.train(:notskills, "crane", "word")
2172
+ a.train(:notskills, "lawyer", "word")
2173
+ a.train(:notskills, "cameraman", "word")
2174
+ a.train(:notskills, "engineer", "word")
2175
+ a.train(:notskills, "pilot", "word")
2176
+ a.train(:notskills, "nurse.", "word")
2177
+ a.train(:notskills, "officer.", "word")
2178
+ a.train(:notskills, "fireman.", "word")
2179
+ a.train(:notskills, "cashier.", "word")
2180
+ a.train(:notskills, "stocker.", "word")
2181
+ a.train(:notskills, "barber.", "word")
2182
+ a.train(:notskills, "stylist.", "word")
2183
+ a.train(:notskills, "clerk.", "word")
2184
+ a.train(:notskills, "butcher.", "word")
2185
+ a.train(:notskills, "reporter.", "word")
2186
+ a.train(:notskills, "manager.", "word")
2187
+ a.train(:notskills, "crane.", "word")
2188
+ a.train(:notskills, "lawyer.", "word")
2189
+ a.train(:notskills, "cameraman.", "word")
2190
+ a.train(:notskills, "engineer.", "word")
2191
+ a.train(:notskills, "pilot.", "word")
2192
+ a.train(:notskills, "nurse?", "word")
2193
+ a.train(:notskills, "officer?", "word")
2194
+ a.train(:notskills, "fireman?", "word")
2195
+ a.train(:notskills, "cashier?", "word")
2196
+ a.train(:notskills, "stocker?", "word")
2197
+ a.train(:notskills, "barber?", "word")
2198
+ a.train(:notskills, "stylist?", "word")
2199
+ a.train(:notskills, "clerk?", "word")
2200
+ a.train(:notskills, "butcher?", "word")
2201
+ a.train(:notskills, "reporter?", "word")
2202
+ a.train(:notskills, "manager?", "word")
2203
+ a.train(:notskills, "crane?", "word")
2204
+ a.train(:notskills, "lawyer?", "word")
2205
+ a.train(:notskills, "cameraman?", "word")
2206
+ a.train(:notskills, "engineer?", "word")
2207
+ a.train(:notskills, "pilot?", "word")
2208
+
2209
+ # Chatbot process for asking about pets.
2210
+ print "#{bot_name}: What would you say is your skill?\n#{your_name}: "
2211
+ b = gets.chomp.split(' ')
2212
+
2213
+ # Classify b and convert to string.
2214
+ a_class = a.classify(*b)
2215
+ result = a_class[0]
2216
+ decision = result.to_s
2217
+
2218
+ if decision == "skills"
2219
+ puts "#{bot_name}: Would you ever consider changing your skills?"
2220
+ else
2221
+ puts "#{bot_name}: I thought that was a job, and not a skill."
2222
+ end
592
2223
  end
593
2224
 
594
2225
  # Cheks if what you reference is a weather pattern.
595
- def check_weather
2226
+ def self.check_weather
596
2227
  bot_name = File.read("bot_identity/bot_name.txt").strip
597
2228
  your_name = File.read("your_identity/your_identity.txt").strip
598
2229
 
599
2230
  a = NaiveBayes.new(:weather, :notweather)
2231
+
2232
+ # Is a weather pattern
2233
+ a.train(:weather, "sunny", "word")
2234
+ a.train(:weather, "rainy", "word")
2235
+ a.train(:weather, "cloudy", "word")
2236
+ a.train(:weather, "foggy", "word")
2237
+ a.train(:weather, "humid", "word")
2238
+
2239
+ # Is not a weather pattern.
2240
+ a.train(:notweather, "pilot", "word")
2241
+ a.train(:notweather, "sundance", "word")
2242
+ a.train(:notweather, "officer", "word")
2243
+ a.train(:notweather, "cashier", "word")
2244
+ a.train(:notweather, "elephany", "word")
2245
+
2246
+ # Chatbot process for asking about pets.
2247
+ print "#{bot_name}: What is the weather currently?\n#{your_name}: "
2248
+ b = gets.chomp.split(' ')
2249
+
2250
+ # Classify b and convert to string.
2251
+ a_class = a.classify(*b)
2252
+ result = a_class[0]
2253
+ decision = result.to_s
2254
+
2255
+ if decision == "skills"
2256
+ puts "#{bot_name}: Some people like the rain, others the snow. It really varies!"
2257
+ else
2258
+ puts "#{bot_name}: I didn't know that was a weather pattern."
2259
+ end
600
2260
  end
601
2261
 
602
2262
  iteration = File.read("data/iteration.txt") # Controls the sleep time between personality details and input.