def __init__(self, documents=None, id_range=32000, myhash=zlib.adler32, debug=True):
    '\n\n        Parameters\n        ----------\n        documents : iterable of iterable of str\n            Iterable of documents, if given - use them to initialization.\n        id_range : int, optional\n            Number of hash-values in table, used as `id = myhash(key) % id_range`.\n        myhash : function\n            Hash function, should support interface myhash(str) -> int, used `zlib.adler32` by default.\n        debug : bool\n            If True - store raw tokens mapping (as str <-> id).\n            If you find yourself running out of memory (or not sure that you really need raw tokens), set `debug=False`.\n\n        '
    self.myhash = myhash
    self.id_range = id_range
    self.debug = debug
    self.token2id = {}
    self.id2token = {}
    self.dfs = {}
    self.dfs_debug = {}
    self.num_docs = 0
    self.num_pos = 0
    self.num_nnz = 0
    self.allow_update = True
    if (documents is not None):
        self.add_documents(documents)
Parameters
----------
documents : iterable of iterable of str
    Iterable of documents, if given - use them to initialization.
id_range : int, optional
    Number of hash-values in table, used as `id = myhash(key) % id_range`.
myhash : function
    Hash function, should support interface myhash(str) -> int, used `zlib.adler32` by default.
debug : bool
    If True - store raw tokens mapping (as str <-> id).
    If you find yourself running out of memory (or not sure that you really need raw tokens), set `debug=False`.
def __init__(self, documents=None, id_range=32000, myhash=zlib.adler32, debug=True):
    '\n\n        Parameters\n        ----------\n        documents : iterable of iterable of str\n            Iterable of documents, if given - use them to initialization.\n        id_range : int, optional\n            Number of hash-values in table, used as `id = myhash(key) % id_range`.\n        myhash : function\n            Hash function, should support interface myhash(str) -> int, used `zlib.adler32` by default.\n        debug : bool\n            If True - store raw tokens mapping (as str <-> id).\n            If you find yourself running out of memory (or not sure that you really need raw tokens), set `debug=False`.\n\n        '
    self.myhash = myhash
    self.id_range = id_range
    self.debug = debug
    self.token2id = {}
    self.id2token = {}
    self.dfs = {}
    self.dfs_debug = {}
    self.num_docs = 0
    self.num_pos = 0
    self.num_nnz = 0
    self.allow_update = True
    if (documents is not None):
        self.add_documents(documents)