(
    doclike: types.DocLike, *, drop_determiners: bool = True, min_freq: int = 1
)
Extract an ordered sequence of noun chunks from a spacy-parsed doc, optionally
    filtering by frequency and dropping leading determiners.

    Args:
        doclike
        drop_determiners: Remove leading determiners (e.g. "the")
            from phrases (e.g. "the quick brown fox" => "quick brown fox")
        min_freq: Remove chunks that occur in ``doclike`` fewer than ``min_freq`` times

    Yields:
        Next noun chunk from ``doclike`` in order of appearance in the document
Extract an ordered sequence of noun chunks from a spacy-parsed doc, optionally
    filtering by frequency and dropping leading determiners.
Extract an ordered sequence of noun chunks from a spacy - parsed doc optionally filtering by frequency and dropping leading determiners .
def noun_chunks(
    doclike: types.DocLike, *, drop_determiners: bool = True, min_freq: int = 1
) -> Iterable[Span]:
    """
    Extract an ordered sequence of noun chunks from a spacy-parsed doc, optionally
    filtering by frequency and dropping leading determiners.

    Args:
        doclike
        drop_determiners: Remove leading determiners (e.g. "the")
            from phrases (e.g. "the quick brown fox" => "quick brown fox")
        min_freq: Remove chunks that occur in ``doclike`` fewer than ``min_freq`` times

    Yields:
        Next noun chunk from ``doclike`` in order of appearance in the document
    """
    ncs = doclike.noun_chunks
    if drop_determiners is True:
        ncs = (nc if nc[0].pos != DET else nc[1:] for nc in ncs)
    if min_freq > 1:
        ncs = list(ncs)
        freqs = itertoolz.frequencies(nc.text.lower() for nc in ncs)
        ncs = (nc for nc in ncs if freqs[nc.text.lower()] >= min_freq)

    for nc in ncs:
        yield nc
def noun_chunks ( doclike : types . DocLike , * , drop_determiners : bool = True , min_freq : int = 1 ) -> Iterable [ Span ] : ncs = doclike . noun_chunks if drop_determiners is True : ncs = ( nc if nc [ 0 ] . pos != DET else nc [ 1 : ] for nc in ncs ) if min_freq > 1 : ncs = list ( ncs ) freqs = itertoolz . frequencies ( nc . text . lower ( ) for nc in ncs ) ncs = ( nc for nc in ncs if freqs [ nc . text . lower ( ) ] >= min_freq ) for nc in ncs : yield nc