def load_stop_words(filename):
    """Load a set of stop words from a file.
    One word each line."""
    # you are using CPython, don't you?
    # http://stackoverflow.com/a/11027437/1240620
    stopwords = {w.strip() for w in open(filename)}
    return stopwords