def _tf(word_occured_in_doc: int, total_words_in_doc: int) -> float:
    """Term frequency of a word in certain document.

    See: https://bit.ly/3zEDkMn
    """

    assert word_occured_in_doc <= total_words_in_doc
    return word_occured_in_doc / total_words_in_doc