title: Tag an already tokenised string with spaCy
body: <p>To make a comparable study, I am working with data that has already been tokenised (not with spacy). I need to use these tokens as input to ensure that I work with the same data across the board. I wish to feed these tokens into spaCy's tagger, but the following fails:</p>
  
  <pre><code>import spacy
  
  nlp = spacy.load('en', disable=['tokenizer', 'parser', 'ner', 'textcat'])
  sent = ['I', 'like', 'yellow', 'bananas']
  
  doc = nlp(sent)
  
  for i in doc:
      print(i)
  </code></pre>
  
  <p>with the following trace</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/bmvroy/.PyCharm2018.2/config/scratches/scratch_6.py", line 6, in &lt;module&gt;
      doc = nlp(sent)
    File "C:\Users\bmvroy\venv\lib\site-packages\spacy\language.py", line 346, in __call__
      doc = self.make_doc(text)
    File "C:\Users\bmvroy\venv\lib\site-packages\spacy\language.py", line 378, in make_doc
      return self.tokenizer(text)
  TypeError: Argument 'string' has incorrect type (expected str, got list)
  </code></pre>
  
  <p>First of all, I'm not sure why spaCy tries to tokenize the input as I disabled the tokenizer in the <code>load()</code> statement. Second, evidently this is not the way to go.</p>
  
  <p>I am looking for a way to feed the tagger a list of tokens. Is that possible with spaCy?</p>
  
  <hr>
  
  <p>I tried the solution provided by @aab combined with info from <a href="https://spacy.io/api/tagger#call" rel="nofollow noreferrer">the documentation</a> but to no avail:</p>
  
  <pre><code>from spacy.tokens import Doc
  from spacy.lang.en import English
  from spacy.pipeline import Tagger
  
  nlp = English()
  tagger = Tagger(nlp.vocab)
  
  words = ['Listen', 'up', '.']
  spaces = [True, False, False]
  
  doc = Doc(nlp.vocab, words=words, spaces=spaces)
  processed = tagger(doc)
  print(processed)
  </code></pre>
  
  <p>This code didn't run, and gave the following error:</p>
  
  <pre><code>    processed = tagger(doc)
    File "pipeline.pyx", line 426, in spacy.pipeline.Tagger.__call__
    File "pipeline.pyx", line 438, in spacy.pipeline.Tagger.predict
  AttributeError: 'bool' object has no attribute 'tok2vec'
  </code></pre>