ImpUnit 0.3.2 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a8c68f75fe135d9c3dd69bea906b491c6597b3be8c4213c9eeb39dc17e3fdbf
4
- data.tar.gz: 23cdc8d14bfcb63404796319fa486efc30fd918a198f1e2077ffdd2b8e05f5b9
3
+ metadata.gz: ab8b641cf21e85d33c9da3b065bc529c5063315351fce6bde74cf2305469f25d
4
+ data.tar.gz: 6bac22ca5c38b6697745ee79375f26d651d7c77c50e4d96b8aa7101d77c17839
5
5
  SHA512:
6
- metadata.gz: c482de7dc2ea438381cd3f02d4528c4b83a361e95480aec76d7c4e117113ea151719e58e244fd0190593b175d86c64d28c3d82bf71f1473cba3b41962428bdcd
7
- data.tar.gz: f5661663d0ed69921cddf62d11b1d53043186efabc8c326f9b71a7e9911aaa5f71f16706d22d2a89eba605bb7e470c90a440deab88fcbf247f38de0df2eea6ec
6
+ metadata.gz: 410f4c0df14789813d7cd16e850170985773d61b75ac1c7bcd05dbffc560fba5bd8339a1b3a6b57b368382453ac8b2ce203833d224c3f8054d32e42625fd7e0b
7
+ data.tar.gz: 48ba497efbafd5b323546133fbcebfb4b141373a53b89edd056734f93021fd4f27bef00974843443a33ea9a3adf07ac94f471e22cdf7527a75ae0f3ba7723dd9
data/ImpUnit.gemspec CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["lwflouisa@gmail.com"]
11
11
 
12
12
  spec.summary = %q{ImpUnit engine. The intent is a human like intelligence small enough to fit into a thumb drive.}
