(words: Iterable[Token])
return (sum(word_counts.values()), len(word_counts))
Compute the number of words and the number of unique words (aka types).

    Args:
        words: Sequence of non-punct, non-space tokens -- "words" -- as output, say,
            by :func:`get_words()`.

    Returns:
        (n_words, n_types)
Compute the number of words and the number of unique words (aka types).
Compute the number of words and the number of unique words ( aka types ) .
def compute_n_words_and_types(words: Iterable[Token]) -> Tuple[int, int]:
    """
    Compute the number of words and the number of unique words (aka types).

    Args:
        words: Sequence of non-punct, non-space tokens -- "words" -- as output, say,
            by :func:`get_words()`.

    Returns:
        (n_words, n_types)
    """
    word_counts = itertoolz.frequencies(word.lower for word in words)
    return (sum(word_counts.values()), len(word_counts))
def compute_n_words_and_types ( words : Iterable [ Token ] ) -> Tuple [ int , int ] : word_counts = itertoolz . frequencies ( word . lower for word in words ) return ( sum ( word_counts . values ( ) ) , len ( word_counts ) )