class_docstr: Initialize the np2vec model, train it, save it and load it.
docstr: Load the np2vec model.
  
  Args:
      np2vec_model_file (str): the file containing the np2vec model to load
      binary (bool): boolean indicating whether the np2vec model to load is in binary format
      word_ngrams (int {1,0}): If 1, np2vec model to load uses word vectors with subword (
      ngrams) information.
      word2vec_format(bool): boolean indicating whether the model to load has been stored in
      original word2vec format.
  
  Returns:
      np2vec model to load
docstr_tok: ["Load","the","np2vec","model",".","Args",":","np2vec_model_file","(","str",")",":","the","file","containing","the","np2vec","model","to","load","binary","(","bool",")",":","boolean","indicating","whether","the","np2vec","model","to","load","is","in","binary","format","word_ngrams","(","int","{","1,0","}",")",":","If","1",",","np2vec","model","to","load","uses","word","vectors","with","subword","(","ngrams",")","information",".","word2vec_format","(","bool",")",":","boolean","indicating","whether","the","model","to","load","has","been","stored","in","original","word2vec","format",".","Returns",":","np2vec","model","to","load"]
code: def load(
      cls,
      np2vec_model_file,
      binary=False,
      word_ngrams=0,
      word2vec_format=True,
  ):
      """
      Load the np2vec model.
  
      Args:
          np2vec_model_file (str): the file containing the np2vec model to load
          binary (bool): boolean indicating whether the np2vec model to load is in binary format
          word_ngrams (int {1,0}): If 1, np2vec model to load uses word vectors with subword (
          ngrams) information.
          word2vec_format(bool): boolean indicating whether the model to load has been stored in
          original word2vec format.
  
      Returns:
          np2vec model to load
      """
      if word_ngrams == 0:
          if word2vec_format:
              return KeyedVectors.load_word2vec_format(
                  np2vec_model_file, binary=binary
              )
          return KeyedVectors.load(np2vec_model_file, mmap="r")
      if word_ngrams == 1:
          return FastText.load(np2vec_model_file)
      logger.error("invalid value for 'word_ngrams'")
      return None
  
file_path: nlp-architect/nlp_architect/models/np2vec.py
imports: import json
  import logging
  import sys
  from gensim.models import FastText, Word2Vec, KeyedVectors
  from gensim.models.word2vec import LineSentence
  from gensim import utils
  import nltk
  from nltk.corpus import conll2000
  from six import iteritems
  from smart_open import open
label_desc: Use image node_id 5 for calling the NP2vec obj's underlying member method code with example usage: obj.load(cls, np2vec_model_file, binary, word_ngrams, word2vec_format) and returns: None, KeyedVectors, FastText, KeyedVectors