README.rdoc in text-0.2.0 vs README.rdoc in text-1.0.0

- old
+ new

@@ -1,36 +1,55 @@ = Text A collection of text algorithms. -= Usage +== Usage require 'text' - font = Text::Figlet::Font.new('big.flf') - figlet = Text::Figlet::Typesetter.new(font) - figlet['Hello World'] # => '...' +=== Levenshtein distance - Text::Levenshtein.distance('test', 'test') # => 0 - Text::Levenshtein.distance('test', 'tent') # => 1 + 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'] +=== Metaphone - Text::Soundex.soundex('Knuth') # => 'K530' + Text::Metaphone.metaphone('BRIAN') + # => 'BRN' - Text::PorterStemming.stem('abatements') # => 'abat' + Text::Metaphone.double_metaphone('Coburn') + # => ['KPRN', nil] + Text::Metaphone.double_metaphone('Angier') + # => ['ANJ', 'ANJR'] -= Ruby 1.9 Compatibility +=== Soundex -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. + Text::Soundex.soundex('Knuth') + # => 'K530' -Work to integrate in Ruby 1.9 compatibility was done by -Hampton Catlin (hcatlin) +=== Porter stemming -= License + Text::PorterStemming.stem('abatements') # => 'abat' + +=== White similarity + + white = Text::WhiteSimilarity.new + white.similarity('Healed', 'Sealed') # 0.8 + white.similarity('Healed', 'Help') # 0.25 + +Note that some intermediate information is cached on the instance to improve +performance. + +== Ruby version compatibility + +The library has been tested on Ruby 1.8.6 to 1.9.3 and on JRuby. + +== Thanks + +* Hampton Catlin (hcatlin) for Ruby 1.9 compatibility work +* Wilker LĂșcio for the initial implementation of the White algorithm + +== License Same as Ruby.