class_docstr: Class for converting an adjective in Russian to the corresponding noun, for example:
  "московский" -> "Москва", "африканский" -> "Африка"
class_docstr_tok: ["Class","for","converting","an","adjective","in","Russian","to","the","corresponding","noun",",","for","example",":","''","\u043c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u0438\u0439","''","-",">","``","\u041c\u043e\u0441\u043a\u0432\u0430","''",",","``","\u0430\u0444\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u0439","''","-",">","``","\u0410\u0444\u0440\u0438\u043a\u0430","''"]
docstr: Args:
      freq_dict_filename: file with the dictionary of Russian words with the corresponding frequencies
      candidate_nouns: how many candidate nouns to leave after search
      **kwargs:
docstr_tok: ["Args",":","freq_dict_filename",":","file","with","the","dictionary","of","Russian","words","with","the","corresponding","frequencies","candidate_nouns",":","how","many","candidate","nouns","to","leave","after","search","*","*","kwargs",":"]
code: def __init__(
      self,
      freq_dict_filename: str,
      candidate_nouns: int = 10,
      freq_thres: float = 4.5,
      score_thres: float = 2.8,
      **kwargs,
  ):
      """
  
      Args:
          freq_dict_filename: file with the dictionary of Russian words with the corresponding frequencies
          candidate_nouns: how many candidate nouns to leave after search
          **kwargs:
      """
      self.candidate_nouns = candidate_nouns
      self.freq_thres = freq_thres
      self.score_thres = score_thres
      alphabet = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя-"
      self.alphabet_length = len(alphabet)
      self.max_word_length = 24
      self.letter_nums = {
          letter: num for num, letter in enumerate(alphabet)
      }
      with open(str(expand_path(freq_dict_filename)), "r") as fl:
          lines = fl.readlines()
      pos_freq_dict = defaultdict(list)
      for line in lines:
          line_split = line.strip("\n").split("\t")
          if re.match("[\d]+\.[\d]+", line_split[2]):
              pos_freq_dict[line_split[1]].append(
                  (line_split[0], float(line_split[2]))
              )
      self.nouns_with_freq = pos_freq_dict["s.PROP"]
      self.adj_set = set([word for word, freq in pos_freq_dict["a"]])
      self.nouns = [noun[0] for noun in self.nouns_with_freq]
      self.matrix = self.make_sparse_matrix(self.nouns).transpose()
      self.nlp = spacy.load("ru_core_news_sm")
  
file_path: DeepPavlov/deeppavlov/models/kbqa/ru_adj_to_noun.py
imports: import re
  from collections import defaultdict
  from logging import getLogger
  from typing import List
  import numpy
  import spacy
  from scipy.sparse import csr_matrix
  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 RuAdjToNoun object  with example: obj = RuAdjToNoun(freq_dict_filename, candidate_nouns, freq_thres, score_thres)