import re


def load_words(filename):
    """
    Gather word samples in given text file.
    """
    words = []
    sep = re.compile('\W+')
    for line in open(filename):
        words.extend(sep.split(line))
    return [w.lower() for w in words if len(w) > 0]