[ann] Text

Actually released a while ago, but hey.

    http://rubyforge.org/projects/text/

    gem install text

Soundex, Metaphone, Double Metaphone, Levenshtein, and Figlet
algorithms all under the same roof. Any suggestions for anything to add?

Wow! With a list like that, the only thing left is FWIMNWIS. (Find What
I Mean, Not What I Say)

:-))

Downloaded! Thanks!

John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand

···

On Wed, 11 Oct 2006, Tim Fletcher wrote:

Soundex, Metaphone, Double Metaphone, Levenshtein, and Figlet
algorithms all under the same roof. Any suggestions for anything to add?

Tim Fletcher wrote:

Actually released a while ago, but hey.

    http://rubyforge.org/projects/text/

    gem install text

Soundex, Metaphone, Double Metaphone, Levenshtein, and Figlet
algorithms all under the same roof. Any suggestions for anything to add?

Awesome! Thanks for making this much needed library. This gives
everyone the chance to create simple yet effective interfaces based
solely on text-based input (e.g. Google), instead of laboring over
the same old heavy-weight GUI interfaces.

Tim Fletcher wrote:

Actually released a while ago, but hey.

    http://rubyforge.org/projects/text/

    gem install text

Soundex, Metaphone, Double Metaphone, Levenshtein, and Figlet
algorithms all under the same roof. Any suggestions for anything to add?

Porter stemming is the only standout that I can think of which might be useful in addition... Google says there's one here:

http://www.tartarus.org/martin/PorterStemmer/ruby.txt

It's public domain code, according to http://www.tartarus.org/martin/PorterStemmer/\.

···

--
Alex

Alex Young wrote:

Tim Fletcher wrote:

Actually released a while ago, but hey.

    http://rubyforge.org/projects/text/

    gem install text

Soundex, Metaphone, Double Metaphone, Levenshtein, and Figlet
algorithms all under the same roof. Any suggestions for anything to add?

Porter stemming is the only standout that I can think of which might be
useful in addition... Google says there's one here:

http://www.tartarus.org/martin/PorterStemmer/ruby.txt

It's public domain code, according to
http://www.tartarus.org/martin/PorterStemmer/\.

There is also a Ruby interface to WordNet, although I'm not sure how
current it is.

Version 1.1.0 now includes the Porter Stemmer. Thanks for the
suggestion Alex!

Alex Young wrote:

···

Tim Fletcher wrote:
> Actually released a while ago, but hey.
>
> http://rubyforge.org/projects/text/
>
> gem install text
>
> Soundex, Metaphone, Double Metaphone, Levenshtein, and Figlet
> algorithms all under the same roof. Any suggestions for anything to add?

Porter stemming is the only standout that I can think of which might be
useful in addition... Google says there's one here:

http://www.tartarus.org/martin/PorterStemmer/ruby.txt

It's public domain code, according to
http://www.tartarus.org/martin/PorterStemmer/\.

--
Alex

Tim Fletcher wrote:

Version 1.1.0 now includes the Porter Stemmer. Thanks for the
suggestion Alex!

Sorry for the dumb question, but I couldn't find ANY documentation in
the Text gem directories so I'll ask here. How do you include and use
this libarary? I think that "require_gem 'Text'" works but how do I
then use it? When I try:

Text::Levenshtein(str1, str2)

or

Text.Levenshtein(str1, str2)

...I get a "undefined method `Levenshtein' for Text:Module"

Thanks for the help.

···

--
Posted via http://www.ruby-forum.com/\.

Not a dumb question, seeing as the documentation isn't actually
included in the gem. I'll fix that in the next release. For
Levenshtein, the following should work:

    require 'rubygems'
    require 'text'
    Text::Levenshtein.distance(a, b)

You can also view the main README here:
http://rubyforge.org/cgi-bin/viewvc.cgi/README.rdoc?revision=11&root=text

Hope that helps!

Caleb Jones wrote:

···

Tim Fletcher wrote:
> Version 1.1.0 now includes the Porter Stemmer. Thanks for the
> suggestion Alex!

Sorry for the dumb question, but I couldn't find ANY documentation in
the Text gem directories so I'll ask here. How do you include and use
this libarary? I think that "require_gem 'Text'" works but how do I
then use it? When I try:

Text::Levenshtein(str1, str2)

or

Text.Levenshtein(str1, str2)

..I get a "undefined method `Levenshtein' for Text:Module"

Thanks for the help.

--
Posted via http://www.ruby-forum.com/\.

I uploaded the currents docs to the project web space a few days ago.

http://text.rubyforge.org/

It makes for easier browsing there, I think.

Paul.

···

On 25/10/06, Tim Fletcher <twoggle@gmail.com> wrote:

You can also view the main README here:
http://rubyforge.org/cgi-bin/viewvc.cgi/README.rdoc?revision=11&root=text

Paul Battley wrote:

> You can also view the main README here:
> http://rubyforge.org/cgi-bin/viewvc.cgi/README.rdoc?revision=11&root=text

I uploaded the currents docs to the project web space a few days ago.

http://text.rubyforge.org/

It makes for easier browsing there, I think.

Also, a mixin for String that provided method interfaces to all these
would be cool. Eg.

module TextMix
  def double_metaphone
    Text::Metaphone.double_metaphone(self)
  end
  ...
end

class String
  include TextMix
end

And while not exactly in the same category, it might be close enough --
maybe add Dresner which is simply:

  str.gsub(/\B\w+\B/){$&.split(//).sort_by{rand}}

T.

···

On 25/10/06, Tim Fletcher <twoggle@gmail.com> wrote:

Very cool. Thanks. I had a couple of these in separate libraries.
This is nice.

Michael

···

On 10/25/06, Trans <transfire@gmail.com> wrote:

Paul Battley wrote:
> On 25/10/06, Tim Fletcher <twoggle@gmail.com> wrote:
> > You can also view the main README here:
> > http://rubyforge.org/cgi-bin/viewvc.cgi/README.rdoc?revision=11&root=text
>
> I uploaded the currents docs to the project web space a few days ago.