[QUIZ] NDiff (#46)

J

Jim Freeze

Uhm, where are the solutions?

I usually see solutions posted on Sunday.
Here it is Mon afternoon, and I have not seen
any quiz traffic. Is my email playing tricks on me?

--=20
Jim Freeze
 
J

James Edward Gray II

Uhm, where are the solutions?

I usually see solutions posted on Sunday.
Here it is Mon afternoon, and I have not seen
any quiz traffic. Is my email playing tricks on me?

Only if my email is broken too. Haven't had time to fiddle with it
myself yet, but it looks like I better find some... ;)

James Edward Gray II
 
B

Bil Kleb

James said:
Only if my email is broken too. Haven't had time to fiddle with it
myself yet, but it looks like I better find some... ;)

Sigh, maybe it's just my lame quiz writing skills...

Later,
 
B

Brian Schröder

=20
Sigh, maybe it's just my lame quiz writing skills...
=20
Later,
--
Bil
http://fun3d.larc.nasa.gov
=20
Note: posted via newsgroup.
=20
=20

I really want to do this quiz as it looks quite interesting, but I'm
totally swamped with work. I won't have time to do it until next
weekend. But at least some thoughts here:

I would like to write a fdiff i.e. fuzzy-diff. That would behave as follows=
:

1. Specify fuzzycompare fields with regular expressions.
2. When comparing a row first extract the fuzzyfields from the row,
compare both rows and call a user-specified compare function on the
fuzzyfields.

That would allow for a more general compare approach. I.e.

number-diff:

fuzzyfields =3D /number-regexp/
compare =3D proc do | n1, n2| (n1.to_f - n2.to_f).abs < EPSILON end

space-diff:

fuzzyfields =3D /\s+/
compare =3D proc do true end

dist-diff

fuzzyfields =3D /\A.*\Z/
compare =3D proc do | s1, s2 | edit_distance(s1, s2) < 2 end

etc...

regards,

Brian

--=20
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/
 

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
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top