title: extract semi-structured text from Word documents
body: <p>I want to text-mine a set of files based on the below form.  I can create a corpus where each file is a document (using <code>tm</code>), but I'm thinking it might be better to create a corpus where each section in the 2nd form table was a document having the following meta data:</p>
  
  <pre><code>  Author       : John Smith
    DateTimeStamp: 2013-04-18 16:53:31
    Description  : 
    Heading      : Current Focus
    ID           : Smith-John_e.doc Current Focus
    Language     : en_CA
    Origin       : Smith-John_e.doc
    Name         : John Smith
    Title        : Manager
    TeamMembers  : Joe Blow, John Doe
    GroupLeader  : She who must be obeyed 
  </code></pre>
  
  <p>where Name, Title, TeamMembers and GroupLeader are extracted from the first table on the form. In this way, each chunk of text to be analyzed would maintain some of its context.</p>
  
  <p>What is the best way to approach this?  I can think of 2 ways:</p>
  
  <ul>
  <li>somehow parse the corpus I have into child corpora.</li>
  <li>somehow parse the document into subdocuments and make a corpus from those.</li>
  </ul>
  
  <p>Any pointers would be much appreciated.</p>
  
  <p>This is the form:
  <img src="https://i.stack.imgur.com/ojVNs.png" alt="HR form"></p>
  
  <p><a href="https://docs.google.com/file/d/0B1krGGny7BduT2tVeGxCaW5XT2c/edit?usp=sharing" rel="nofollow noreferrer">Here is an RData file</a> of a corpus with 2 documents. exc[[1]] came from a .doc and exc[[2]] came from a docx. They both used the form above.</p>