Skip to content

fjt/anagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

an anagram generating code by order of easiness of speech.

use like this

irb(main):336:0> "birds".anagram(wordlist)
["bidrs", "brdis", "drbis", "bisrd", 
-- snip --
sbdri", "sbdir", "irsbd"]

you should initialize 2gram occurrence table by giving
words list as an argument of this method you use it for the first time.
the list should be given as an array of words.

after the initialization, you dont have to give wordlist
just do

 "somthing".anagram

you can alternate the occurrence table anytime you want by giving
other word list.

Sample data sets for English and Latin word lists are included
as Ruby array data (Marshal.load to use them like this)

"words".anagram(Marshal.load(File.open("anglicus/bt.wl").read)

About

generate anagrams by order of easiness of speaking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages