(
        self, terms: str | Token | Sequence[str] | Sequence[Token]
    )
Get average emotional valence over all terms in ``terms`` for which
        emotion weights are available.

        Args:
            terms: One or more terms over which to average emotional valences.
                Note that only nouns, adjectives, adverbs, and verbs are included.

                .. note:: If the resource was initialized with ``word_rep="lemmapos"``,
                   then string terms must have matching parts-of-speech appended to them
                   like TERM#POS. Only "n" => noun, "v" => verb, "a" => adjective, and
                   "r" => adverb are included in the data.

        Returns:
            Mapping of emotion to average weight.
Get average emotional valence over all terms in ``terms`` for which
        emotion weights are available.
Get average emotional valence over all terms in terms for which emotion weights are available .
def get_emotional_valence(
        self, terms: str | Token | Sequence[str] | Sequence[Token]
    ) -> Dict[str, float]:
        """
        Get average emotional valence over all terms in ``terms`` for which
        emotion weights are available.

        Args:
            terms: One or more terms over which to average emotional valences.
                Note that only nouns, adjectives, adverbs, and verbs are included.

                .. note:: If the resource was initialized with ``word_rep="lemmapos"``,
                   then string terms must have matching parts-of-speech appended to them
                   like TERM#POS. Only "n" => noun, "v" => verb, "a" => adjective, and
                   "r" => adverb are included in the data.

        Returns:
            Mapping of emotion to average weight.
        """
        if isinstance(terms, (Token, str)):
            return self._get_term_emotional_valence(terms)
        elif isinstance(terms, (Span, Doc, collections.abc.Sequence)):
            return self._get_terms_emotional_valence(terms)
        else:
            raise TypeError(
                "`terms` must be of type {}, not {}".format(
                    {Token, Span, Doc, str, collections.abc.Sequence}, type(terms)
                )
            )
def get_emotional_valence ( self , terms : str | Token | Sequence [ str ] | Sequence [ Token ] ) -> Dict [ str , float ] : if isinstance ( terms , ( Token , str ) ) : return self . _get_term_emotional_valence ( terms ) elif isinstance ( terms , ( Span , Doc , collections . abc . Sequence ) ) : return self . _get_terms_emotional_valence ( terms ) else : raise TypeError ( "`terms` must be of type {}, not {}" . format ( { Token , Span , Doc , str , collections . abc . Sequence } , type ( terms ) ) )