class_docstr: Object for core-components (POS, Dependency Relations, etc).
  
  Attributes:
      _doc_text: the doc text
      _sentences: list of sentences, each word in a sentence is
          represented by a dictionary, structured as follows: {'start': (int), 'len': (int),
          'pos': (str), 'ner': (str), 'lemma': (str), 'gov': (int), 'rel': (str)}
code: def from_spacy(
      spacy_doc, show_tok=True, show_doc=True, ptb_pos=False
  ):
      core_sents = []
      for spacy_sent in spacy_doc.sents:
          cur_sent = []
          for tok in spacy_sent:
              pos = (
                  _spacy_pos_to_ptb(tok.tag_, tok.text)
                  if ptb_pos
                  else tok.tag_
              )
              core_tok = {
                  "start": tok.idx,
                  "len": len(tok),
                  "pos": pos,
                  "lemma": tok.lemma_,
                  "rel": tok.dep_.lower(),
                  "gov": -1
                  if tok.dep_ == "ROOT"
                  else tok.head.i - spacy_sent.start,
              }
              if show_tok:
                  core_tok["text"] = tok.text
              cur_sent.append(core_tok)
          core_sents.append(cur_sent)
      core_doc = CoreNLPDoc(sentences=core_sents)
      if show_doc:
          core_doc.doc_text = spacy_doc.text
      return core_doc
  
imports: import json
  from nlp_architect.utils.io import validate
label_desc: Use image node_id 17 for calling the CoreNLPDoc obj's underlying member method code with example usage: obj.from_spacy(spacy_doc, show_tok, show_doc, ptb_pos) and returns: core_doc