class_docstr: Simple Spacy pipe with NP extraction annotations
code: def __init__(
      self,
      model_path,
      settings_path,
      spacy_model="en",
      batch_size=32,
      use_cudnn=False,
  ):
      _model_path = path.join(
          path.dirname(path.realpath(__file__)), model_path
      )
      validate_existing_filepath(_model_path)
      _settings_path = path.join(
          path.dirname(path.realpath(__file__)), settings_path
      )
      validate_existing_filepath(_settings_path)
  
      nlp = spacy.load(spacy_model)
      for p in nlp.pipe_names:
          if p not in ["tagger"]:
              nlp.remove_pipe(p)
      nlp.add_pipe(nlp.create_pipe("sentencizer"), first=True)
      nlp.add_pipe(
          NPAnnotator.load(
              _model_path,
              settings_path,
              batch_size=batch_size,
              use_cudnn=use_cudnn,
          ),
          last=True,
      )
      self.nlp = nlp
  
imports: import pickle
  from os import path
  import numpy
  import spacy
  from spacy.tokens import Doc
  from spacy.tokens import Span
  from nlp_architect.models.chunker import SequenceChunker
  from nlp_architect.utils.generic import pad_sentences
  from nlp_architect.utils.io import validate_existing_filepath
  from nlp_architect.utils.text import extract_nps, Stopwords
label_desc: Use image node_id 1 to create a new SpacyNPAnnotator object from inherited base classes: object with example: obj = SpacyNPAnnotator(model_path, settings_path, spacy_model, batch_size, use_cudnn)