#NEWLINE# def __init__( self , documents = None , id_range = 32000 , myhash = zlib . adler32 , debug = True ) : #NEWLINE# #INDENT# "\n        By default, keep track of debug statistics and mappings. If you find yourself\n        running out of memory (or are sure you don't need the debug info), set\n        `debug=False`.\n        " #NEWLINE# self . myhash = myhash #NEWLINE# self . id_range = id_range #NEWLINE# self . debug = id_range #NEWLINE# self . token2id = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . id2token = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . dfs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . dfs_debug = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . num_docs = 0 #NEWLINE# self . num_pos = 0 #NEWLINE# self . num_nnz = 0 #NEWLINE# self . allow_update = True #NEWLINE# if ( documents is not None ) : #NEWLINE# #INDENT# self . add_documents ( documents )