title: How to use the language option in synsets (nltk) if you load a wordnet manually?
body: <p>For specific purposes I have to use the Wordnet 1.6 instead of the current version implemented in the nltk package. I then downloaded the old version <a href="http://wordnet.princeton.edu/wordnet/download/old-versions/" rel="noreferrer">here</a> and tried to run a simple extract of code using the french option. </p>
  
  <pre><code>from collections import defaultdict
  import nltk
  #nltk.download() 
  import os
  import sys
  from nltk.corpus import WordNetCorpusReader
  
  cwd = os.getcwd()
  nltk.data.path.append(cwd)
  wordnet16_dir="wordnet-1.6/"
  wn16_path = "{0}/dict".format(wordnet16_dir)
  wn = WordNetCorpusReader(os.path.abspath("{0}/{1}".format(cwd, wn16_path)), nltk.data.find(wn16_path))
  
  senses=wn.synsets('gouvernement',lang=u'fre')
  </code></pre>
  
  <p>It seems that the wordnet I manually downloaded cannot be linked to the files of the nltk module dealing with foreign languages, the error I get is the following : </p>
  
  <pre><code>Traceback (most recent call last):
  File "C:/Users/Stephanie/Test/temp.py", line 16, in &lt;module&gt;
  senses=wn.synsets('gouvernement',lang=u'fre')
  File "C:\Python27\lib\site-packages\nltk\corpus\reader\wordnet.py", line 1419, in synsets
  self._load_lang_data(lang)
  File "C:\Python27\lib\site-packages\nltk\corpus\reader\wordnet.py", line 1064, in _load_lang_data
  if lang not in self.langs():
  File "C:\Python27\lib\site-packages\nltk\corpus\reader\wordnet.py", line 1088, in langs
  fileids = self._omw_reader.fileids()
  AttributeError: 'FileSystemPathPointer' object has no attribute 'fileids'
  </code></pre>
  
  <p>Using an english word doesn't generate any error (so it's not that I did not load the dictionary well) : </p>
  
  <pre><code>senses=wn.synsets('government')
  print senses
  
  [Synset('government.n.01'), Synset('government.n.02'), Synset('government.n.03'), Synset('politics.n.02')]
  </code></pre>
  
  <p>If I use the current version of Wordnet loaded with the nltk module I don't have any problem using french (so it's not a syntax problem with the optional argument) </p>
  
  <pre><code>from nltk.corpus import wordnet as wn
  senses=wn.synsets('gouvernement',lang=u'fre')
  print senses
  [Synset('government.n.02'), Synset('opinion.n.05'), Synset('government.n.03'), Synset('rule.n.01'), Synset('politics.n.02'), Synset('government.n.01'), Synset('regulation.n.03'), Synset('reign.n.03')]
  </code></pre>
  
  <p>But, as precised, I really have to use the old version. I guess this might be a path problem. I've been trying to read the code of the WordNetCorpusReader function but I am quite new with python I don't really see what the problem is so far, except that it doesn't find a special file.</p>
  
  <p>The needed file seems to be wn-data-fre.tab which is located in \nltk_data\corpora\omw\fre. I am pretty sure that I have to change the file with a version compatible with wordnet 1.6 but still, why the function WordNetCorpusReader can't find it ? </p>