class_docstr: TextSet wraps a set of texts with status.
docstr: Load the word_index map which was saved after the training, so that this TextSet can
  directly use this word_index during inference.
  Each separate line should be "word id".
  
  Note that after calling `load_word_index`, you do not need to specify any argument when
  calling `word2idx` in the preprocessing pipeline as now you are using exactly the loaded
  word_index for transformation.
  
  For LocalTextSet, load txt from a local file system.
  For DistributedTextSet, load txt from a local or distributed file system (such as HDFS).
  
  :return: TextSet with the loaded word_index.
docstr_tok: ["Load","the","word_index","map","which","was","saved","after","the","training",",","so","that","this","TextSet","can","directly","use","this","word_index","during","inference",".","Each","separate","line","should","be","``","word","id","''",".","Note","that","after","calling","`","load_word_index","`",",","you","do","not","need","to","specify","any","argument","when","calling","`","word2idx","`","in","the","preprocessing","pipeline","as","now","you","are","using","exactly","the","loaded","word_index","for","transformation",".","For","LocalTextSet",",","load","txt","from","a","local","file","system",".","For","DistributedTextSet",",","load","txt","from","a","local","or","distributed","file","system","(","such","as","HDFS",")",".",":","return",":","TextSet","with","the","loaded","word_index","."]
code: def load_word_index(self, path):
      """
      Load the word_index map which was saved after the training, so that this TextSet can
      directly use this word_index during inference.
      Each separate line should be "word id".
  
      Note that after calling `load_word_index`, you do not need to specify any argument when
      calling `word2idx` in the preprocessing pipeline as now you are using exactly the loaded
      word_index for transformation.
  
      For LocalTextSet, load txt from a local file system.
      For DistributedTextSet, load txt from a local or distributed file system (such as HDFS).
  
      :return: TextSet with the loaded word_index.
      """
      jvalue = callZooFunc(
          self.bigdl_type, "textSetLoadWordIndex", self.value, path
      )
      return TextSet(jvalue=jvalue)
  
imports: import six
  from bigdl.dllib.utils.common import JavaValue
  from bigdl.dllib.utils.file_utils import callZooFunc
  from pyspark import RDD
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 8 for calling the TextSet obj's underlying member method code with example usage: obj.load_word_index(path) and returns: TextSet