[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ann] Text

Tim Fletcher

10/10/2006 8:54:00 PM

Actually released a while ago, but hey.

http://rubyforge.org/proj...

gem install text

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

10 Answers

John Carter

10/10/2006 10:35:00 PM

0

Suraj Kurapati

10/11/2006 2:20:00 PM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Fletcher wrote:
> Actually released a while ago, but hey.
>
> http://rubyforge.org/proj...
>
> 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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFLP1EmV9O7RYnKMcRAn4zAJ0Xa6cEY0FQLnCWzohOuJ9CJw2jnwCcDml0
mYFhVp1QCJO599joFTBLBhE=
=xM3W
-----END PGP SIGNATURE-----

Alex Young

10/11/2006 4:20:00 PM

0

Tim Fletcher wrote:
> Actually released a while ago, but hey.
>
> http://rubyforge.org/proj...
>
> 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/PorterStemme...

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

--
Alex

M. Edward (Ed) Borasky

10/12/2006 3:28:00 AM

0

Alex Young wrote:
> Tim Fletcher wrote:
>> Actually released a while ago, but hey.
>>
>> http://rubyforge.org/proj...
>>
>> 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/PorterStemme...
>
> It's public domain code, according to
> http://www.tartarus.org/martin/Port....
>
There is also a Ruby interface to WordNet, although I'm not sure how
current it is.

Tim Fletcher

10/14/2006 4:28:00 PM

0

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/proj...
> >
> > 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/PorterStemme...
>
> It's public domain code, according to
> http://www.tartarus.org/martin/Port....
>
> --
> Alex

Caleb Jones

10/24/2006 4:45:00 PM

0

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-....

Tim Fletcher

10/25/2006 8:34:00 AM

0

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&...

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-....

Paul Battley

10/25/2006 11:20:00 AM

0

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&...

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

http://text.ruby...

It makes for easier browsing there, I think.

Paul.

Trans

10/25/2006 12:00:00 PM

0


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&...
>
> I uploaded the currents docs to the project web space a few days ago.
>
> http://text.ruby...
>
> 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.

Michael Trier

10/25/2006 12:53:00 PM

0

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&...
> >
> > I uploaded the currents docs to the project web space a few days ago.

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

Michael