code: def _extract_noun_phrases(doc: Doc) -> Iterable[List[Span]]:
      seen = [False for _ in range(len(doc))]
      ret = []
      for tag in reversed(list(doc._.get(KNP_USER_KEYS.tag.spans))):
          if tag._.get(KNP_USER_KEYS.tag.element).features.get("体言"):
              taglist = _traverse_children(tag)
              i, j = _get_span(taglist)
              if seen[i]:
                  # It is sufficient to check if the start has already been seen
                  # because we are traversing the tags from the end of the doc.
                  continue
              for k in range(i, j):
                  seen[k] = True
              ret.append(taglist)
      return reversed(ret)
  
file_path: camphr/packages/camphr_knp/camphr_knp/noun_chunker.py
imports: from typing import Iterable, List, Optional, Tuple
  import spacy
  from spacy.tokens import Doc, Span, Token
  from .consts import KNP_USER_KEYS
label_desc: Use image node_id 8 for calling a global function with example usage: _extract_noun_phrases(doc) and returns: reversed