code: def get_sentences_and_tokens_from_stanford(text, core_nlp):
      stanford_output = get_stanford_annotations(text, core_nlp)
      sentences = []
      for sentence in stanford_output["sentences"]:
          tokens = []
          for token in sentence["tokens"]:
              token["start"] = int(token["characterOffsetBegin"])
              token["end"] = int(token["characterOffsetEnd"])
              token["text"] = text[token["start"] : token["end"]]
              if token["text"].strip() in ["\n", "\t", " ", ""]:
                  continue
              # Make sure that the token text does not contain any space
              if len(token["text"].split(" ")) != 1:
                  print(
                      "WARNING: the text of the token contains space character, replaced with hyphen\n\t{0}\n\t{1}".format(
                          token["text"], token["text"].replace(" ", "-")
                      )
                  )
                  token["text"] = token["text"].replace(" ", "-")
              tokens.append(token)
          sentences.append(tokens)
      return sentences
  
file_path: NeuroNER/neuroner/brat_to_conll.py
imports: import codecs
  import glob
  import json
  import os
  from pycorenlp import StanfordCoreNLP
  import spacy
  from neuroner import utils_nlp
label_desc: Use image node_id 4 for calling a global function with example usage: get_sentences_and_tokens_from_stanford(text, core_nlp) and returns: sentences