code: def __init__(self, parser=None):
      if parser is None:
          self.nlp = SpacyInstance(
              disable=["ner", "parser", "vectors", "textcat"]
          ).parser
      else:
          self.nlp = parser
  
      self.nlp.add_pipe(self.nlp.create_pipe("sentencizer"), first=True)
      _path_to_model = path.join(chunker_local_path, chunker_model_file)
      if not path.exists(chunker_local_path):
          makedirs(chunker_local_path)
      if not path.exists(_path_to_model):
          logger.info(
              "The pre-trained model to be downloaded for NLP Architect word"
              " chunker model is licensed under Apache 2.0"
          )
          download_unlicensed_file(
              nlp_chunker_url, chunker_model_file, _path_to_model
          )
      _path_to_params = path.join(
          chunker_local_path, chunker_model_dat_file
      )
      if not path.exists(_path_to_params):
          download_unlicensed_file(
              nlp_chunker_url, chunker_model_dat_file, _path_to_params
          )
      self.nlp.add_pipe(
          NPAnnotator.load(_path_to_model, _path_to_params), last=True
      )
  
file_path: nlp-architect/solutions/trend_analysis/np_scorer.py
imports: import logging
  from os import path, makedirs
  from tqdm import tqdm
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.pipelines.spacy_np_annotator import NPAnnotator, get_noun_phrases
  from nlp_architect.utils.io import download_unlicensed_file
  from nlp_architect.utils.text import SpacyInstance
  from .scoring_utils import TextSpanScoring
label_desc: Use image node_id 1 to create a new NPScorer object from inherited base classes: object with example: obj = NPScorer(parser)