code: 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: 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
  
file_path: textacy/src/textacy/extract/basics.py
imports: from __future__ import annotations
  from functools import partial
  from typing import Collection, Iterable, Optional, Union
  from cytoolz import itertoolz
  from spacy.parts_of_speech import DET
  from spacy.tokens import Span, Token
  from ..None import constants, errors, types, utils
label_desc: Use image node_id 5 for calling a global function with example usage: noun_chunks(doclike) without return types