title: POS tagging using spaCy
body: <p>I am trying to do POS tagging using the spaCy module in Python. </p>
  
  <p>Here is my code for the same</p>
  
  <pre><code>from spacy.en import English, LOCAL_DATA_DIR
  import spacy.en
  import os
  
  data_dir = os.environ.get('SPACY_DATA', LOCAL_DATA_DIR)
  nlp = English(parser=False, tagger=True, entity=False)
  
  
  def print_fine_pos(token):
      return (token.tag_)
  
  def pos_tags(sentence):
      sentence = unicode(sentence, "utf-8")
      tokens = nlp(sentence)
      tags = []
      for tok in tokens:
          tags.append((tok,print_fine_pos(tok)))
      return tags
  
  a = "we had crispy dosa"
  print pos_tags(a)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[(We , u'PRP'), (had , u'VBD'), (crispy , u'NN'), (dosa, u'NN')]
  </code></pre>
  
  <p>Here it returns crispy as a noun instead of an adjective. However, if I use a test sentence like</p>
  
  <pre><code>a="we had crispy fries"
  </code></pre>
  
  <p>It recognizes that crispy is an adjective. Here is the output:</p>
  
  <pre><code>[(we , u'PRP'), (had , u'VBD'), (crispy , u'JJ'), (fries, u'NNS')]
  </code></pre>
  
  <p>I think the primary reason why crispy wasn't tagged as an adjective in the first case was because dosa was tagged as 'NN' whereas fries was tagged as 'NNS' in the second case. </p>
  
  <p>Is there any way I can get crispy to be tagged as an adjective in the second case too?</p>