(doc: Doc, value: dict)
Add custom metadata ``value`` to ``doc`` .
    Typically used as a custom extension, like ``doc._.meta = value`` .
Add custom metadata ``value`` to ``doc`` .
    Typically used as a custom extension, like ``doc._.meta = value`` .
Add custom metadata value to doc . Typically used as a custom extension like doc . _ . meta = value .
def set_doc_meta(doc: Doc, value: dict) -> None:
    """
    Add custom metadata ``value`` to ``doc`` .
    Typically used as a custom extension, like ``doc._.meta = value`` .
    """
    if not isinstance(value, dict):
        raise TypeError(errors.type_invalid_msg("value", type(value), Dict))
    try:
        doc.user_data["textacy"]["meta"] = value
    except KeyError:
        # TODO: confirm that this is the same. it is, right??
        doc.user_data["textacy"] = {"meta": value}
def set_doc_meta ( doc : Doc , value : dict ) -> None : if not isinstance ( value , dict ) : raise TypeError ( errors . type_invalid_msg ( "value" , type ( value ) , Dict ) ) try : doc . user_data [ "textacy" ] [ "meta" ] = value except KeyError : # TODO: confirm that this is the same. it is, right?? doc . user_data [ "textacy" ] = { "meta" : value }