예제 #1
0
파일: indexdb.py 프로젝트: yasusii/fooling
 def get_idx(klass, path):
   if path in klass._cdb_cache:
     idx = klass._cdb_cache[path]
   else:
     idx = cdb.init(path)
     klass._cdb_cache[path] = idx
   return idx
예제 #2
0
파일: indexdb.py 프로젝트: yasusii/fooling
 def get_idx(klass, path):
     if path in klass._cdb_cache:
         idx = klass._cdb_cache[path]
     else:
         idx = cdb.init(path)
         klass._cdb_cache[path] = idx
     return idx
예제 #3
0
파일: merger.py 프로젝트: yasusii/fooling
 def open(self):
     if not self.cdb:
         self.cdb = cdb.init(self.fname)
         (self.ndocs, self.nterms) = idx_info(self.cdb)
     return
예제 #4
0
파일: merger.py 프로젝트: yasusii/fooling
 def open(self):
   if not self.cdb:
     self.cdb = cdb.init(self.fname)
     (self.ndocs, self.nterms) = idx_info(self.cdb)
   return
예제 #5
0
파일: corpus.py 프로젝트: yasusii/fooling
 def open(self, mode='r'):
   import pycdb as cdb
   self._db = cdb.init(self.dbfile)
   return
예제 #6
0
파일: corpus.py 프로젝트: yasusii/fooling
 def open(self, mode='r'):
     import pycdb as cdb
     self._db = cdb.init(self.dbfile)
     return