title: AttributeError: ‘module’ object has no attribute 'scores'
body: <p>I am getting an error when trying to use the function <code>precision</code> from <code>nltk.metrics.scores</code>. I have tried many different imports but with no success.</p>
  
  <p>I looked into the files on my python directories (see below) and the function is there, but is just "can't touch this/that". I looked at:</p>
  
  <pre><code>/usr/local/lib/python2.7/dist-packages/nltk/metrics
  /usr/local/lib/python2.7/dist-packages/nltk/metrics/scores.py
  </code></pre>
  
  <p>This is what my terminal is showing me:</p>
  
  <pre><code>File "/home/login/projects/python-projects/test.py", line 39, in &lt;module&gt;
    precision = nltk.metrics.scores.precision(correct[CLASS_POS], predicted[CLASS_POS])
  AttributeError: 'module' object has no attribute 'scores'
  </code></pre>
  
  <p>In my searches I stumbled on this <a href="http://blog.willmer.org/2007/12/attributeerror-module-object-has-no-attribute-blah/" rel="noreferrer">link</a>, which gives me two options, but I don't know how to proceed to either of those:</p>
  
  <ul>
  <li>The obvious cause of this is that the settings.py doesn’t have the directory containing blah listed in <code>INSTALLED_APPS</code>.</li>
  <li>A less obvious cause: you’ll also get this error if the directory doesn’t contain a file <code>__init__.py</code>.</li>
  </ul>