title: TaggedCorpusReader and UnigramTagger in nltk (python)
body: <p>I'm trying to use nltk to auto-categorize news articles in a very lo-fi way. I've created a custom corpus of word/tag pairs correlating to my categories (ie. teacher/EDU, computer/TECH, etc.) I've been reading around and <a href="https://stackoverflow.com/questions/5919355/custom-tagging-with-nltk">this question</a> got me pretty close, but I'm still stuck.</p>
  
  <p>Based on my code so far, how do I use my tagger to tag my sentence?</p>
  
  <pre><code>import nltk
  
  # Loads my custom word/tag corpus
  from nltk.corpus.reader import TaggedCorpusReader
  reader = TaggedCorpusReader('taggers','.*')
  
  #Sets up the UnigramTagger
  default_tagger = nltk.data.load(nltk.tag._POS_TAGGER)
  tagger = nltk.tag.UnigramTagger(model=reader.tagged_words(), backoff=default_tagger)
  
  #Sample content
  sent = 'The students went to school to ask their teacher what the homework for the day was but she told them to check their email.'
  tokens = nltk.tokenize.word_tokenize(sent)
  
  # Sad Panda
  tagged = tagger.tag(tokens) 
  # ^ produces AttributeError: 'ConcatenatedCorpusView' object has no attribute 'get'
  </code></pre>
  
  <p>It's also very possible that this is a poor way to go about doing what I'm trying to do, but it seems good enough for a first run. Thanks in advance.</p>