13
- spec.description = %q{Implementing the main engine and subroutines into a gem so I don't have to continuously recreate the wheel.}
14
- spec.homepage = "https://lwflouisa.github.io/ImpUnitGem"
13
+ spec.description = %q{Implementing the main engine and subroutines into a gem so I don't have to continuously recreate the wheel. Finally got the local subscriptions feed for rikusuto mode to work.}
14
+ spec.homepage = "https://github.com/LWFlouisa/ImpUnitApp"
15
15
 
16
16
  # Specify which files should be added to the gem when it is released.
17
17
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -1,3 +1,3 @@
1
1
  module ImpUnit
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.1"
3
3
  end
data/lib/ImpUnit.rb CHANGED
@@ -13,7 +13,7 @@ module ImpUnit
13
13
  # def self.manual
14
14
  # end
15
15
  # end
16
-
16
+
17
17
  class MainAI
18
18
  def self.seed
19
19
  number = 0
@@ -120,8 +120,233 @@ end"
120
120
  end
121
121
  end
122
122
 
123
+ # Naive Baysian model on Fraponic.
124
+ class LanguageFraponic
125
+ def self.grammar_feed
126
+ input = File.read("data/language/input.txt").downcase.split(" ")
127
+
128
+ number = 0
129
+
130
+ size_limit = input.size.to_i
131
+
132
+ require "naive_bayes"
133
+
134
+ size_limit.times do
135
+ require "naive_bayes"
136
+
137
+ grammar = NaiveBayes.new(:word_gender,
138
+ :personal_pronouns,
139
+ :nouns,
140
+ :adjectives,
141
+ :conjucation_prepositions,
142
+ :verbs,
143
+ :adverbs,
144
+ )
145
+
146
+ # Train on word genders.
147
+ grammar.train(:word_gender, "u", "word")
148
+ grammar.train(:word_gender, "a", "word")
149
+ grammar.train(:word_gender, "os", "word")
150
+
151
+ # Train on personal pronouns
152
+ grammar.train(:personal_pronouns, "ne", "word")
153
+ grammar.train(:personal_pronouns, "miyo", "word")
154
+ grammar.train(:personal_pronouns, "viyo", "word")
155
+ grammar.train(:personal_pronouns, "tiyo", "word")
156
+ grammar.train(:personal_pronouns, "niyo", "word")
157
+ grammar.train(:personal_pronouns, "iye", "word")
158
+ grammar.train(:personal_pronouns, "iyesu", "word")
159
+ grammar.train(:personal_pronouns, "eye", "word")
160
+ grammar.train(:personal_pronouns, "eyesa", "word")
161
+
162
+ # Train on personal pronouns
163
+ grammar.train(:personal_pronouns, "iyeniyo", "word")
164
+ grammar.train(:personal_pronouns, "eyeniyo", "word")
165
+ grammar.train(:personal_pronouns, "iyesuniyo", "word")
166
+ grammar.train(:personal_pronouns, "eyesaniyo", "word")
167
+
168
+ # Train on family members.
169
+ grammar.train(:nouns, "pede", "word")
170
+ grammar.train(:nouns, "mede", "word")
171
+ grammar.train(:nouns, "sferede", "word")
172
+ grammar.train(:nouns, "sfude", "word")
173
+ grammar.train(:nouns, "cusfijere", "word")
174
+ grammar.train(:nouns, "cusfijera", "word")
175
+ grammar.train(:nouns, "cusfijeres", "word")
176
+ grammar.train(:nouns, "tanite", "word")
177
+ grammar.train(:nouns, "oji", "word")
178
+
179
+ # Train on secondary nouns
180
+ grammar.train(:nouns, "cuto", "word")
181
+ grammar.train(:nouns, "cere", "word")
182
+ grammar.train(:nouns, "xase", "word")
183
+ grammar.train(:nouns, "tankobon", "word")
184
+ grammar.train(:nouns, "michite", "word")
185
+ grammar.train(:nouns, "gahe", "word")
186
+ grammar.train(:nouns, "gahene", "word")
187
+ grammar.train(:nouns, "koroyo", "word")
188
+ grammar.train(:nouns, "toko", "word")
189
+ grammar.train(:nouns, "hadajo", "word")
190
+ grammar.train(:nouns, "makadama", "word")
191
+ grammar.train(:nouns, "ishiniko", "word")
192
+ grammar.train(:nouns, "tasfijo", "word")
193
+ grammar.train(:nouns, "musilijero", "word")
194
+ grammar.train(:nouns, "itami", "word")
195
+ grammar.train(:nouns, "kiho", "word")
196
+ grammar.train(:nouns, "enekurofire", "word")
197
+ grammar.train(:nouns, "ehamatoragune", "word")
198
+ grammar.train(:nouns, "robosekusurite", "word")
199
+ grammar.train(:nouns, "sekusurite", "word")
200
+ grammar.train(:nouns, "apetite", "word")
201
+ grammar.train(:nouns, "hakusu", "word")
202
+ grammar.train(:nouns, "basukete", "word")
203
+ grammar.train(:nouns, "gerope", "word")
204
+ grammar.train(:nouns, "banidoru", "word")
205
+ grammar.train(:nouns, "sfavare", "word")
206
+ grammar.train(:nouns, "sfabine", "word")
207
+ grammar.train(:nouns, "atimosipilere", "word")
208
+ grammar.train(:nouns, "funiki", "word")
209
+ grammar.train(:nouns, "boruto", "word")
210
+ grammar.train(:nouns, "verohe", "word")
211
+ grammar.train(:nouns, "xehene", "word")
212
+ grammar.train(:nouns, "kytapira", "word")
213
+
214
+ # Train on adjectives
215
+ grammar.train(:adjectives, "ebax", "word")
216
+ grammar.train(:adjectives, "beloyan", "word")
217
+ grammar.train(:adjectives, "uchay", "word")
218
+ grammar.train(:adjectives, "berane", "word")
219
+ grammar.train(:adjectives, "pahe", "word")
220
+ grammar.train(:adjectives, "enere", "word")
221
+ grammar.train(:adjectives, "visarize", "word")
222
+ grammar.train(:adjectives, "venituse", "word")
223
+ grammar.train(:adjectives, "kiwotsukero", "word")
224
+ grammar.train(:adjectives, "kebuka", "word")
225
+ grammar.train(:adjectives, "sula", "word")
226
+ grammar.train(:adjectives, "kosatasu", "word")
227
+ grammar.train(:adjectives, "hatadake", "word")
228
+ grammar.train(:adjectives, "ateroce", "word")
229
+ grammar.train(:adjectives, "aboradaberu", "word")
230
+ grammar.train(:adjectives, "regarabehe", "word")
231
+ grammar.train(:adjectives, "arutesiqe", "word")
232
+ grammar.train(:adjectives, "etimire", "word")
233
+ grammar.train(:adjectives, "eseru", "word")
234
+ grammar.train(:adjectives, "hitori", "word")
235
+
236
+ # Train on conjucations and prepositions
237
+ grammar.train(:conjucation_prepositions, "di", "word")
238
+ grammar.train(:conjucation_prepositions, "ni", "word")
239
+ grammar.train(:conjucation_prepositions, "si", "word")
240
+ grammar.train(:conjucation_prepositions, "isi", "word")
241
+ grammar.train(:conjucation_prepositions, "ow", "word")
242
+ grammar.train(:conjucation_prepositions, "axo", "word")
243
+ grammar.train(:conjucation_prepositions, "swa", "word")
244
+ grammar.train(:conjucation_prepositions, "esoma", "word")
245
+ grammar.train(:conjucation_prepositions, "peru", "word")
246
+ grammar.train(:conjucation_prepositions, "somene", "word")
247
+ grammar.train(:conjucation_prepositions, "uu", "word")
248
+ grammar.train(:conjucation_prepositions, "qi", "word")
249
+ grammar.train(:conjucation_prepositions, "qo", "word")
250
+ grammar.train(:conjucation_prepositions, "qe", "word")
251
+ grammar.train(:conjucation_prepositions, "qunida", "word")
252
+ grammar.train(:conjucation_prepositions, "cero", "word")
253
+ grammar.train(:conjucation_prepositions, "aves", "word")
254
+ grammar.train(:conjucation_prepositions, "dez", "word")
255
+ grammar.train(:conjucation_prepositions, "sonite", "word")
256
+ grammar.train(:conjucation_prepositions, "etere", "word")
257
+ grammar.train(:conjucation_prepositions, "oqe", "word")
258
+
259
+ # Train on verbs.
260
+ grammar.train(:verbs, "eru", "word")
261
+ grammar.train(:verbs, "cupo", "word")
262
+ grammar.train(:verbs, "uvere", "word")
263
+ grammar.train(:verbs, "asochi", "word")
264
+ grammar.train(:verbs, "lisoje", "word")
265
+ grammar.train(:verbs, "decite", "word")
266
+ grammar.train(:verbs, "sufere", "word")
267
+ grammar.train(:verbs, "exipoze", "word")
268
+ grammar.train(:verbs, "kimeru", "word")
269
+ grammar.train(:verbs, "hoko", "word")
270
+ grammar.train(:verbs, "uzuke", "word")
271
+ grammar.train(:verbs, "xosfe", "word")
272
+ grammar.train(:verbs, "yubiwa", "word")
273
+ grammar.train(:verbs, "atachi", "word")
274
+ grammar.train(:verbs, "furuma", "word")
275
+ grammar.train(:verbs, "zokusuru", "word")
276
+ grammar.train(:verbs, "cerine", "word")
277
+ grammar.train(:verbs, "konitoru", "word")
278
+ grammar.train(:verbs, "erokute", "word")
279
+ grammar.train(:verbs, "vohonite", "word")
280
+ grammar.train(:verbs, "exusfe", "word")
281
+ grammar.train(:verbs, "salaza", "word")
282
+ grammar.train(:verbs, "eperi", "word")
283
+ grammar.train(:verbs, "mageru", "word")
284
+ grammar.train(:verbs, "eroge", "word")
285
+ grammar.train(:verbs, "sekimen", "word")
286
+ grammar.train(:verbs, "emiperunite", "word")
287
+ grammar.train(:verbs, "karite", "word")
288
+
289
+ # Train on adverbs.
290
+ grammar.train(:verbs, "vite", "word")
291
+ grammar.train(:verbs, "hente", "word")
292
+ grammar.train(:verbs, "mute", "word")
293
+ grammar.train(:verbs, "dolemente", "word")
294
+ grammar.train(:verbs, "pedecise", "word")
295
+ grammar.train(:verbs, "mopedecise", "word")
296
+ grammar.train(:verbs, "vivemeje", "word")
297
+ grammar.train(:verbs, "ketasuzejo", "word")
298
+ grammar.train(:verbs, "dusa", "word")
299
+ grammar.train(:verbs, "terebereme", "word")
300
+
301
+ b = input[number]
302
+
303
+ result = "#{grammar.classify(*b)}"
304
+
305
+ # Generate description and XML timeline.
306
+ description = "#{result}"
307
+
308
+ open("documents/#{date_title}.txt", "w") { |f|
309
+ f.puts description
310
+ }
311
+
312
+ new_output = "
313
+ <item>
314
+ <title>#{date}</title>
315
+ <link>http://localhost:8000/documents/#{date_title}.txt</link>
316
+ <description><![CDATA[<p>#{description}</p>]]></description>
317
+ </item>"
318
+
319
+ open("feed/old_feed.txt", "w") { |f|
320
+ f.puts new_output
321
+ }
322
+
323
+ generate_xml = "<?xml version='1.0' encoding='UTF-8' ?>
324
+ <rss version='2.0'>
325
+
326
+ <channel>
327
+ <title>Grammar Feed</title>
328
+ <link>http://localhost:8000/feed.xml</link>
329
+ <description>Local Feed for naive bayes output.</description>
330
+
331
+ #{new_output}
332
+ #{old_output}
333
+ </channel>
334
+
335
+ </rss>"
336
+
337
+ open("feed/feed.xml", "w") { |f|
338
+ f.puts generate_xml
339
+ }
340
+
341
+ sleep(1)
342
+
343
+ number = number + 1
344
+ end
345
+ end
346
+ end
347
+
123
348
  # Bleeding edge
124
- class ObjectColor
349
+ class Object
125
350
  def self.what_object
126
351
  input = File.read("data/object/object_chart.txt").split(" ")
127
352
 
@@ -355,9 +580,9 @@ end"
355
580
  attributes = ['Rikusuto']
356
581
 
357
582
  training = [
358
- [ 0.5, "will you get"],
359
- [ 50.0, "will you obtain"],
360
- [100.0, "may I have"],
583
+ [ 0.5, "vohonitos viyos eros"], # will you get
584
+ [ 50.0, "vohonitos viyos obetenos"], # will you obtain
585
+ [100.0, "putos ne avoros"], # may I have
361
586
  ]
362
587
 
363
588
  # Instantiate the tree, and train it based on the data (set default to '1')
@@ -391,11 +616,11 @@ end"
391
616
  attributes = ['Atemu']
392
617
 
393
618
  training = [
394
- [ 0.5, "a banana"],
395
- [ 25.0, "an orange"],
396
- [ 50.0, "an apple"],
397
- [ 75.0, "a pineapple"],
398
- [100.0, "a lime"],
619
+ [ 0.5, "Eramos onas bananos"], # Banana
620
+ [ 25.0, "Eramos onas oranigos"], # Orange
621
+ [ 50.0, "Eramos onas pomos"], # Apple
622
+ [ 75.0, "Eramos onas pinapuros"], # Pineapple
623
+ [100.0, "Eramos onas himos"], # Lime
399
624
  ]
400
625
 
401
626
  # Instantiate the tree, and train it based on the data (set default to '1')
@@ -451,15 +676,18 @@ end"
451
676
 
452
677
  # ImpUnit::FXML.generate
453
678
  def self.generate
454
- xml_header = '<?xml version="1.0" encoding="UTF-8"?>
679
+ old_output = File.read("feed/old_feed.txt")
455
680
 
456
- <?xml-stylesheet type="text/css" href="styles/stylesheet.css"?>'
681
+ # Get the date.
682
+ system("date > date/date.txt")
457
683
 
458
- # Topic tags
459
- topic_header = "<topic>"
460
- topic_bottom = "</topic>"
684
+ # Immutables
685
+ date = File.read("date/date.txt").strip
686
+ date_title = date.tr " ", "_"
461
687
 
462
688
  # Read in from files.
689
+ system("ruby .rikusuto.rb; ruby .atemu.rb; ruby .yuza.rb")
690
+
463
691
  agent_name = File.read("data/usr_identity/name.txt").strip.to_s
464
692
  request_type = File.read("data/rikusuto/request.txt").strip.to_s
465
693
  item = File.read("data/atemu/items.txt").strip.to_s
@@ -467,14 +695,14 @@ end"
467
695
  local_name = File.read("data/usr_identity/local_name.txt").strip.to_s
468
696
 
469
697
  # Create XML tags
470
- salut = "Hello"
471
- ejento = " #{agent_name}"
472
- rikusuto = " #{request_type}"
473
- atemu = " #{item}"
474
- nitote = " for"
475
- kara = " from"
476
- yuza = " #{user_name}"
477
- lieu = " #{local_name}?"
698
+ salut = "Ehiyo"
699
+ ejento = "#{agent_name}!"
700
+ rikusuto = "#{request_type}"
701
+ atemu = "#{item}"
702
+ nitote = "nitote"
703
+ kara = "kara"
704
+ yuza = "#{user_name}?"
705
+ lieu = "#{local_name}?"
478
706
 
479
707
  conjucate = [nitote, kara]
480
708
  consign = conjucate.sample
@@ -482,16 +710,40 @@ end"
482
710
  user_location = [yuza, lieu]
483
711
  usign = user_location[0]
484
712
 
485
- system("date +'%Y-%d-%m' > date.txt")
713
+ # Generate description and XML timeline.
714
+ description = "#{salut} #{ejento} #{atemu} #{rikusuto} #{consign} #{usign}"
715
+
716
+ open("documents/#{date_title}.txt", "w") { |f|
717
+ f.puts description
718
+ }
719
+
720
+ new_output = "
721
+ <item>
722
+ <title>#{date}</title>
723
+ <link>http://localhost:8000/documents/#{date_title}.txt</link>
724
+ <description><![CDATA[<p>#{description}</p>]]></description>
725
+ </item>"
726
+
727
+ open("feed/old_feed.txt", "w") { |f|
728
+ f.puts new_output
729
+ }
730
+
731
+ generate_xml = "<?xml version='1.0' encoding='UTF-8' ?>
732
+ <rss version='2.0'>
733
+
734
+ <channel>
735
+ <title>Request Feed</title>
736
+ <link>http://localhost:8000/feed.xml</link>
737
+ <description>Local Feed for ImpUnit output.</description>
738
+
739
+ #{new_output}
740
+ #{old_output}
741
+ </channel>
486
742
 
487
- date = File.read("date.txt").strip.to_s
743
+ </rss>"
488
744
 
489
- open("#{date}-update.md", "w") { |f|
490
- f.puts "---"
491
- f.puts "title: '#{date} Update'"
492
- f.puts "layout: post"
493
- f.puts "---"
494
- f.puts "#{salut} #{ejento} #{rikusuto} #{atemu} #{consign} #{usign}"
745
+ open("feed/feed.xml", "w") { |f|
746
+ f.puts generate_xml
495
747
  }
496
748
  end
497
749
  end
@@ -580,7 +832,7 @@ end"
580
832
 
581
833
  def self.cumin
582
834
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
583
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
835
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
584
836
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
585
837
 
586
838
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -592,7 +844,7 @@ end"
592
844
 
593
845
  def self.cayenne
594
846
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
595
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
847
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
596
848
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
597
849
 
598
850
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -604,7 +856,7 @@ end"
604
856
 
605
857
  def self.chilly_powder
606
858
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
607
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
859
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
608
860
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
609
861
 
610
862
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -616,7 +868,7 @@ end"
616
868
 
617
869
  def self.crushed_peppers
618
870
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
619
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
871
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
620
872
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
621
873
 
622
874
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -628,7 +880,7 @@ end"
628
880
 
629
881
  def self.garlic_powder
630
882
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
631
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
883
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
632
884
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
633
885
 
634
886
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -640,7 +892,7 @@ end"
640
892
 
641
893
  def self.onion_powder
642
894
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
643
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
895
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
644
896
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
645
897
 
646
898
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -652,7 +904,7 @@ end"
652
904
 
653
905
  def self.cocao_powder
654
906
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
655
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
907
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
656
908
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
657
909
 
658
910
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -664,7 +916,7 @@ end"
664
916
 
665
917
  def self.cinnamon
666
918
  spoon_size = [ "1/8 ", "1/4 ", "1/2 ", "1 ",
667
- "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
919
+ "1 1/8 ", "1 1/4th ", "1 1/2 ", "2 ",
668
920
  "2 1/8 ", "2 1/4th ", "2 1/2 ", "3 "]
669
921
 
670
922
  spoon_type = ["teaspoon ", "tablespoon ", "cup ", "shotglass "]
@@ -676,30 +928,38 @@ end"
676
928
  end
677
929
  end
678
930
 
679
- #module Bianca
680
- #class SmallTalk
681
- #def self.name
682
- #end
931
+ module Bianca
932
+ class SmallTalk
933
+ def self.discuss
934
+ require "programr"
683
935
 
684
- #def self.pets
685
- #end
936
+ bot_name = File.read("data/bot_identity/name.txt").strip
937
+ usr_name = File.read("data/usr_identity/name.txt").strip
686
938
 
687
- #def self.hobbies
688
- #end
939
+ brains = Dir.glob("brain/*")
689
940
 
690
- #def self.jobs
691
- #end
941
+ robot = ProgramR::Facade.new
942
+ robot.learn(brains)
692
943
 
693
- #def self.skills
694
- #end
944
+ puts " Welcome to #{bot_name}. This is the terminal for Bianca."
695
945
 
696
- #def self.weather
697
- #end
946
+ while true
947
+ print "#{usr_name } >> "
948
+ s = STDIN.gets.chomp
698
949
 
699
- #def self.operate
700
- #end
701
- #end
702
- #end
950
+ reaction = robot.get_reaction(s)
951
+
952
+ if reaction == ""
953
+ STDOUT.puts "#{bot_name} << I have no idea."
954
+ elsif reaction == "Closing"
955
+ abort
956
+ else
957
+ STDOUT.puts "#{bot_name} << #{reaction}"
958
+ end
959
+ end
960
+ end
961
+ end
962
+ end
703
963
 
704
964
  ## Measuring the distance between objects and size of objects in space.
705
965
  #module SpatialRelationships
@@ -711,56 +971,56 @@ end
711
971
  #def positive_perimeters
712
972
  # Base radius of static objects.
713
973
  #base_radius = 2500
714
-
974
+
715
975
  # Specfic multipliers for Earth index based objects.
716
- #base_two = 2
976
+ #base_two = 2
717
977
  #base_fro = 4
718
978
  #base_six = 6
719
979
  #base_eit = 8
720
-
980
+
721
981
  # Size of specific objects.
722
982
  #size_of_planets = base_radius ** base_fro
723
983
  #size_of_moons = base_radius ** base_two
724
984
  #size_of_stars = base_radius ** base_six
725
985
  #size_of_blackholes = base_radius ** base_eit
726
-
986
+
727
987
  # Total output sizes of specific objects.
728
988
  #puts "The size of the planets is #{size_of_planets} radius."; sleep(3)
729
989
  #puts "The size of the moons is #{size_of_moons} radius."; sleep(3)
730
990
  #puts "The size of the stars is #{size_of_stars} radius."; sleep(3)
731
991
  #puts "The size of a blackhole is #{size_of_blackholes} radius."; sleep(3)
732
992
  #end
733
-
993
+
734
994
  # Space between the objects.
735
995
  #def negative_perimeters
736
996
  # Base distance between objects.
737
997
  #base_distance = 1_000_000_000
738
-
998
+
739
999
  # Estimated divider between specific objects to base distance.
740
1000
  #space_between_planets = 43.8
741
1001
  #space_between_moons = 14.6
742
1002
  #space_between_stars = 876
743
1003
  #space_between_blackholes = 2628
744
-
1004
+
745
1005
  # Minimum distance between objects.
746
1006
  #planet_distance = base_distance / space_between_planets
747
1007
  #moon_distance = base_distance / space_between_moons
748
1008
  #star_distance = base_distance / space_between_stars
749
1009
  #blackhole_distance = base_distance / space_between_blackholes
750
-
1010
+
751
1011
  # Actual distance between objects
752
1012
  #actual_planets = planet_distance * 10
753
1013
  #actual_moons = moon_distance * 10
754
1014
  #actual_stars = star_distance * 10
755
1015
  #actual_blackholes = blackhole_distance * 10
756
-
1016
+
757
1017
  # The output results of distance between objects.
758
1018
  #puts "The distance between planets is #{actual_planets} miles."; sleep(3)
759
1019
  #puts "The distance between moons is #{actual_moons} miles."; sleep(3)
760
1020
  #puts "The distance between stars is #{actual_stars} miles."; sleep(3)
761
1021
  #puts "The distance between blackholes is #{actual_blackholes} miles."; sleep(3)
762
1022
  #end
763
-
1023
+
764
1024
  #end
765
1025
 
766
1026
  # Changing perimeters
@@ -771,26 +1031,26 @@ end
771
1031
  #spaceship = File.read("data/dynamic/positive_perimenters/spaceship_size.txt").strip.to_i
772
1032
  #space_station = spaceship * 200
773
1033
  #satalite = space_station / 10
774
-
1034
+
775
1035
  #puts "The total size of the space shuttle is #{spaceship} feet."; sleep(3)
776
1036
  #puts "The total size of the space station is #{space_station} feet."; sleep(3)
777
1037
  #puts "The total size of the satalite is #{satalite} feet."; sleep(3)
778
1038
  #end
779
-
1039
+
780
1040
  # Space between the objects.
781
1041
  #def negative_perimeters
782
1042
  #base_multiplier = 10
783
-
1043
+
784
1044
  # Minimum space between objects.
785
1045
  #space_between_spaceships = File.read("data/dynamic/negative_perimeters/space_between_spaceships.txt").strip.to_i
786
1046
  #space_between_station = File.read("data/dynamic/negative_perimeters/space_between_station.txt").strip.to_i
787
1047
  #space_between_satalite = File.read("data/dynamic/negative_perimeters/space_between_satalite.txt").strip.to_i
788
-
1048
+
789
1049
  # Actual space between objects
790
1050
  #actual_spaceship_distance = space_between_spaceships * base_multiplier
791
1051
  #actual_station_distance = space_between_station * base_multiplier
792
1052
  #actual_satalite_distance = space_between_satalite * base_multiplier
793
-
1053
+
794
1054
  #puts "The minimum space between shuttles is #{actual_spaceship_distance} feet."; sleep(3)
795
1055
  #puts "The minimum space between stations is #{actual_station_distance} feet."; sleep(3)
796
1056
  #puts "The minimum space between satalites is #{actual_satalite_distance} feet."; sleep(3)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ImpUnit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - LWFlouisa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2021-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -39,7 +39,8 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description: Implementing the main engine and subroutines into a gem so I don't have
42
- to continuously recreate the wheel.
42
+ to continuously recreate the wheel. Finally got the local subscriptions feed for
43
+ rikusuto mode to work.
43
44
  email:
44
45
  - lwflouisa@gmail.com
45
46
  executables: []
@@ -55,7 +56,7 @@ files:
55
56
  - bin/setup
56
57
  - lib/ImpUnit.rb
57
58
  - lib/ImpUnit/version.rb
58
- homepage: https://lwflouisa.github.io/ImpUnitGem
59
+ homepage: https://github.com/LWFlouisa/ImpUnitApp
59
60
  licenses: []
60
61
  metadata: {}
61
62
  post_install_message: