PC Review


Reply
Thread Tools Rate Thread

Compare two strings, show differences

 
 
=?Utf-8?B?TmF0aGFuIFJvc2FhZW4=?=
Guest
Posts: n/a
 
      3rd Aug 2004
I want to be able to easily see what changes were made from original
to updated sentences (words added/removed/changed). I'm not too concerned about speed, just looking for something. The compared text will be anywhere from a word or two to multiple paragraphs.

An example:

Original sentence:
The brown dog ran outside at night. During the day, the brown dog slept.

Updated sentence:
The big brown dog ran outside when dark. During the day, it slept.


Ideally, the solution would display the differences in the browser, but I'm open to other ideas (creating txt documents out of the strings and comparing them with Word... but that's a question for another discussion area, purchase something third party, etc.).

Most of what I've found shows which line of text was modified. I'm looking for word differences.

Thank you,
Nathan Rosaaen




 
Reply With Quote
 
 
 
 
Igor Green
Guest
Posts: n/a
 
      4th Aug 2004
Nathan,
If you need third party tool, check my Compare It! from
http://www.grigsoft.com/.

If you want to implement it yourself, search for LCS (Longest Common
Subsequence) realization. It will find difference between 2 strings on
char level. If you need word level only, just hash words, your text
will become set of hashes. Same algorithm will compare results and get
you word differences.

If you will have more questions on topic, feel free to contact me
through site's form.

Regards,

Igor Green
http://www.grigsoft.com
Compare It! + Synchronize It! : Files and folders comparison never was
easier!
 
Reply With Quote
 
Jim Douglas
Guest
Posts: n/a
 
      4th Aug 2004
BeyondCompare

"Nathan Rosaaen" <(E-Mail Removed)> wrote in message
news:6598E765-DD0A-4C2F-A9A9-(E-Mail Removed)...
> I want to be able to easily see what changes were made from original
> to updated sentences (words added/removed/changed). I'm not too concerned

about speed, just looking for something. The compared text will be anywhere
from a word or two to multiple paragraphs.
>
> An example:
>
> Original sentence:
> The brown dog ran outside at night. During the day, the brown dog slept.
>
> Updated sentence:
> The big brown dog ran outside when dark. During the day, it slept.
>
>
> Ideally, the solution would display the differences in the browser, but

I'm open to other ideas (creating txt documents out of the strings and
comparing them with Word... but that's a question for another discussion
area, purchase something third party, etc.).
>
> Most of what I've found shows which line of text was modified. I'm

looking for word differences.
>
> Thank you,
> Nathan Rosaaen
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare 2 columns and show differences... adambuller@gmail.com Microsoft Access Queries 2 14th Aug 2006 04:14 AM
How do I compare 2 text columns & show differences in 3rd? =?Utf-8?B?S2VsbGkgRnJlZW1hbg==?= Microsoft Excel Worksheet Functions 2 29th Dec 2005 12:42 AM
How to show only differences after compare Al Microsoft Word Document Management 2 4th May 2005 03:28 PM
is there a tool that compare 2 vs.net projects and show the differences in code ? John Timney \(ASP.NET MVP\) Microsoft Dot NET 4 9th Apr 2005 06:30 PM
Compare two strings: Get all positions of differences Sasidhar Parvatham Microsoft C# .NET 4 11th Mar 2005 10:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:42 PM.