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","''"]
code: def search(self, word: str):
      word = self.nlp(word)[0].lemma_
      if word in self.adj_set:
          q_matrix = self.make_sparse_matrix([word])
          scores = q_matrix * self.matrix
          scores = np.squeeze(scores.toarray())
          indices = np.argsort(-scores)[: self.candidate_nouns]
          scores = list(scores[indices])
          candidates = [
              self.nouns_with_freq[indices[i]] + (scores[i],)
              for i in range(len(indices))
          ]
          candidates = [
              cand
              for cand in candidates
              if cand[0][:3].lower() == word[:3].lower()
          ]
          candidates = sorted(
              candidates, key=lambda x: (x[2], x[1]), reverse=True
          )
          log.debug(f"AdjToNoun, found nouns: {candidates}")
          if (
              candidates
              and candidates[0][1] > self.freq_thres
              and candidates[0][2] > self.score_thres
          ):
              return candidates[0][0]
      return ""
  
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 2 for calling the RuAdjToNoun obj's underlying member method code with example usage: obj.search(word) and returns: str, candidates