def compute_word_freq(input_filepath):
    """Compute word frequency from a input text file.

    Args:
        input_filepath (str): Input text file path.

    Returns:
        Dict[str: int]: Each key is a word, and its
         values are their frequency.
    """

    word_freq = {}

    # Count the words
    with open(input_filepath, 'r') as stream:
        for line in stream:
            for word in line.split():
                word = word.lower()
                word_freq[word] = word_freq.get(word, 0) + 1

    return word_freq