Ruby port of Nilsimsa?

M

Martin Pirker

Hi...

The Nilsimsa algorithmen is a digest technique for determining the
similarity of text messages (e.g. spam detection...)
Calling out to the standalone program is not very efficient, but
CPAN seemingly contains a modified version with only xx lines C
for Perl interfacing.

Any "bored" Ruby guru out there who can take a look how much
effort a port from Perl to Ruby interfaces would take?

I lack the knowledge of Ruby<-->C .... :-/

Thanks!
Martin
 
L

Lyndon Samson

Hi...

The Nilsimsa algorithmen is a digest technique for determining the
similarity of text messages (e.g. spam detection...)
Calling out to the standalone program is not very efficient, but
CPAN seemingly contains a modified version with only xx lines C
for Perl interfacing.

Any "bored" Ruby guru out there who can take a look how much
effort a port from Perl to Ruby interfaces would take?

I lack the knowledge of Ruby<-->C .... :-/

Is this your homework young Martin :) Maybe you should post it to rentacoder.
 
M

Martin Pirker

Lyndon Samson said:
Is this your homework young Martin :) Maybe you should post it to rentacoder.

What is "young"? What is "homework"?

To be more clear, what I want to know is:

Is it enough to write a working interface module/definition/whatever,
or is it known that C modules which run fine with Perl need additional
work because e.g. Rubys runtime GC requires tagging of all memory
allocations or similar reworking of the C side.

In the first case I may be able to guess it myself (guessing from other
Ruby lib module examples), in the later case I won't even try, that
learning step is too steep for first time.


Martin
 
M

Martin Pirker

Martin Pirker said:

In the middle of the night Steve Lewis kindly donated interfaces
to the original C core - Thank you!

You now have the option of running pure Ruby (300 times slower than C),
or if you compile the native extension it runs about C speed.

Both cores produce results matching the standalone C version (here
on Linux x86..), so I guess it's bugfree now :)

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,170
Messages
2,570,925
Members
47,468
Latest member
Fannie44U3

Latest Threads

Top