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)}
docstr: Returns doc adapted to BRAT expected input.
docstr_tok: ["Returns","doc","adapted","to","BRAT","expected","input","."]
code: def brat_doc(self):
      """Returns doc adapted to BRAT expected input."""
      doc = {"text": "", "entities": [], "relations": []}
      tok_count = 0
      rel_count = 1
      for sentence in self.sentences:
          sentence_start = sentence[0]["start"]
          sentence_end = sentence[-1]["start"] + sentence[-1]["len"]
          doc["text"] = (
              doc["text"]
              + "\n"
              + self.doc_text[sentence_start:sentence_end]
          )
          token_offset = tok_count
  
          for token in sentence:
              start = token["start"]
              end = start + token["len"]
              doc["entities"].append(
                  ["T" + str(tok_count), token["pos"], [[start, end]]]
              )
  
              if token["gov"] != -1 and token["rel"] != "punct":
                  doc["relations"].append(
                      [
                          rel_count,
                          token["rel"],
                          [
                              [
                                  "",
                                  "T"
                                  + str(token_offset + token["gov"]),
                              ],
                              ["", "T" + str(tok_count)],
                          ],
                      ]
                  )
                  rel_count += 1
              tok_count += 1
      doc["text"] = doc["text"][1:]
      return doc
  
imports: import json
  from nlp_architect.utils.io import validate
label_desc: Use image node_id 15 for calling the CoreNLPDoc obj's underlying member method code with example usage: obj.brat_doc() and returns: doc