HeritageNoMetairo 0.1.0 → 0.1.5

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: 6fb12158a200e917a5d99035bdf31235e76aa340eafea2572ad6915bc870c8fe
4
- data.tar.gz: 1cd137aa574507ddeb9d96065f4ad6827dd981b26f2310b6a46c92ee755b4d3e
3
+ metadata.gz: 33075c7b463e058f176fa42bcaed80c1be0b72287fea7f71cf60d532fbe961ae
4
+ data.tar.gz: e4afab0ede71a7a0e8619d1cbdefff118b878eaa52518ff4a8fc0ab62708d2e3
5
5
  SHA512:
6
- metadata.gz: 2c98559324bff2be73a5bfe180e6d0128e53074510b25f451082e7acf705fee4be5c86745797a972b2d37002647c8431d5cc1fe8f15a212cbd0cd8dba6aed799
7
- data.tar.gz: 61b08b5875436b87596aa8898dbf2102ae724bd5221600ab41a487a446119aab09b44563627fa9f7926fd3e1894afeebbadc455c2370622d5a5de49d45ec6911
6
+ metadata.gz: 611b7551cab4fb3d6f39abe933f6d004dc509a3282e57fb257c58e77f53a0c68c2eea3e6a4f498b8c39b3b34c691e54dece39cec49029858cb277583c8d0fd05
7
+ data.tar.gz: 142db33578cbafd1b67a62afebb124aced7f341de0b5d249522ebc04d4188feb4ed98ce6daf40d8b2c11e0e1b7736b87f355a8ca5446e54ffb74a563987c6c17
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HeritageNoMetairo
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -5,6 +5,11 @@ require_relative "HeritageNoMetairo/version"
5
5
  module HeritageNoMetairo
6
6
  class Error < StandardError; end # HeritageNoMetairo
7
7
 
8
+ class MaltCounter
9
+ def self.wall_splash
10
+ end
11
+ end
12
+
8
13
  class Analyze
9
14
  ###############################################################################################
10
15
  # Colors In Context #
@@ -399,7 +404,7 @@ module HeritageNoMetairo
399
404
  index = 0
400
405
 
401
406
  size_limit.times do
402
- ColorScience::Analyze.colors_in_context
407
+ HeritageNoMetairo::Analyze.colors_in_context
403
408
 
404
409
  classification = color_science.classify(*new_colors[index])
405
410
 
@@ -414,9 +419,7 @@ module HeritageNoMetairo
414
419
 
415
420
  print "Is '#{new_colors[index].strip}' #{@label}? #{@probability_yes} / #{@probability_no} "
416
421
 
417
- ColorScience::Analyze.suggest_next_color
418
-
419
- #@new_calculation = @new_calculation + @probability_no
422
+ HeritageNoMetairo::Analyze.suggest_next_color
420
423
  end
421
424
  end
422
425
 
@@ -428,7 +431,6 @@ module HeritageNoMetairo
428
431
  ###############################################################################################
429
432
  def self.suggest_next_color
430
433
  require "decisiontree"
431
- require "digest"
432
434
 
433
435
  attributes = ["Identifier"],
434
436
  ["Name"],
@@ -468,8 +470,7 @@ module HeritageNoMetairo
468
470
  dec_tree = DecisionTree::ID3Tree.new(attributes[0], training[0], 1, :continuous),
469
471
  DecisionTree::ID3Tree.new(attributes[1], training[1], 1, :continuous),
470
472
  DecisionTree::ID3Tree.new(attributes[2], training[2], 1, :continuous),
471
- DecisionTree::ID3Tree.new(attributes[3], training[3], 1, :continuous),
472
- DecisionTree::ID3Tree.new(attributes[4], training[4], 1, :continuous)
473
+ DecisionTree::ID3Tree.new(attributes[3], training[3], 1, :continuous)
473
474
 
474
475
  current_dectree1 = dec_tree[0]
475
476
  current_dectree1.train
@@ -493,88 +494,20 @@ module HeritageNoMetairo
493
494
  decision3 = current_dectree3.predict(hex_code)
