Results 1 to 5 of 5
Thread: Subtractive Text Comparison?
Jun 26, 2007, 07:26 #1
Subtractive Text Comparison?
We have a database full of articles, and each article can have multiple versions. There is one "source" version (the full version of the article), and all other versions have some of the text cut out. This is the ONLY change in any of the other versions: nothing is ever added or moved around, just removed.
We'd like a tool that allows us to look at these altered versions of the text and allow us to see how they've changed from the original. An example of how the tool might work (just an interface example, so you get the idea if my explanation was unclear): You pick an article, then pick a version of the article. The text appears normally, but any text that's in the original and NOT in the currently chosen version appears with a red background, so it's clear that those pieces of text have been removed from the currently chosen version.
Since the only changes that can be made are subtractive, I don't see this as being too difficult a project. However, I was wondering if there's anything that's already available that either provides this functionality, or can assist in providing it?
Right now, I'm planning on just using strcmp() to go through each bit of text until it comes across parts that don't match, and then start marking those parts as changed until they start matching again. Let me know if there's anything that can assist with this please.jakeboxer.com (my portfolio)