(
    doc: Doc, patterns: str | List[str] | List[dict] | List[List[dict]],
)
Get candidate keyterms from ``doc``, where candidates are sequences of tokens
    that match any pattern in ``patterns``

    Args:
        doc
        patterns: One or multiple patterns to match against ``doc`` using
            a :class:`spacy.matcher.Matcher`.

    Yields:
        Tuple[:class:`spacy.tokens.Token`]: Next pattern-matching candidate,
        as a tuple of constituent Tokens.

    See Also:
        :func:`textacy.extract.token_matches()`
Get candidate keyterms from ``doc``, where candidates are sequences of tokens
    that match any pattern in ``patterns``
Get candidate keyterms from doc where candidates are sequences of tokens that match any pattern in patterns
def get_pattern_matching_candidates(
    doc: Doc, patterns: str | List[str] | List[dict] | List[List[dict]],
) -> Iterable[Tuple[Token, ...]]:
    """
    Get candidate keyterms from ``doc``, where candidates are sequences of tokens
    that match any pattern in ``patterns``

    Args:
        doc
        patterns: One or multiple patterns to match against ``doc`` using
            a :class:`spacy.matcher.Matcher`.

    Yields:
        Tuple[:class:`spacy.tokens.Token`]: Next pattern-matching candidate,
        as a tuple of constituent Tokens.

    See Also:
        :func:`textacy.extract.token_matches()`
    """
    for match in matches.token_matches(doc, patterns, on_match=None):
        yield tuple(match)
def get_pattern_matching_candidates ( doc : Doc , patterns : str | List [ str ] | List [ dict ] | List [ List [ dict ] ] , ) -> Iterable [ Tuple [ Token , ... ] ] : for match in matches . token_matches ( doc , patterns , on_match = None ) : yield tuple ( match )