import itertools


def get_words_love(row):
    """ Lambda function to return 1 when somebody said some form
    of 'I love you' to the other
    
    Parameters:
    -----------
    row: dataframe
        Used to pass in a row through pandas' function apply 
            
    Returns
    -------
    int : 0 or 1 
        1 if a user said some variation of "I love you"
        0 else
    
    """
   
    # Create all combinations of words between (not within!) lists
    words = [['houd', 'hou'], ['van'], ['je', 'jou']]
    set_words = list(itertools.product(*words))
    
    # Check if any of those sets are fully matched within a sentence
    for words in set_words:
        if all(word in row.Message_Only_Text.split(' ') for word in words):
            return 1
    
    # Check also for a combination of two words 
    # This can be expanded when necessary and easily removed
    words = [['love'], ['you']]
    set_words = list(itertools.product(*words))
    
    for words in set_words:
        if all(word in row.Message_Only_Text.split(' ') for word in words):
            return 1
    
    return 0