from typing import Counter


def get_word_freqs(captions):
    """ Calculates word frequencies
        :param captions: list of captions
    """
    word_freqs = Counter()
    for caption in captions:
        word_freqs.update(list(filter(None, caption.split(' '))))
    return word_freqs