code: def __init__(
      self,
      parse: bool = True,
      rerank_model: PathLike = None,
      asp_thresh: int = 3,
      op_thresh: int = 2,
      max_iter: int = 3,
      parser="spacy",
      spacy_model="en_core_web_sm",
  ):
      self.acquire_lexicon = AcquireTerms(
          asp_thresh, op_thresh, max_iter
      )
      self.parser_name = parser
  
      if parse:
          if parser == "bist":
              from nlp_architect.pipelines.spacy_bist import (
                  SpacyBISTParser,
              )
  
              self.parser = SpacyBISTParser(spacy_model=spacy_model)
          elif parser == "spacy":
              from nlp_architect.utils.text import SpacyInstance
  
              disable = [
                  "merge_noun_chunks",
                  "ner",
                  "entity_linker",
                  "textcat",
                  "entity_ruler",
                  "sentencizer",
                  "merge_entities",
              ]
              self.parser = SpacyInstance(
                  model=spacy_model, disable=disable, ptb_pos=True
              )
      else:
          self.parser = None
  
      if not rerank_model:
          print("using pre-trained reranking model")
          rerank_model = _download_pretrained_rerank_model(
              RERANK_MODEL_DEFAULT_PATH
          )
  
      download_unzip(
          *EMBEDDING_URL,
          EMBEDDING_PATH,
          license_msg="Glove word embeddings.",
      )
      self.rerank = RerankTerms(
          vector_cache=True,
          rerank_model=rerank_model,
          emb_model_path=EMBEDDING_PATH,
      )
  
file_path: nlp-architect/nlp_architect/models/absa/train/train.py
imports: from pathlib import Path, PosixPath
  from os import PathLike
  from typing import Union
  from nlp_architect.models.absa import TRAIN_OUT, LEXICONS_OUT
  from nlp_architect.models.absa.train.acquire_terms import AcquireTerms
  from nlp_architect.models.absa.train.rerank_terms import RerankTerms
  from nlp_architect.models.absa.utils import parse_docs, parse_docs_bist, _download_pretrained_rerank_model, _write_aspect_lex, _write_opinion_lex
  from nlp_architect.utils.io import download_unzip
label_desc: Use image node_id 1 to create a new TrainSentiment object  with example: obj = TrainSentiment(parse, rerank_model, asp_thresh, op_thresh, max_iter, parser, spacy_model)