def decompress_inverted_index(filename): invertedindex = {} pldict = SingleStringDict.decompress(filename) with open(filename, 'rb') as plf: for word, offset in pldict.items(): # TODO :there are something cause the invertedindex[word] = seek_inverted_index_file(filename, offset) return (pldict, invertedindex)
def decompress_dict(filename): return SingleStringDict.decompress(filename)