Package viindex :: Module wordsdb :: Class WordsDB
[show private | hide private]
[frames | no frames]

Class WordsDB


This is a -Dictionary like- to store self.words (keywords, fileid and lines).
Method Summary
  __init__(self, fdir, fl_len)
__init__([<fdir=<output directory name, default=indexer_words.db>],[fl_len=<file name lenght,default=2>]).
  add(self, word, line)
  clean(self)
  has_key(self, item)
  load_key(self, key)
load_key(key) to load values from indexes into self.words.
  save(self)
save() save self.words in index directory fdir.
  save_keys(self, fname, keys)
save_keys(<index file name>,<keys to store in that file name>)
  set_fileid(self, fileid)
set_fileid(fileid) to set the value of the fileid.

Method Details

__init__(self, fdir='indexer_words.db', fl_len=2)
(Constructor)

__init__([<fdir=<output directory name, default=indexer_words.db>],[fl_len=<file name lenght,default=2>]). Big fl_len values increase responsiveness of queries but decrease building process of the indexes

load_key(self, key)

load_key(key) to load values from indexes into self.words.

save(self)

save() save self.words in index directory fdir.

save_keys(self, fname, keys)

save_keys(<index file name>,<keys to store in that file name>)

set_fileid(self, fileid)

set_fileid(fileid) to set the value of the fileid. This is MANDATORY before a __setitem__

Generated by Epydoc 1.1 on Wed Aug 27 15:42:19 2003 http://epydoc.sf.net