(doclike: types.DocLike)
return {label: dict(val_counts) for label, val_counts in morph_counts.items()}
Count the number of times each value for a morphological feature appears
    as a token annotation in ``doclike``.

    Args:
        doclike

    Returns:
        Mapping of morphological feature to value counts of occurrence.

    See Also:
        :class:`spacy.tokens.MorphAnalysis`
Count the number of times each value for a morphological feature appears
    as a token annotation in ``doclike``.
Count the number of times each value for a morphological feature appears as a token annotation in doclike .
def morph(doclike: types.DocLike) -> Dict[str, Dict[str, int]]:
    """
    Count the number of times each value for a morphological feature appears
    as a token annotation in ``doclike``.

    Args:
        doclike

    Returns:
        Mapping of morphological feature to value counts of occurrence.

    See Also:
        :class:`spacy.tokens.MorphAnalysis`
    """
    morph_counts = collections.defaultdict(collections.Counter)
    for tok in doclike:
        for label, val in tok.morph.to_dict().items():
            morph_counts[label][val] += 1
    return {label: dict(val_counts) for label, val_counts in morph_counts.items()}
def morph ( doclike : types . DocLike ) -> Dict [ str , Dict [ str , int ] ] : morph_counts = collections . defaultdict ( collections . Counter ) for tok in doclike : for label , val in tok . morph . to_dict ( ) . items ( ) : morph_counts [ label ] [ val ] += 1 return { label : dict ( val_counts ) for label , val_counts in morph_counts . items ( ) }