ImpUnit 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ImpUnit.gemspec +2 -2
- data/lib/ImpUnit/version.rb +1 -1
- data/lib/ImpUnit.rb +84 -47
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: deeeeaa4b363cfe259a846c34cfec6a8bf6829147b0bbcd28eeab3a7fe7c9afd
|
|
4
|
+
data.tar.gz: 07197fae2ad86bb46fdab92b54099d5b755dedb61309dde9bac53f11916b867c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39b8c09eaa84453083c5b1318256f102a677001dd26018666cb80cdf3f7241f49f12f5c70999911aa00dbb137f11d6ba60c6198c216f4c7474f7e040bf46b188
|
|
7
|
+
data.tar.gz: 54996748d1ea6013a0130d35360137c2f1b6dc35f81d25742973013d41eeef280cc49a1b48c1433fa51faa485f50010ff4f5ec723ab4cf4f99276f66de2abbda
|
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://
|
|
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.
|
data/lib/ImpUnit/version.rb
CHANGED
data/lib/ImpUnit.rb
CHANGED
|
@@ -355,9 +355,9 @@ end"
|
|
|
355
355
|
attributes = ['Rikusuto']
|
|
356
356
|
|
|
357
357
|
training = [
|
|
358
|
-
[ 0.5,
|
|
359
|
-
[ 50.0, "will you obtain
|
|
360
|
-
[100.0,
|
|
358
|
+
[ 0.5, "vohonitos viyos eros"], # will you get
|
|
359
|
+
[ 50.0, "vohonitos viyos obetenos"], # will you obtain
|
|
360
|
+
[100.0, "putos ne avoros"], # may I have
|
|
361
361
|
]
|
|
362
362
|
|
|
363
363
|
# Instantiate the tree, and train it based on the data (set default to '1')
|
|
@@ -391,11 +391,11 @@ end"
|
|
|
391
391
|
attributes = ['Atemu']
|
|
392
392
|
|
|
393
393
|
training = [
|
|
394
|
-
[ 0.5,
|
|
395
|
-
[ 25.0,
|
|
396
|
-
[ 50.0,
|
|
397
|
-
[ 75.0, "
|
|
398
|
-
[100.0,
|
|
394
|
+
[ 0.5, "Eramos onas bananos"], # Banana
|
|
395
|
+
[ 25.0, "Eramos onas oranigos"], # Orange
|
|
396
|
+
[ 50.0, "Eramos onas pomos"], # Apple
|
|
397
|
+
[ 75.0, "Eramos onas pinapuros"], # Pineapple
|
|
398
|
+
[100.0, "Eramos onas himos"], # Lime
|
|
399
399
|
]
|
|
400
400
|
|
|
401
401
|
# Instantiate the tree, and train it based on the data (set default to '1')
|
|
@@ -451,15 +451,18 @@ end"
|
|
|
451
451
|
|
|
452
452
|
# ImpUnit::FXML.generate
|
|
453
453
|
def self.generate
|
|
454
|
-
|
|
454
|
+
old_output = File.read("feed/old_feed.txt")
|
|
455
455
|
|
|
456
|
-
|
|
456
|
+
# Get the date.
|
|
457
|
+
system("date > date/date.txt")
|
|
457
458
|
|
|
458
|
-
#
|
|
459
|
-
|
|
460
|
-
|
|
459
|
+
# Immutables
|
|
460
|
+
date = File.read("date/date.txt").strip
|
|
461
|
+
date_title = date.tr " ", "_"
|
|
461
462
|
|
|
462
463
|
# Read in from files.
|
|
464
|
+
system("ruby .rikusuto.rb; ruby .atemu.rb; ruby .yuza.rb")
|
|
465
|
+
|
|
463
466
|
agent_name = File.read("data/usr_identity/name.txt").strip.to_s
|
|
464
467
|
request_type = File.read("data/rikusuto/request.txt").strip.to_s
|
|
465
468
|
item = File.read("data/atemu/items.txt").strip.to_s
|
|
@@ -467,14 +470,14 @@ end"
|
|
|
467
470
|
local_name = File.read("data/usr_identity/local_name.txt").strip.to_s
|
|
468
471
|
|
|
469
472
|
# Create XML tags
|
|
470
|
-
salut = "
|
|
471
|
-
ejento = "
|
|
472
|
-
rikusuto = "
|
|
473
|
-
atemu = "
|
|
474
|
-
nitote = "
|
|
475
|
-
kara = "
|
|
476
|
-
yuza = "
|
|
477
|
-
lieu = "
|
|
473
|
+
salut = "Ehiyo"
|
|
474
|
+
ejento = "#{agent_name}!"
|
|
475
|
+
rikusuto = "#{request_type}"
|
|
476
|
+
atemu = "#{item}"
|
|
477
|
+
nitote = "nitote"
|
|
478
|
+
kara = "kara"
|
|
479
|
+
yuza = "#{user_name}?"
|
|
480
|
+
lieu = "#{local_name}?"
|
|
478
481
|
|
|
479
482
|
conjucate = [nitote, kara]
|
|
480
483
|
consign = conjucate.sample
|
|
@@ -482,16 +485,40 @@ end"
|
|
|
482
485
|
user_location = [yuza, lieu]
|
|
483
486
|
usign = user_location[0]
|
|
484
487
|
|
|
485
|
-
|
|
488
|
+
# Generate description and XML timeline.
|
|
489
|
+
description = "#{salut} #{ejento} #{atemu} #{rikusuto} #{consign} #{usign}"
|
|
490
|
+
|
|
491
|
+
open("documents/#{date_title}.txt", "w") { |f|
|
|
492
|
+
f.puts description
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
new_output = "
|
|
496
|
+
<item>
|
|
497
|
+
<title>#{date}</title>
|
|
498
|
+
<link>http://localhost:8000/documents/#{date_title}.txt</link>
|
|
499
|
+
<description><![CDATA[<p>#{description}</p>]]></description>
|
|
500
|
+
</item>"
|
|
501
|
+
|
|
502
|
+
open("feed/old_feed.txt", "w") { |f|
|
|
503
|
+
f.puts new_output
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
generate_xml = "<?xml version='1.0' encoding='UTF-8' ?>
|
|
507
|
+
<rss version='2.0'>
|
|
486
508
|
|
|
487
|
-
|
|
509
|
+
<channel>
|
|
510
|
+
<title>Personal Blog</title>
|
|
511
|
+
<link>http://localhost:8000/feed.xml</link>
|
|
512
|
+
<description>Local Feed for ImpUnit output.</description>
|
|
488
513
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
514
|
+
#{new_output}
|
|
515
|
+
#{old_output}
|
|
516
|
+
</channel>
|
|
517
|
+
|
|
518
|
+
</rss>"
|
|
519
|
+
|
|
520
|
+
open("feed/feed.xml", "w") { |f|
|
|
521
|
+
f.puts generate_xml
|
|
495
522
|
}
|
|
496
523
|
end
|
|
497
524
|
end
|
|
@@ -555,6 +582,8 @@ end"
|
|
|
555
582
|
f.puts new_value
|
|
556
583
|
}
|
|
557
584
|
|
|
585
|
+
sleep(0.5)
|
|
586
|
+
|
|
558
587
|
ImpUnit::BotWings.reshape
|
|
559
588
|
end
|
|
560
589
|
|
|
@@ -674,30 +703,38 @@ end"
|
|
|
674
703
|
end
|
|
675
704
|
end
|
|
676
705
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
706
|
+
module Bianca
|
|
707
|
+
class SmallTalk
|
|
708
|
+
def self.discuss
|
|
709
|
+
require "programr"
|
|
681
710
|
|
|
682
|
-
|
|
683
|
-
|
|
711
|
+
bot_name = File.read("data/bot_identity/name.txt").strip
|
|
712
|
+
usr_name = File.read("data/usr_identity/name.txt").strip
|
|
684
713
|
|
|
685
|
-
|
|
686
|
-
#end
|
|
714
|
+
brains = Dir.glob("brain/*")
|
|
687
715
|
|
|
688
|
-
|
|
689
|
-
|
|
716
|
+
robot = ProgramR::Facade.new
|
|
717
|
+
robot.learn(brains)
|
|
690
718
|
|
|
691
|
-
|
|
692
|
-
#end
|
|
719
|
+
puts " Welcome to #{bot_name}. This is the terminal for Bianca."
|
|
693
720
|
|
|
694
|
-
|
|
695
|
-
|
|
721
|
+
while true
|
|
722
|
+
print "#{usr_name } >> "
|
|
723
|
+
s = STDIN.gets.chomp
|
|
696
724
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
#
|
|
725
|
+
reaction = robot.get_reaction(s)
|
|
726
|
+
|
|
727
|
+
if reaction == ""
|
|
728
|
+
STDOUT.puts "#{bot_name} << I have no idea."
|
|
729
|
+
elsif reaction == "Closing"
|
|
730
|
+
abort
|
|
731
|
+
else
|
|
732
|
+
STDOUT.puts "#{bot_name} << #{reaction}"
|
|
733
|
+
end
|
|
734
|
+
end
|
|
735
|
+
end
|
|
736
|
+
end
|
|
737
|
+
end
|
|
701
738
|
|
|
702
739
|
## Measuring the distance between objects and size of objects in space.
|
|
703
740
|
#module SpatialRelationships
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ImpUnit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LWFlouisa
|
|
@@ -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://
|
|
59
|
+
homepage: https://github.com/LWFlouisa/ImpUnitApp
|
|
59
60
|
licenses: []
|
|
60
61
|
metadata: {}
|
|
61
62
|
post_install_message:
|