class_docstr: This class allows to use `NMSLIB <https://github.com/nmslib/nmslib>`_ as indexer for `most_similar` method
  from :class:`~gensim.models.word2vec.Word2Vec`, :class:`~gensim.models.doc2vec.Doc2Vec`,
  :class:`~gensim.models.fasttext.FastText` and :class:`~gensim.models.keyedvectors.Word2VecKeyedVectors` classes.
class_docstr_tok: ["This","class","allows","to","use","`","NMSLIB","<","https",":","\/\/github.com\/nmslib\/nmslib",">","`","_","as","indexer","for","`","most_similar","`","method","from",":","class",":","`","~gensim.models.word2vec.Word2Vec","`",",",":","class",":","`","~gensim.models.doc2vec.Doc2Vec","`",",",":","class",":","`","~gensim.models.fasttext.FastText","`","and",":","class",":","`","~gensim.models.keyedvectors.Word2VecKeyedVectors","`","classes","."]
docstr: Find the approximate `num_neighbors` most similar items.
  
  Parameters
  ----------
  vector : numpy.array
      Vector for a word or document.
  num_neighbors : int
      How many most similar items to look for?
  
  Returns
  -------
  list of (str, float)
      List of most similar items in the format `[(item, cosine_similarity), ... ]`.
docstr_tok: ["Find","the","approximate","`","num_neighbors","`","most","similar","items",".","Parameters","--","--","--","--","--","vector",":","numpy.array","Vector","for","a","word","or","document",".","num_neighbors",":","int","How","many","most","similar","items","to","look","for","?","Returns","--","--","--","-","list","of","(","str",",","float",")","List","of","most","similar","items","in","the","format","`","[","(","item",",","cosine_similarity",")",",","...","]","`","."]
code: def most_similar(self, vector, num_neighbors):
      """Find the approximate `num_neighbors` most similar items.
  
      Parameters
      ----------
      vector : numpy.array
          Vector for a word or document.
      num_neighbors : int
          How many most similar items to look for?
  
      Returns
      -------
      list of (str, float)
          List of most similar items in the format `[(item, cosine_similarity), ... ]`.
  
      """
      ids, distances = self.index.knnQueryBatch(
          vector.reshape(1, -1), k=num_neighbors
      )[0]
  
      # NMSLIB returns cosine distance (not similarity), which is simply `dist = 1 - cossim`.
      # So, convert back to similarities here.
      return [
          (self.labels[id_], 1.0 - distance)
          for id_, distance in zip(ids, distances)
      ]
  
file_path: gensim/gensim/similarities/nmslib.py
imports: from __future__ import absolute_import
  import pickle
  from smart_open import open
  from gensim import utils
  from gensim.models.doc2vec import Doc2Vec
  from gensim.models.word2vec import Word2Vec
  from gensim.models.fasttext import FastText
  from gensim.models import KeyedVectors
label_desc: Use image node_id 8 for calling the NmslibIndexer obj's underlying member method code with example usage: obj.most_similar(vector, num_neighbors) and returns: unknown