class_docstr: Constructs an EmbeddingTokenizer.
      
class_docstr_tok: ["Constructs","an","EmbeddingTokenizer","."]
docstr: Save the tokenizer vocabulary to a directory or file.
docstr_tok: ["Save","the","tokenizer","vocabulary","to","a","directory","or","file","."]
code: def save_pretrained(self, vocab_path):
      """Save the tokenizer vocabulary to a directory or file."""
      index = 0
      if os.path.isdir(vocab_path):
          vocab_file = os.path.join(vocab_path, "vocab.txt")
      else:
          vocab_file = vocab_path
      with open(vocab_file, "w", encoding="utf-8") as writer:
          for token, token_index in sorted(
              self.vocab.items(), key=lambda kv: kv[1]
          ):
              if index != token_index:
                  logger.warning(
                      "Saving vocabulary to {}: vocabulary indices are not consecutive."
                      " Please check that the vocabulary is not corrupted!".format(
                          vocab_file
                      )
                  )
                  index = token_index
              writer.write(token + "\n")
              index += 1
      return (vocab_file,)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import collections
  import json
  import logging
  import os
  import re
  from pathlib import Path
  import numpy
  from transformers import AlbertTokenizer, AlbertTokenizerFast, BertTokenizer, BertTokenizerFast, DistilBertTokenizer, DistilBertTokenizerFast, ElectraTokenizer, ElectraTokenizerFast, RobertaTokenizer, RobertaTokenizerFast, XLMRobertaTokenizer, XLMRobertaTokenizerFast, XLNetTokenizer, XLNetTokenizerFast, CamembertTokenizer, CamembertTokenizerFast, DPRContextEncoderTokenizer, DPRContextEncoderTokenizerFast, DPRQuestionEncoderTokenizer, DPRQuestionEncoderTokenizerFast, BigBirdTokenizer, BigBirdTokenizerFast
  from transformers.models.bert.tokenization_bert import load_vocab
  from transformers.tokenization_utils import PreTrainedTokenizer
  from transformers import AutoConfig
  from farm.data_handler.samples import SampleBasket
  from farm.modeling.wordembedding_utils import load_from_cache, EMBEDDING_VOCAB_FILES_MAP, run_split_on_punc
label_desc: Use image node_id 5 for calling the EmbeddingTokenizer obj's underlying member method code with example usage: obj.save_pretrained(vocab_path) and returns: vocab_file