def __init__(self, wiki_parser: WikiParser,
                 rel_ranker: RelRankerInfer,
                 entities_to_leave: int = 5,
                 types_to_leave: int = 2,
                 rels_to_leave: int = 7,
                 max_comb_num: int = 10000,
                 gold_query_info: Dict[str, str] = None,
                 map_query_str_to_kb: List[Tuple[str, str]] = None,
                 return_answers: bool = True, *args, **kwargs) -> None:
        """

        Args:
            wiki_parser: component deeppavlov.models.kbqa.wiki_parser
            rel_ranker: component deeppavlov.models.kbqa.rel_ranking_infer
            entities_to_leave: how many entities to leave after entity linking
            types_to_leave: how many types to leave after entity linking
            rels_to_leave: how many relations to leave after relation ranking
            max_comb_num: the maximum number of combinations of candidate entities and relations
            gold_query_info: dict of variable names used for formatting output sparql queries
            map_query_str_to_kb: mapping of knowledge base prefixes to full https
            return_answers: whether to return answers or candidate relations and answers for further ranking
            **kwargs:
        """
        self.wiki_parser = wiki_parser
        self.rel_ranker = rel_ranker
        self.entities_to_leave = entities_to_leave
        self.types_to_leave = types_to_leave
        self.rels_to_leave = rels_to_leave
        self.max_comb_num = max_comb_num
        self.gold_query_info = gold_query_info
        self.map_query_str_to_kb = map_query_str_to_kb
        self.return_answers = return_answers
        self.replace_tokens = [("wdt:p", "wdt:P"), ("pq:p", "pq:P")]
        super().__init__(wiki_parser=self.wiki_parser, rel_ranker=self.rel_ranker,
                         entities_to_leave=self.entities_to_leave, rels_to_leave=self.rels_to_leave,
                         *args, **kwargs)


        Args:
            wiki_parser: component deeppavlov.models.kbqa.wiki_parser
            rel_ranker: component deeppavlov.models.kbqa.rel_ranking_infer
            entities_to_leave: how many entities to leave after entity linking
            types_to_leave: how many types to leave after entity linking
            rels_to_leave: how many relations to leave after relation ranking
            max_comb_num: the maximum number of combinations of candidate entities and relations
            gold_query_info: dict of variable names used for formatting output sparql queries
            map_query_str_to_kb: mapping of knowledge base prefixes to full https
            return_answers: whether to return answers or candidate relations and answers for further ranking
            **kwargs:
        
deeppavlov/models/kbqa/query_generator.py