I'm an ex-IT person who has recently switched to copyediting STM books for a living. I would like to use Perl to automate the more mechanical aspects of my work. The manuscript files come in MS Word format, and I want to generate a report that will extract all hyphenated terms, capitalized phrases, acronyms (expanded and unexpanded), etc.

Conflicting terms (e.g., the same term could be uppercase in one chapter and lowercase in another) would also be identified in the report. Also, the utility should be able to flag all the terms in the manuscript file that appear in another text file containing keywords input by me. One of the tasks of the copyeditor is to make sure the book is consistent in the way terms appear in different chapters.

I'm hoping to write a utility program in Perl that will generate such a report and help me make the manuscript consistent. A few questions:

  1. I'm assuming Perl is the right tool for such a utility. Stupid question, still would appreciate confirmation from an expert.

  2. Do any readymade libraries exist for such tasks? I'd prefer to write the code myself because I could tweak it to suit my private perversions; still, it would be nice to know.

  3. Can I search MS Word files directly using Perl or do I need to save the Word file as a text file? If I could work directly with the Word file, the added functionality of searching headers, tables, etc., would be a great plus.

In passing, is the MS Word format a state secret?

My Perl level, you ask? Tyro, sir, tyro. Just downloaded ActiveState 5.8, have bookmarked an online book, have a Perl primer in my drawer, and am looking forward to having fun. I'm just rarin' to go. I have done a fair amount of programming in the past and am not afraid of writing code.

Thanks in advance!

Wordsmith

Janitored by Arunbear - added <p> tags for readability


In reply to A copyeditor needs help to get started with a Perl project by wordsmith

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.