class_docstr: Class to use fasttext inside FARM by converting embeddings to format usable by preprocessing pipeline.
  Farm needs fixed vocab and embeddings. We can construct a vocab for the data we wish to embed.
class_docstr_tok: ["Class","to","use","fasttext","inside","FARM","by","converting","embeddings","to","format","usable","by","preprocessing","pipeline",".","Farm","needs","fixed","vocab","and","embeddings",".","We","can","construct","a","vocab","for","the","data","we","wish","to","embed","."]
docstr: :param pretrained_model_name_or_path: path to local model or pointer to s3
  :param do_lower_case: casing information, should match the vocab
  :param data_path: path to where data is stored
  :param train_filename:
  :param output_path: path where the embeddings (now in word2vec format) are stored
  :param language:
  :param sep: seperator used in train file
  :param text_column_name: column where the text for
  :param max_inputdata_rows: limits the amount of rows to read from data for constructing the vocab
  :param min_vocab_count: when constructing the vocab, words with less than min_vocab_count occurrences are ignored
  :param max_features: maximum number of words to use in vocab
docstr_tok: [":","param","pretrained_model_name_or_path",":","path","to","local","model","or","pointer","to","s3",":","param","do_lower_case",":","casing","information",",","should","match","the","vocab",":","param","data_path",":","path","to","where","data","is","stored",":","param","train_filename",":",":","param","output_path",":","path","where","the","embeddings","(","now","in","word2vec","format",")","are","stored",":","param","language",":",":","param","sep",":","seperator","used","in","train","file",":","param","text_column_name",":","column","where","the","text","for",":","param","max_inputdata_rows",":","limits","the","amount","of","rows","to","read","from","data","for","constructing","the","vocab",":","param","min_vocab_count",":","when","constructing","the","vocab",",","words","with","less","than","min_vocab_count","occurrences","are","ignored",":","param","max_features",":","maximum","number","of","words","to","use","in","vocab"]
code: def __init__(
      self,
      pretrained_model_name_or_path,
      do_lower_case,
      data_path,
      train_filename,
      output_path,
      language=None,
      sep="\t",
      text_column_name="text",
      max_inputdata_rows=None,
      min_vocab_count=None,
      max_features=None,
  ):
      """
      :param pretrained_model_name_or_path: path to local model or pointer to s3
      :param do_lower_case: casing information, should match the vocab
      :param data_path: path to where data is stored
      :param train_filename:
      :param output_path: path where the embeddings (now in word2vec format) are stored
      :param language:
      :param sep: seperator used in train file
      :param text_column_name: column where the text for
      :param max_inputdata_rows: limits the amount of rows to read from data for constructing the vocab
      :param min_vocab_count: when constructing the vocab, words with less than min_vocab_count occurrences are ignored
      :param max_features: maximum number of words to use in vocab
      """
      try:
          import fasttext  # fasttext import is optional in requirements. So we just load it when needed.
      except ModuleNotFoundError:
          logger.error(
              "Could not find fasttext. Please install through 'pip install fasttext==0.9.1'."
          )
  
      self.pretrained_model_name_or_path = pretrained_model_name_or_path
      self.do_lower_case = do_lower_case
      self.data_path = data_path
      self.train_filename = train_filename
      self.output_path = output_path
      self.language = language
      self.sep = sep
      self.text_column_name = text_column_name
      self.max_inputdata_rows = max_inputdata_rows
      self.min_vocab_count = min_vocab_count
      self.max_features = max_features
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import io
  import json
  import logging
  import os
  import unicodedata
  from pathlib import Path
  import numpy
  import pandas
  from tqdm import tqdm
  from transformers import BertTokenizer
  from sklearn.decomposition import TruncatedSVD
  from sklearn.cluster import KMeans
  from collections import Counter
  from farm.file_utils import load_from_cache
label_desc: Use image node_id 1 to create a new Fasttext_converter object  with example: obj = Fasttext_converter(pretrained_model_name_or_path, do_lower_case, data_path, train_filename, output_path, language, sep, text_column_name, max_inputdata_rows, min_vocab_count, max_features)