bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Tools > Word Count > Ignoring Hyphens in Word Counts

Ignoring Hyphens in Word Counts

Summary: When you do a word count, Word treats hyphenated phrases as a single word. If you prefer a word count that treats hyphenated phrases as multiple words, then you need to perform a few steps to get the desired result. This tip explains why it makes sense to treat hyphenated phrases as single words, and then shows how you can bypass this common-sense approach. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)

Jayson asked if there was a way to make sure that Word ignored hyphens used in compound words when doing word counts. For instance, he wants Word to count "real-time video" as three words, rather than two. There is no native way to do this in Word. The reason is quite simple--the generally accepted rule is that a compound word is always treated as a single word. For instance, the compound adjective "real-time" is a different word than "real time."

There are three kinds of compound words--the closed form ("firefly"), hyphenated form ("daughter-in-law"), and open form ("post office"). Compound words are often hyphenated to remove ambiguity (i.e., an "old-furniture salesman" clearly deals in old furniture, but an "old furniture salesman" could be an old man. In most contexts you wouldn't have the same problem understanding "used car salesman").

Using the example "real-time video," the word count for that phrase should equal two, since "real-time" becomes one word by virtue of the hyphenation. In the sentence, "Talk to your father-in-law," the count should be four words, since "father-in-law" is treated as one word. Counting "father-in-law" as three words would be blatantly incorrect, since you're referring to one person. So, once compound words are closed or hyphenated they are counted as one word. If the compound word is open, e.g., "post office," it is counted as two words.

If you have a particular need to treat compound words as individual words, then the easiest way to do it is to search for the hyphens used to create the compound words and replace them with something that won't affect the word count. When the word count is completed, you can change that "something" back into hyphens. Follow these general steps:

  1. Press Ctrl+H or choose Replace from the Edit menu. Word displays the Replace tab of the Find and Replace dialog box.
  2. Click on the More button, if it is available. (Click here to see a related figure.)
  3. Make sure the Use Wildcards check box is selected.
  4. In the Find What box, enter the following:
       ([A-z]{2,})-([A-z]{2,})
  • In the Replace With box, enter the following. (Note that there is a space after the one and before the second \.)
  •        \1 \2
    
    1. Click on Replace All.
    2. Close the Find and Replace dialog box.
    3. Choose Word Count from the Tools menu. Word displays the count of words in your document.
    4. Press Ctrl+Z. Word undoes the find and replace operation that you did, and your document is back to normal.

    This particular sequence of steps will replace with a space any hyphen that is surrounded on each side by two or more letters. Thus, "real-time" would be replaced with "real time," but the dash in "A-7" would not be replaced.

    There is something to realize when adjusting word counts using a method such as this. While it may make sense (to some) to count "real-time video" as three words instead of two, most people would agree that "pre-arranged meeting" should always be counted as two and never as three. In other words, the context in which a hyphen is used can affect whether we treat the words connected by that hyphen as a single compound word or two individual words. Any search-and-replace process, such as that described above, looks solely at the placement of hyphens, not at their context. Thus, the word count derived by the above process would count "pre-arranged meeting" as three words.

    For this very reason, most people accept the idea that compound words are treated as a single word in any word count.

    Tip #1706 applies to Microsoft Word versions: 97 | 2000 | 2002 | 2003


    Save Time! WordTips has been published weekly since early 1997. Past issues are available in convenient WordTips archives. Have your own enhanced archive of WordTips at your fingertips, available to use at any time!
     
    Check out WordTips Archives today!

    Helpful Links

    Ask a Word Question
    Make a Comment

    Tips.Net Home
    Tips.Net Store

    WordTips FAQ
    WordTips Premium

    Learn Access Now

    Beauty Tips
    Bugs and Pests Tips
    Car Tips
    Cleaning Tips
    College Tips
    Cooking Tips
    Excel2007 Tips
    ExcelTips
    Family Tips
    Gardening Tips
    Health Tips
    Home Tips
    Money Tips
    Organizing Tips
    Pet Tips
    Word2007 Tips
    WordTips

    Advertise on the
    WordTips Site

     

    Great Info!

    Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
         
    (Your e-mail address will never be shared with anyone, ever.)