Introducing the
Sequencers Database
,
now available for members usage on our secure Sequencers site.
The Lexigram (and other sequence generators) name represents a defined method of processing
a textual entry in a very unique way. For the first
time ever, you can generate the Lexigram Sequence.
This page is not a Lexigram primer. This link,
Lexigram Primer, is.
--- file name is /lexigram.rb ---
#!/usr/bin/env ruby -w
module Lexigram
require 'textual' << this code is not provided herein
require 'histogram' << this code is not provided herein
### lexigram_sequencer(sequencetext) << this method generates the sequence_lexigram from any sequencetext entered
def lexigram_sequencer(sequencetext)
@sequencetext = sequencetext
@characterscount = @sequencetext.to_textual.split(//).length
@letters = @sequencetext.to_textual.to_s.de_comma.de_space.split(//).length
wordscountbase = @sequencetext.to_textual.split(/\W/).length
@wordscounter = wordscountbase
@lexigram_sequence = ""
@lexigram_letters_array = Array.new
@lexigram_hash_holder = Hash.new{0}
@lexigram_hash1 = Hash.new{0}
@lexigram_hash2 = Hash.new{0}
@keys_values1 = Hash.new{0}
@keys_values2 = Hash.new{0}
@words1 = ""
@words2 = ""
@words3 = ""
sentence = @sequencetext.to_textual.de_comma.strip
@words = sentence.split(/\W/)
if @wordscounter == 1
@word1 = @words.shift
@wordscounter -= 1
@keys_values1 = @word1.split(//).to_histogram
@lexigram_letters_array = @keys_values1.collect do | k, v | "#{k}" * v end
@lexigram_letters = @lexigram_letters_array.join
@lexigram_sequence = @lexigram_letters.split(//).sort.join
return @lexigram_sequence
end
if @wordscounter == 2
@word1 = @words.shift
@wordscounter -= 1
@keys_values1 = @word1.split(//).to_histogram
@lexigram_array = @keys_values1.collect do | k, v | "#{k}" * v end
@lexigram_letters = @lexigram_array.join
@lexigram_sequence = @lexigram_letters.split(//).sort.join
@word2 = @words.shift
@wordscounter -= 1
@keys_values2 = @word2.split(//).to_histogram
@lexigram_hash1 = @keys_values1.merge(@keys_values2) do | key, first, second | (first > second)? first : second end unless nil
@lexigram_array = @lexigram_hash1.collect do | k, v | "#{k}" * v end.sort
@lexigram_sequence = @lexigram_array.split(//).sort.join
return @lexigram_sequence
end
if @wordscounter >= 3
while @wordscounter >= 0
@word1 = @words.shift
@wordscounter -= 1
@lexigram_hash1 = @word1.split(//).to_histogram unless nil
@word2 = @words.shift
@wordscounter -= 1
@lexigram_hash2 = @word2.split(//).to_histogram unless nil
@keys_values1 = @lexigram_hash1.merge(@lexigram_hash2) do | key, first, second | (first > second)? first : second end unless nil
@keys_values1
@lexigram_hash_holder1 = @keys_values1
@lexigram_sequence = @lexigram_hash_holder1.collect do | k, v | "#{k}" * v end.sort.join
loop do
@word3 = nil
@word3 = @words.shift unless nil
if @word3 == nil
return @lexigram_sequence
break if @wordcounter == 0
else
@lexigram_sequence = nil
@wordscounter -= 1
@lexigram_hash2 = @word3.split(//).to_histogram unless nil
@keys_values2 = @lexigram_hash_holder1.merge(@lexigram_hash2) do |key, first, second| (first > second)? first : second end unless nil
@lexigram_hash_holder2 = @keys_values2 unless nil
@lexigram_hash_holder1 = @keys_values2 unless nil
@lexigram_letters_array = @lexigram_hash_holder2.collect do | k, v | "#{k}" * v end.sort
@lexigram_sequence = @lexigram_hash_holder2.collect do | k, v | "#{k}" * v end.sort.join
end
end
end
end
end
--- end of file -----------------------------------------------------------------------------------------------------------------------------------
The following are results of running this code in the console :
=== in the console ================================================
Last login: Sun Aug 28 17:33:59 on ttys001 will-i-am:~ William$ cd ./desideratus/apotomoing_sequencers will-i-am:apotomoing_sequencers William$ rails c -s Loading development environment in sandbox (Rails 3.0.9) Any modifications you make will be rolled back on exit ruby-1.9.2-p0 :001 > require "./lib/textual-fibering-methods.rb" => nil ruby-1.9.2-p0 :002 > sequencetext = "we now have the Lexigram Sequence Generator available to our members" => "we now have the lexigram sequence generator as of 2011-08-28" ruby-1.9.2-p0 :003 > new = sequencetext.to_textual => "we now have the lexigram sequence generator as of twenty eleven eight twenty eight" ruby-1.9.2-p0 :004 > lexigram_sequencer(sequencetext) => "aceeefghilmnoqrrsttuvwxy" ruby-1.9.2-p0 :005 > sequencetext = "Good Works On Earth" => "Good Works On Earth" ruby-1.9.2-p0 :006 > lexigram_sequencer(sequencetext) => "adeghknoorstw" ruby-1.9.2-p0 :007 > sequencetext = "Good Works On Earth, Home of the Lexigram Sequencer" => "Good Works On Earth, Home of the Lexigram Sequencer" ruby-1.9.2-p0 :008 > lexigram_sequencer(sequencetext) => "acdeeefghiklmnooqrstuwx" ruby-1.9.2-p0 :009 > sequencetext = "happiness" => "happiness" ruby-1.9.2-p0 :010 > lexigram_sequencer(sequencetext) => "aehinppss"===============================================================
Introducing the free
Letterings Sequence Generator
.
This generator provides various sequencings on any text entry you give it.
This generator provides no memory of your data, nor relationship to any other sequence.
It is old code from the 1990's, and it some browsers reverse the sequences generated.
It is free, it is safe to play with, and we will get around to fixing it after we upgrade this site.