comparing two documents in a quantifiable way

E

ent

Hi all


I need to compare two Word documents using some Word feature, tool,
plugin or separate utility that tells me *how much* two documents differ
one from the other.

Example:

The text in document A is 25% different from the text in document B.



Does such tool exist?


thanks
 
S

Stefan Blom

As far as I know, what you are trying to do isn't possible in Word.

What Word can do is compare documents and create a combined version with
Track Changes.
 
E

ent

Stefan said:
As far as I know, what you are trying to do isn't possible in Word.

What Word can do is compare documents and create a combined version with
Track Changes.


Is there a way to know how many words are changed between two similar
documents? Something like "X words were changed between docA and docB" ?

thanks
 
Y

Yves Dhondt

How would you describe the change of words?

"I'm considered a good cook."
vs
"I want to cook something good."

'good' and 'cook' appear in both sentences, yet their meaning is totally
different ('cook' appears as a noun and as a verb for example).

If you consider those words the same in the above sentences, you could write
a macro which just keeps track of each word in your document and the number
of times it occurs. Given that list, you could then count the number of
times each word occurs in the other document and see how much change there
is. But if you ask me, the resulting value wouldn't be expressing anything
useful.

Yves
 
E

ent

Yves said:
How would you describe the change of words?

"I'm considered a good cook."
vs
"I want to cook something good."

'good' and 'cook' appear in both sentences, yet their meaning is totally
different ('cook' appears as a noun and as a verb for example).

If you consider those words the same in the above sentences, you could
write a macro which just keeps track of each word in your document and
the number of times it occurs. Given that list, you could then count the
number of times each word occurs in the other document and see how much
change there is. But if you ask me, the resulting value wouldn't be
expressing anything useful.

Yves


I agree with you, but in my case semantics is not a concern.

I have a very simple need.

I am dealing with very formalised and repetitive documents and all I
need is just something that does this:

Given the capability that Word 2007 already has, of comparing two
documents an show what lines/words are different in the two docs, I need
to simply be able to *count* how many words are different in the second
documents.

Can I do that, perhaps selecting somehow the "different" word in the
second doc and the counting them?


How can I select or capture the words that are different?

thanks
 
E

ent

Yves said:
How would you describe the change of words?

"I'm considered a good cook."
vs


In other words my procedure would be like this:


1) compare docB against docA
and
2) put different words, i.e. different lines, into docC

3) count words in docC.


Is there a way to do 2), i.e. create a document that contains only what
Words considers as *changed* in docb in respect to docA?

Thanks
 
D

Doug Robbins - Word MVP

Run the following macro on the document created by comparing the two
documents

MsgBox ActiveDocument.Revisions.Count


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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

Top