494
495
  decision4 = current_dectree4.predict(invent_name)
495
496
 
496
-
497
- md5 = Digest::MD5.new
498
- new_mixture = md5.update "['#{decision1}', '#{decision2}', '#{decision3}', '#{decision4}']"
499
-
500
497
  puts " > ['#{decision1}', '#{decision2}', '#{decision3}', '#{decision4}']"
501
498
 
502
499
  File.open("data/colors/suggestions/suggest_colors.txt", "a") { |f|
503
- f.puts "[:#{decision1}, '#{decision2}', '#{decision3}', '#{decision4}'] #{new_mixture}"
500
+ f.puts "[:#{decision1}, '#{decision2}', '#{decision3}', '#{decision4}']"
504
501
  }
505
502
 
506
- File.open("data/atomspace/colors.metta", "a") { |f|
503
+ File.open("data/atomspace/colors.msa", "a") { |f|
507
504
  f.puts "!((#{decision1}) (#{decision2}) (#{decision3}) (#{decision4}));"
505
+ f.puts "\n"
508
506
  }
509
507
  end
510
508
 
511
- # def self.authenticate_datapoints
512
- # require "digest"
513
- #
514
- # authentication_pairs = [
515
- # ["[:PH4DR1, 'Salmon', '#FC746B', 'Samon']", "37c854f0133347f815ea4a694f2d04bd"]],
516
- # ["[:PH5DR2, 'Khaki', '#B9B369', 'Khaki']", "40b089a385a3862b118fd38a743e967c"]],
517
- # ["[:PH6DR2, 'Pale Lime', '#B1F468', 'Remonblanc']", "18b07b3750e769ac646902d4ab9b8da4"]],
518
- # ]
519
- #
520
- # ## Genuine tables
521
- # salmon_list = authentication_pairs[0][0]
522
- # khaki_list = authentication_pairs[1][0]
523
- # pale_lime_list = authentication_pairs[2][0]
524
- #
525
- # ## Hashed Tables
526
- # md5 = Digest::MD5.new
527
- #
528
- # salmon_new_hash = md5.update salmon_list
529
- # khaki_new_hash = md5.update khaki_list
530
- # pale_lime_new_hash = md5.update pale_list_list
531
- #
532
- # ## Comparative Hashes
533
- # salmon_hash = authentication_pairs[0][1]
534
- # khaki_hash = authentication_pairs[1][1]
535
- # pale_lime_hash = authentication_pairs[2][1]
536
- #
537
- # if salmon_new_hash == salmon_hash
538
- # puts "This is a valid Salmon datapoint."
539
- # else
540
- # puts "This is a invalid Salmon datapoint."
541
- # end
542
- #
543
- # if khaki_new_hash == khaki_hash
544
- # puts "This is a valid Khaki datapoint."
545
- # else
546
- # puts "This is a invalid Khaki datapoint."
547
- # end
548
- #
549
- # if pale_lime_new_hash == pale_lime_hash
550
- # puts "This is a valid Pale Lime datapoint."
551
- # else
552
- # puts "This is a invalid Pale Lime datapoint."
553
- # end
554
- # end
555
-
556
509
  def self.atomspace
557
- system("metta-py data/atomspace/colors.metta")
558
- end
559
-
560
- def self.gabble_colors
561
- require "gabbler"
562
-
563
- gabbler = Gabbler.new
564
- color_set = File.read("data/colors/suggestions/suggest_colors.txt")
565
- color_set_size = File.readlines("data/colors/suggestions/suggest_colors.txt").size.to_i
566
-
567
- gabbler.learn(color_set) # Make Gabbler learn about Color Set
568
-
569
- #color_set_size.times do
570
- puts gabbler.sentence
571
- #end
572
-
573
- #gabbler.unlearn!
574
-
575
- #gabbler.learn(story.reverse) # Teach Gabbler about semloH kcolrehS.
576
-
577
- #puts gabbler.sentence
510
+ system("metta-py data/atomspace/colors.msa")
578
511
  end
579
512
 
580
513
  ###############################################################################################
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: HeritageNoMetairo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - LWFlouisa