Package nltk_lite :: Package contrib :: Package classifier_tests
[hide private]
[frames] | no frames]

Source Code for Package nltk_lite.contrib.classifier_tests

 1  # Natural Language Toolkit 
 2  # 
 3  # Author: Sumukh Ghodke <sumukh dot ghodke at gmail dot com> 
 4  # 
 5  # URL: <http://nltk.sf.net> 
 6  # This software is distributed under GPL, for license information see LICENSE.TXT 
 7   
 8  import unittest, os, re 
 9   
10  SEP = os.path.sep 
11   
12 -def thisFileDir(self):
13 thisfilepath = os.path.abspath(self.__module__) 14 return os.path.dirname(re.compile('\.').sub(SEP, thisfilepath))
15
16 -def datasetsDir(self):
17 currentDir = thisFileDir(self) 18 while not os.path.exists(os.path.join(currentDir, 'datasets')): 19 currentDir = os.path.dirname(currentDir) 20 return os.path.join(currentDir, 'datasets') + SEP
21