class_docstr: Wrapper for fastText embeddings.
class_docstr_tok: ["Wrapper","for","fastText","embeddings","."]
docstr: Create filepath at which to save a downloaded
  fasttext model.
  
  .. todo::
     Do better than test for just name. Try trimming up to user home dir.
  
  >>> from cltk.embeddings.embeddings import FastTextEmbeddings  # doctest: +SKIP
  >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", silent=True)  # doctest: +SKIP
  >>> vec_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
  >>> os.path.split(vec_fp)[1]  # doctest: +SKIP
  'wiki.la.vec'
  >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", training_set="bin", silent=True)  # doctest: +SKIP
  >>> bin_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
  >>> os.path.split(bin_fp)[1]  # doctest: +SKIP
  'wiki.la.bin'
  >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", training_set="common_crawl", model_type="vec", silent=True)  # doctest: +SKIP
  >>> os.path.split(vec_fp)[1]  # doctest: +SKIP
  'cc.la.300.vec'
  >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", training_set="common_crawl", model_type="bin", silent=True)  # doctest: +SKIP
  >>> bin_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
  >>> vec_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
  >>> os.path.split(bin_fp)[1]  # doctest: +SKIP
  'cc.la.300.bin'
code: def _build_fasttext_filepath(self):
      """Create filepath at which to save a downloaded
      fasttext model.
  
      .. todo::
         Do better than test for just name. Try trimming up to user home dir.
  
      >>> from cltk.embeddings.embeddings import FastTextEmbeddings  # doctest: +SKIP
      >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", silent=True)  # doctest: +SKIP
      >>> vec_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
      >>> os.path.split(vec_fp)[1]  # doctest: +SKIP
      'wiki.la.vec'
      >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", training_set="bin", silent=True)  # doctest: +SKIP
      >>> bin_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
      >>> os.path.split(bin_fp)[1]  # doctest: +SKIP
      'wiki.la.bin'
      >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", training_set="common_crawl", model_type="vec", silent=True)  # doctest: +SKIP
      >>> os.path.split(vec_fp)[1]  # doctest: +SKIP
      'cc.la.300.vec'
      >>> embeddings_obj = FastTextEmbeddings(iso_code="lat", training_set="common_crawl", model_type="bin", silent=True)  # doctest: +SKIP
      >>> bin_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
      >>> vec_fp = embeddings_obj._build_fasttext_filepath()  # doctest: +SKIP
      >>> os.path.split(bin_fp)[1]  # doctest: +SKIP
      'cc.la.300.bin'
      """
      fasttext_code = MAP_LANGS_CLTK_FASTTEXT[self.iso_code]
  
      fp_model = None
      if self.training_set == "wiki":
          fp_model = os.path.join(
              CLTK_DATA_DIR,
              self.iso_code,
              "embeddings",
              "fasttext",
              f"wiki.{fasttext_code}.{self.model_type}",
          )
      elif self.training_set == "common_crawl":
          fp_model = os.path.join(
              CLTK_DATA_DIR,
              self.iso_code,
              "embeddings",
              "fasttext",
              f"cc.{fasttext_code}.300.{self.model_type}",
          )
      else:
          raise CLTKException(
              f"Unexpected ``training_set`` ``{self.training_set}``."
          )
      return fp_model
  
imports: import os
  from typing import List
  from zipfile import ZipFile
  from gensim import models
  from cltk.core.cltk_logger import logger
  from cltk.core.exceptions import CLTKException, UnimplementedAlgorithmError
  from cltk.data.fetch import FetchCorpus
  from cltk.languages.utils import get_lang
  from cltk.utils import CLTK_DATA_DIR, get_file_with_progress_bar, query_yes_no
  from cltk.utils.file_operations import make_cltk_path
label_desc: Use image node_id 10 for calling the FastTextEmbeddings obj's underlying member method code with example usage: obj._build_fasttext_filepath() and returns: fp_model