Find Duplicate Passages

Get help using and writing Nisus Writer Pro macros.
Post Reply
wolane
Posts: 4
Joined: 2011-06-22 16:41:33
Location: Toronto, Canada

Find Duplicate Passages

Post by wolane »

Hi all--

Does anyone have, or know, a Macro which can find duplicate passages? I'm working with a 200-page document in which I've been doing a lot of cutting and pasting, and I'm afraid some paragraphs or sentences might have been pasted more than once, or copy/pasted rather than cut/pasted. I've been finding that Compare Documents macro very useful for merging different versions of chapters, so I wonder if there might also be a way to automate the search for duplications. Any thoughts?

Thanks.

BILL.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Find Duplicate Passages

Post by martin »

Hi Bill- certainly a macro could do such a thing. The question is, what constitutes a duplicate? A sentence that's exactly the same? What about if a few words are arranged differently, or you use a slightly different word choice (eg: "in" instead of "within")? Getting all those details right would take some work.
wolane
Posts: 4
Joined: 2011-06-22 16:41:33
Location: Toronto, Canada

Re: Find Duplicate Passages

Post by wolane »

Well, Martin, I was imagining it would work the same as the document comparison macro... in other words, at the paragraph level or at the sentence level, the structure would have to be identical.

BILL.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Find Duplicate Passages

Post by martin »

This macro might serve your needs. It creates a copy of the frontmost/active document, and marks all duplicates in that copy with special bookmarks. These bookmarks will be listed at the end of the duplicated document.
Attachments
Mark Duplicate Text.nwm
(22.77 KiB) Downloaded 765 times
wolane
Posts: 4
Joined: 2011-06-22 16:41:33
Location: Toronto, Canada

Re: Find Duplicate Passages

Post by wolane »

Wow that’s amazing, Martin, and it totally works. I’m slightly embarrassed to admit, it found two duplicated passages in my 227 page document.
Nisus is a truly great program, especially with those macros!

BILL.
Post Reply