import bz2
import pickle


def load_index(filename="inverted_index"):
    """ Load saved index. """
    with bz2.BZ2File(filename + ".pbz2", "rb") as f:
        index = pickle.load(f)
    return index