title: Textacy unable to create corpus from a textacy.doc.Doc class
body: <p>I'm just working thought the text tutorials with data outside the datasets module for work. I get some text data from a dataframe and I have this stored as a string variable for work. </p>
  
  <pre><code>def mergeText(df):
      content = ''
      for i in df['textColumn']:
          content += (i + '. ' )
      #print(content)
      return content
  
  
       txt = mergeText(df)
  </code></pre>
  
  <p>I've worked with spacy a little and I know this is the standard way to create a doc object</p>
  
  <pre><code>nlp = spacy.load('en')
  doc1 = nlp(txt)
  print(type(doc1))
  </code></pre>
  
  <p>which outputs</p>
  
  <pre><code>class 'spacy.tokens.doc.Doc
  </code></pre>
  
  <p>So I should be able to generate a corpus from this doc file as the documentation says </p>
  
  <pre><code>corpus = textacy.corpus.Corpus('en', docs=doc1)
  </code></pre>
  
  <p>But I get this error even though I'm passing the correct type to the function</p>
  
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-8-c6f568014162&gt; in &lt;module&gt;()
  ----&gt; 1 corpus = textacy.corpus.Corpus('en', docs=doc1, metadatas=None)
  
  ~/anaconda3/envs/nlp/lib/python3.6/site-packages/textacy/corpus.py in __init__(self, lang, texts, docs, metadatas)
      156             else:
      157                 for doc in docs:
  --&gt; 158                     self.add_doc(doc)
      159 
      160     def __repr__(self):
  
  ~/anaconda3/envs/nlp/lib/python3.6/site-packages/textacy/corpus.py in add_doc(self, doc, metadata)
      337             msg = '`doc` must be {}, not "{}"'.format(
      338                 {Doc, SpacyDoc}, type(doc))
  --&gt; 339             raise ValueError(msg)
      340 
      341     #################
  
  ValueError: `doc` must be {&lt;class 'textacy.doc.Doc'&gt;, &lt;class 'spacy.tokens.doc.Doc'&gt;}, not "&lt;class 'spacy.tokens.token.Token'&gt;"
  </code></pre>
  
  <p>I have tried to create a textacy object in the same way but with no luck</p>
  
  <pre><code>doc = textacy.Doc(txt)
  print(type(doc))
  
  &lt;class 'spacy.tokens.doc.Doc'&gt;
  </code></pre>
  
  <p>I also tried to use the texts paramater for the corpus passing it the raw text but this outputs </p>
  
  <pre><code>corpus[:10]
  
  [Doc(1 tokens; "D"),
   Doc(1 tokens; "e"),
   Doc(1 tokens; "a"),
   Doc(1 tokens; "r"),
   Doc(1 tokens; " "),
   Doc(1 tokens; "C"),
   Doc(1 tokens; "h"),
   Doc(1 tokens; "r"),
   Doc(1 tokens; "i"),
   Doc(1 tokens; "s")]
  </code></pre>
  
  <p>Any ideas on how to fix this ?</p>
  
  <p><strong>EDIT</strong> 
  In order to get docs form many rows and passing this to a corpus here is the data frame I am working with for a thread</p>
  
  <pre><code> chat1 = df[(df['chat_hash']=='121418-456986')]
  </code></pre>
  
  <p>So the text for each text is stored under a 'text' column and each of these could be bound to a speaker if necessary  via a speaker column. </p>
  
  <p>Currently i'm looking at the <a href="http://textacy.readthedocs.io/en/stable/index.html" rel="nofollow noreferrer">capitol words</a> example but it's not entirely clear how to split this using a dataframe. </p>
  
  <pre><code>records = cw.records(speaker_name={'Hillary Clinton', 'Barack Obama'})
  text_stream, metadata_stream = textacy.fileio.split_record_fields(records, 'text')
  corpus = textacy.Corpus('en', texts=text_stream, metadatas=metadata_stream)
  corpus
  </code></pre>
  
  <p>Would it be a case of setting records in this case to be the filter for the chat hash</p>
  
  <pre><code>thread = df[(df['chat_hash']=='121418-456986')]
  text_stream, metadata_stream = textacy.fileio.split_record_fields(thread, 'text')
  corpus = textacy.Corpus('en', texts=text_stream, metadatas=metadata_stream)
  corpus
  </code></pre>