koremu.rb

Path: koremu.rb
Last Update: Fri May 02 17:17:32 -0500 2008

koremu.rb - Ruby implementation of the Koremutake Memorable Random Strings

SYNOPSIS

  require 'koremu'

  ks = KoremuString.new('KOREMUTAKE')
  puts ks.to_ki              # 10610353957
  puts ks.to_ka.join(',')    # 39,67,52,78,37

  ki = KoremuFixnum.new(1248594)
  puts ki.to_ks              # SUHITU
  puts ki.to_ka .join(',')   # 76,26,82

  ka = KoremuArray.new([50,15,20,13])
  puts ka.to_ks              # MIFOGIFE
  puts ka.to_ki              # 105105933

DESCRIPTION

This module is based in Leon Brocard‘s String::Koremutake Perl module, available at search.cpan.org/dist/String-Koremutake/lib/String/Koremutake.pm which is, in turn, based upon Shorl (shorl.com/koremutake.php). Koremutake is a "way to express any large number as a sequence of syllables", and the general idea is based in Sean B. Palmer‘s "Memorable Random String" term, infomesh.net/2001/07/MeRS/

WHAT IS VALID KOREMUTAKE?

Koremutake consists of 128 valid syllables. They do not, of course, represent all of the valid syllables in any random human language - They are meanly meant to encode integers, not to transform text into strings. If you try to transform regular text, lots of information will be lost in the process

All of the syllables end with a vowel. The valid vowels are A, E, I, O, U and Y. The consonant particles are B, D, F, G, H, J, K, L, M, N, P, R, S, T, V, BR, DR, FR, GR, PR, ST and TR (TR has only TRA and TRE).

Koremutake is represented with uppercase letters (and that‘s what it returns), but will recognize lowercase as well.

AUTHOR

This module was written by Gunnar Wolf <gwolf@gwolf.org>, Instituto de Investigaciones Económicas, UNAM.

Copyright (c) 2008 Gunnar Wolf <gwolf@gwolf.org>

LICENSING INFORMATION

This plugin is under a MIT license. For further information, please check the LICENSE file.

Getting the code

The plugin project‘s home page can be found at rubyforge.org/projects/actsascatalog/

The project‘s Git repository can be anonymously cloned from:

git clone git://rubyforge.org/koremutake.git

Required files

delegate  

[Validate]