Perl module for doing text/document comparisons?

P

Phil

Hi Everyone,

I've been looking for a Perl module that can be used to do document
comparisons. I've done a web search and looked in my perl books, but
can't seem to find the exact animal I'm looking for.

Basically, I'm looking for a Perl module that does the standard
document comparison function found in most word processors. It takes
version 1 of a document and version 2, and does a text scan of the
word/string groups that have been changed, deleted/added. Here's an
example of what I mean:


Version 1 document looks like this:
This is a version 1 document.

Version 2 document looks like this:
Here is a version 2 document. I like it better.

And the output from the Perl module subroutine(s) would like something
like this:
<strike>This</strike><u>Here</u> is a version <strike>1
document.<strike><u>2 document. I like it better.</u>

(Note, if your newsreader doesn't process the HTML codes above, the
<strike></strike> tags indicate the standard line throught the middle
of text marking deleted or changed text, and the <u></u> tags
indicate underline text that has been added from the earlier version
of the document.)

If anyone knows of a Perl module that includes a subroutine that can
compare two documents like the above, I'd greatly appreciate a link or
pointer to it. If an appropriate module could be found, it would be
used for a web-based curriculum project for a community college in
Northern California.

Thanks,
Phil Smith
 
S

Steve Grazzini

Phil said:
Basically, I'm looking for a Perl module that does the standard
document comparison function found in most word processors.

I don't know if there's a module to produce that html, but it would
be pretty easy to whip one up with Algorithm::Diff.
 

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

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top