title: import error for compat in NLTK and using BrowServer for browsing the NLTK Wordnet database for lemmatization
body: <p><strong>Extension to the use case here</strong> -
  <a href="https://stackoverflow.com/questions/17684186/nltk-words-lemmatizing">NLTK words lemmatizing</a></p>
  
  <p>I have nltk installed on my computer(with all modules &amp; corpus from the book). My use case is to explore and contrast some lemmatization and stemming approaches for my dataset (I tried Porter lemmatization, which worked) </p>
  
  <p>I was trying to use the <strong>lemmatization with Wordnet</strong> as described by @Chthonic Project here <a href="https://stackoverflow.com/questions/17684186/nltk-words-lemmatizing">NLTK words lemmatizing</a> . However the source code it points to(see here <a href="http://nltk.org/_modules/nltk/app/wordnet_app.html" rel="nofollow noreferrer">http://nltk.org/_modules/nltk/app/wordnet_app.html</a>) , needs compat module from nltk. </p>
  
  <pre><code>from nltk import compat
  ImportError: cannot import name compat
  </code></pre>
  
  <p>I googled around for the import error of compat(and it looked like compatibilty?) and here's what I tried on my ubuntu box:-</p>
  
  <p><strong>sudo  find . -name compat*</strong> which returns the files below . I also tried <strong>sudo find  -name "trac" -type d</strong> which returns nothing . </p>
  
  <p>I see that I should have found some modules with "trac/tests/functional/fixes" in a likewise folder /usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/tests/functional/</p>
  
  <p>Source : <a href="http://biodegradablegeek.com/2008/08/workaround-for-importerror-cannot-import-name-compat-issue-in-trac-011x/#sthash.NhAThk6e.dpuf" rel="nofollow noreferrer">http://biodegradablegeek.com/2008/08/workaround-for-importerror-cannot-import-name-compat-issue-in-trac-011x/#sthash.NhAThk6e.dpuf</a></p>
  
  <p><em>Questions :</em></p>
  
  <p><strong>1. What am I missing ?</strong> And is this an issue with trac/tests?  </p>
  
  <p><strong>2. Is there a way to be able to use wordnet for lemmatization</strong> (from nltk.corpus import wordnet as wn works just fine. Post the import error is solved, how do I use this module <a href="http://nltk.org/_modules/nltk/app/wordnet_app.html" rel="nofollow noreferrer">http://nltk.org/_modules/nltk/app/wordnet_app.html</a> (I was trying to build the source locally from this page, i.e. is the file browserver.py, when I hit the import error with compat) </p>
  
  <p><em>Tip :</em> If you are providing a solution, please also mention how to solve this on my windows environment (I use both windows &amp; ubuntu interchangeably,depending on context)</p>
  
  <p><strong>Files I see from find . -name compat*</strong></p>
  
  <pre><code>ekta@ekta-VirtualBox:/usr/lib/python2.7$ sudo find . -name compat*
  ./dist-packages/numpy/numarray/compat.pyc
  ./dist-packages/numpy/numarray/compat.py
  ./dist-packages/numpy/distutils/compat.pyc
  ./dist-packages/numpy/distutils/compat.py
  ./dist-packages/numpy/compat
  ./dist-packages/numpy/oldnumeric/compat.pyc
  ./dist-packages/numpy/oldnumeric/compat.py
  ./dist-packages/twisted/python/compat.pyc
  ./dist-packages/twisted/python/compat.py
  ./dist-packages/gtk-2.0/gtk/compat.pyc
  ./dist-packages/gtk-2.0/gtk/compat.py
  </code></pre>
  
  <p>I am on python 2.7 </p>