class_docstr: Main class which handles parsing with Spacy-BIST parser.
  
  Args:
      verbose (bool, optional): Controls output verbosity.
      spacy_model (str, optional): Spacy model to use
      (see https://spacy.io/api/top-level#spacy.load).
      bist_model (str, optional): Path to a .model file to load. Defaults pre-trained model'.
class_docstr_tok: ["Main","class","which","handles","parsing","with","Spacy-BIST","parser",".","Args",":","verbose","(","bool",",","optional",")",":","Controls","output","verbosity",".","spacy_model","(","str",",","optional",")",":","Spacy","model","to","use","(","see","https",":","\/\/spacy.io\/api\/top-level","#","spacy.load",")",".","bist_model","(","str",",","optional",")",":","Path","to","a",".model","file","to","load",".","Defaults","pre-trained","model","'","."]
docstr: Converts a document to CoNLL format with spacy POS tags.
  
  Args:
      doc_text (str): raw document text.
  
  Yields:
      list of ConllEntry: The next sentence in the document in CoNLL format.
docstr_tok: ["Converts","a","document","to","CoNLL","format","with","spacy","POS","tags",".","Args",":","doc_text","(","str",")",":","raw","document","text",".","Yields",":","list","of","ConllEntry",":","The","next","sentence","in","the","document","in","CoNLL","format","."]
code: def to_conll(self, doc_text):
      """Converts a document to CoNLL format with spacy POS tags.
  
      Args:
          doc_text (str): raw document text.
  
      Yields:
          list of ConllEntry: The next sentence in the document in CoNLL format.
      """
      validate((doc_text, str))
      for sentence in self.spacy_parser(doc_text).sents:
          sentence_conll = [
              ConllEntry(
                  0,
                  "*root*",
                  "*root*",
                  "ROOT-POS",
                  "ROOT-CPOS",
                  "_",
                  -1,
                  "rroot",
                  "_",
                  "_",
              )
          ]
          i_tok = 0
          for tok in sentence:
              if self.verbose:
                  print(tok.text + "\t" + tok.tag_)
  
              if not tok.is_space:
                  pos = tok.tag_
                  text = tok.text
  
                  if text != "-" or pos != "HYPH":
                      pos = _spacy_pos_to_ptb(pos, text)
                      token_conll = ConllEntry(
                          i_tok + 1,
                          text,
                          tok.lemma_,
                          pos,
                          pos,
                          tok.ent_type_,
                          -1,
                          "_",
                          "_",
                          tok.idx,
                      )
                      sentence_conll.append(token_conll)
                      i_tok += 1
  
          if self.verbose:
              print("-----------------------\ninput conll form:")
              for entry in sentence_conll:
                  print(
                      str(entry.id)
                      + "\t"
                      + entry.form
                      + "\t"
                      + entry.pos
                      + "\t"
                  )
          yield sentence_conll
  
file_path: nlp-architect/nlp_architect/pipelines/spacy_bist.py
imports: from os import path, makedirs
  from nlp_architect.common.core_nlp_doc import CoreNLPDoc, _spacy_pos_to_ptb
  from nlp_architect.data.conll import ConllEntry
  from nlp_architect.models.bist_parser import BISTModel
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.utils.io import download_unzip
  from nlp_architect.utils.io import validate
  from nlp_architect.utils.text import SpacyInstance
label_desc: Use image node_id 2 for calling the SpacyBISTParser obj's underlying member method code with example usage: obj.to_conll(doc_text) without return types