Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a piece of software that will do keyword analysis on a batch of Microsoft Word files? In other words, I would simply like a word count on all words used. The objective is to identify keywords as the basis for creating a taxonomy.

share|improve this question
    
This is very open-ended: What type of analysis did you want? –  Clare Macrae Oct 11 '11 at 18:17
    
updated question to be more specific. –  mmcglynn Oct 11 '11 at 18:24

2 Answers 2

I use a Python script that uses the docx.py module (see here) to read Word files and process the individual words for a related task. The key bits are in the following code (which only reads one .docx file given as the first command line argument, but could easily be expanded to count words in many files:

from docx import *
import sys

try:
    document = opendocx(sys.argv[1])
except:
    print('Could not open '+sys.argv[1])
    exit()

## Fetch all the text out of the document       
paratextlist = getdocumenttext(document)    

count = {}
for line in paratextlist:
    for word in line.rstrip().split():
        count{word} = count.get(word,0) + 1
share|improve this answer

How about WordStat ?

share|improve this answer
    
Exactly right. Quite pricey though at ~$3000. –  mmcglynn Oct 11 '11 at 20:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.