def filter_words(text_list, dictionary):
    
    """ Filter sentences to remove any words from that does not appear in our dictionary
    
    Args:
        text_list: list of words in a sentence
        dictionary: dictionary of words in training set
    
    Returns:
        Filtered list of words in a sentence
    """
    
    result = []
    for t in text_list:
        if dictionary.get(t) != None:
            result.append(t)
    return result