(lang: types.LangLike)
return {
        feat_name
        for label in morphologizer.labels
        for feat_name in Morphology.feats_to_dict(label).keys()
    }
Get the full set of morphological feature labels assigned
    by a spaCy language pipeline according to its "morphologizer" pipe's metadata,
    or just get the default set of Universal Dependencies (v2) feature labels.

    Args:
        lang: Language with which spaCy processes text, represented as the full name
            of a spaCy language pipeline, the path on disk to it,
            or an already instantiated pipeline.

    Returns:
        Set of morphological feature labels assigned/assignable by ``lang``.
Get the full set of morphological feature labels assigned
    by a spaCy language pipeline according to its "morphologizer" pipe's metadata,
    or just get the default set of Universal Dependencies (v2) feature labels.
Get the full set of morphological feature labels assigned by a spaCy language pipeline according to its morphologizer pipe s metadata or just get the default set of Universal Dependencies ( v2 ) feature labels .
def get_spacy_lang_morph_labels(lang: types.LangLike) -> Set[str]:
    """
    Get the full set of morphological feature labels assigned
    by a spaCy language pipeline according to its "morphologizer" pipe's metadata,
    or just get the default set of Universal Dependencies (v2) feature labels.

    Args:
        lang: Language with which spaCy processes text, represented as the full name
            of a spaCy language pipeline, the path on disk to it,
            or an already instantiated pipeline.

    Returns:
        Set of morphological feature labels assigned/assignable by ``lang``.
    """
    spacy_lang = resolve_langlike(lang)
    if spacy_lang.has_pipe("morphologizer"):
        morphologizer = spacy_lang.get_pipe("morphologizer")
    elif any(isinstance(comp, Morphologizer) for _, comp in spacy_lang.pipeline):
        for _, component in spacy_lang.pipeline:
            if isinstance(component, Morphologizer):
                morphologizer = component
                break
    else:
        return constants.UD_V2_MORPH_LABELS

    return {
        feat_name
        for label in morphologizer.labels
        for feat_name in Morphology.feats_to_dict(label).keys()
    }
def get_spacy_lang_morph_labels ( lang : types . LangLike ) -> Set [ str ] : spacy_lang = resolve_langlike ( lang ) if spacy_lang . has_pipe ( "morphologizer" ) : morphologizer = spacy_lang . get_pipe ( "morphologizer" ) elif any ( isinstance ( comp , Morphologizer ) for _ , comp in spacy_lang . pipeline ) : for _ , component in spacy_lang . pipeline : if isinstance ( component , Morphologizer ) : morphologizer = component break else : return constants . UD_V2_MORPH_LABELS return { feat_name for label in morphologizer . labels for feat_name in Morphology . feats_to_dict ( label ) . keys ( ) }