title: Instantiating and using StanfordTagger within NLTK
body: <p>I apologize for the newbie-nature of this question - I have been trying to figure out Python packaging and namespaces, but the finer points seem to elude me. To wit, I would like to use the Python wrapper to Stanford part-of-speech tagger. I had no trouble finding the documentation <a href="https://github.com/nltk/nltk/blob/master/nltk/tag/stanford.py" rel="nofollow noreferrer">here</a>,  which provides a use sample:</p>
  
  <pre><code>st = StanfordTagger('bidirectional-distsim-wsj-0-18.tagger')
  st.tag('What is the airspeed of an unladen swallow ?'.split())
      [('What', 'WP'), ('is', 'VBZ'), ('the', 'DT'), ('airspeed', 'NN'), ('of', 'IN'), ('an', 'DT'), ('unladen', 'JJ'), ('swallow', 'VB'), ('?', '.')]
  </code></pre>
  
  <p>This looks great, but I can't seem to get the right namespaces to show up in my local Python + NLTK installation (I have the latest NLTK version, and have tried the below in Python 2.6.x as well as 2.7.x):</p>
  
  <pre><code>&gt;&gt;&gt; import nltk
  &gt;&gt;&gt; from nltk import *
  &gt;&gt;&gt; from nltk.tag import stanford 
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: cannot import name stanford
  </code></pre>
  
  <p>I also tried this import statement, with same result:</p>
  
  <pre><code>&gt;&gt;&gt; from nltk.tag.stanford import StanfordTagger
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: No module named stanford
  </code></pre>
  
  <p>Searching around here on SO, I found <a href="https://stackoverflow.com/questions/7344916/trouble-importing-stanford-pos-tagger-into-nltk">this question</a>, where the poster seems to be experiencing the exact same problem, but is able to get past the namespace step with:</p>
  
  <blockquote>
    <p>The problem is that my nltk lib doesnt contain the stanford module. So I copied the same into the appropriate folder and compiled the same. </p>
  </blockquote>
  
  <p>Sounds like it is indeed the same issue, except I can't for the life of me find any documentation for how to add modules to NLTK. Everything I read on NLTK web site implies that the Stanford module should already be packaged into the base install. So, a question in two parts:</p>
  
  <ol>
  <li>(Specific) Any suggestions for getting past this particular issue
  and starting to use StanfordTagger from Python? I know I can easily
  call the jar directly and then interpret the output in Python -
  that's all the Python wrapper does anyway - but I would like to get this to work out of principle, if nothing else. </li>
  <li>(General) What is a good pythonic approach to investigating
  missing packaging issues or dependencies such as above?</li>
  </ol>