class_docstr: This class allows the use of `Annoy <https://github.com/spotify/annoy>`_ for fast (approximate)
  vector retrieval in `most_similar()` calls of
  :class:`~gensim.models.word2vec.Word2Vec`, :class:`~gensim.models.doc2vec.Doc2Vec`,
  :class:`~gensim.models.fasttext.FastText` and :class:`~gensim.models.keyedvectors.Word2VecKeyedVectors` models.
class_docstr_tok: ["This","class","allows","the","use","of","`","Annoy","<","https",":","\/\/github.com\/spotify\/annoy",">","`","_","for","fast","(","approximate",")","vector","retrieval","in","`","most_similar","(",")","`","calls","of",":","class",":","`","~gensim.models.word2vec.Word2Vec","`",",",":","class",":","`","~gensim.models.doc2vec.Doc2Vec","`",",",":","class",":","`","~gensim.models.fasttext.FastText","`","and",":","class",":","`","~gensim.models.keyedvectors.Word2VecKeyedVectors","`","models","."]
docstr: Save AnnoyIndexer instance to disk.
  
  Parameters
  ----------
  fname : str
      Path to output. Save will produce 2 files:
      `fname`: Annoy index itself.
      `fname.dict`: Index metadata.
  protocol : int, optional
      Protocol for pickle.
  
  Notes
  -----
  This method saves **only the index**. The trained model isn't preserved.
docstr_tok: ["Save","AnnoyIndexer","instance","to","disk",".","Parameters","--","--","--","--","--","fname",":","str","Path","to","output",".","Save","will","produce","2","files",":","`","fname","`",":","Annoy","index","itself",".","`","fname.dict","`",":","Index","metadata",".","protocol",":","int",",","optional","Protocol","for","pickle",".","Notes","--","--","-","This","method","saves","*","*","only","the","index","*","*",".","The","trained","model","is","n't","preserved","."]
code: def save(self, fname, protocol=utils.PICKLE_PROTOCOL):
      """Save AnnoyIndexer instance to disk.
  
      Parameters
      ----------
      fname : str
          Path to output. Save will produce 2 files:
          `fname`: Annoy index itself.
          `fname.dict`: Index metadata.
      protocol : int, optional
          Protocol for pickle.
  
      Notes
      -----
      This method saves **only the index**. The trained model isn't preserved.
  
      """
      self.index.save(fname)
      d = {
          "f": self.model.vector_size,
          "num_trees": self.num_trees,
          "labels": self.labels,
      }
      with utils.open(fname + ".dict", "wb") as fout:
          _pickle.dump(d, fout, protocol=protocol)
  
file_path: gensim/gensim/similarities/annoy.py
imports: from __future__ import absolute_import
  import os
  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 2 for calling the AnnoyIndexer obj's underlying member method code with example usage: obj.save(fname, protocol) without return types