Skip to content

hoffjul/text

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A collection of text algorithms.

require 'text'

font = Text::Figlet::Font.new('big.flf')
figlet = Text::Figlet::Typesetter.new(font)
figlet['Hello World']                         # => '...'

Text::Levenshtein.distance('test', 'test')    # => 0
Text::Levenshtein.distance('test', 'tent')    # => 1

Text::Metaphone.metaphone('BRIAN')            # => 'BRN'
Text::Metaphone.double_metaphone('Coburn')    # => ['KPRN', nil]
Text::Metaphone.double_metaphone('Angier')    # => ['ANJ', 'ANJR']

Text::Soundex.soundex('Knuth')                # => 'K530'

Text::PorterStemming.stem('abatements')       # => 'abat'

Most parts of the library are now compatible including tests. The big exception are the Figlet libraries which allow you to quickly do text-rendering in ASCII. On 1.9, Figlet isn’t loaded and isn’t tested.

Work to integrate in Ruby 1.9 compatibility was done by Hampton Catlin (hcatlin)

Same as Ruby.

About

Collection of text algorithms.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors