class_docstr: Class which defines answer types for the question
docstr: Args:
      lang: Russian or English
      types_filename: filename with dictionary where keys are type ids and values are type labels
      types_sets_filename: filename with dictionary where keys are NER tags and values are Wikidata types
          corresponding to tags
      num_types_to_return: how many answer types to return for each question
      **kwargs:
code: def __init__(
      self,
      lang: str,
      types_filename: str,
      types_sets_filename: str,
      num_types_to_return: int = 15,
      **kwargs,
  ):
      """
  
      Args:
          lang: Russian or English
          types_filename: filename with dictionary where keys are type ids and values are type labels
          types_sets_filename: filename with dictionary where keys are NER tags and values are Wikidata types
              corresponding to tags
          num_types_to_return: how many answer types to return for each question
          **kwargs:
      """
      self.lang = lang
      self.types_filename = str(expand_path(types_filename))
      self.types_sets_filename = str(expand_path(types_sets_filename))
      self.num_types_to_return = num_types_to_return
      if self.lang == "@en":
          self.stopwords = set(stopwords.words("english"))
          self.nlp = spacy.load("en_core_web_sm")
          self.pronouns = ["what"]
      elif self.lang == "@ru":
          self.stopwords = set(stopwords.words("russian"))
          self.nlp = spacy.load("ru_core_news_sm")
          self.pronouns = ["какой", "каком"]
      with open(self.types_filename, "rb") as fl:
          self.types_dict = pickle.load(fl)
      with open(self.types_sets_filename, "rb") as fl:
          self.types_sets = pickle.load(fl)
  
file_path: DeepPavlov/deeppavlov/models/kbqa/type_define.py
imports: import pickle
  from typing import List
  import spacy
  from nltk.corpus import stopwords
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.registry import register
label_desc: Use image node_id 1 to create a new AnswerTypesExtractor object  with example: obj = AnswerTypesExtractor(lang, types_filename, types_sets_filename, num_types_to_return)