(doc_or_tokens: types.DocOrTokens)
Get all non-punct, non-space tokens -- "words" as we commonly understand them --
    from input ``Doc`` or ``Iterable[Token]`` object.
Get all non-punct, non-space tokens -- "words" as we commonly understand them --
    from input ``Doc`` or ``Iterable[Token]`` object.
Get all non - punct non - space tokens -- words as we commonly understand them -- from input Doc or Iterable [ Token ] object .
def get_words(doc_or_tokens: types.DocOrTokens) -> Iterable[Token]:
    """
    Get all non-punct, non-space tokens -- "words" as we commonly understand them --
    from input ``Doc`` or ``Iterable[Token]`` object.
    """
    words = (tok for tok in doc_or_tokens if not (tok.is_punct or tok.is_space))
    yield from words
def get_words ( doc_or_tokens : types . DocOrTokens ) -> Iterable [ Token ] : words = ( tok for tok in doc_or_tokens if not ( tok . is_punct or tok . is_space ) ) yield from words