def __init__(self, template_matcher: TemplateMatcher,
                 rel_ranker: RelRankerInfer,
                 load_path: str,
                 sparql_queries_filename: str,
                 entity_linker: EntityLinker,
                 rels_in_ranking_queries_fname: str = None,
                 wiki_parser=None,
                 entities_to_leave: int = 5,
                 rels_to_leave: int = 7,
                 syntax_structure_known: bool = False,
                 use_wp_api_requester: bool = False,
                 use_el_api_requester: bool = False,
                 use_alt_templates: bool = True,
                 delete_rel_prefix: bool = True,
                 kb_prefixes: Dict[str, str] = None, *args, **kwargs) -> None:
        """

        Args:
            template_matcher: component deeppavlov.models.kbqa.template_matcher
            rel_ranker: component deeppavlov.models.kbqa.rel_ranking_infer
            load_path: path to folder with wikidata files
            sparql_queries_filename: file with sparql query templates
            entity_linker: component deeppavlov.models.entity_extraction.entity_linking for linking of entities
            rels_in_ranking_queries_fname: file with list of rels in queries for questions with ranking
            wiki_parser: component deeppavlov.models.kbqa.wiki_parser
            entities_to_leave: how many entities to leave after entity linking
            rels_to_leave: how many relations to leave after relation ranking
            syntax_structure_known: if syntax tree parser was used to define query template type
            use_wp_api_requester: whether deeppavlov.models.api_requester.api_requester component will be used for
                Wiki Parser
            use_el_api_requester: whether deeppavlov.models.api_requester.api_requester component will be used for
                Entity Linking
            use_alt_templates: whether to use alternative templates if no answer was found for default query template
            delete_rel_prefix: whether to delete prefix in relations
            kb_prefixes: prefixes for entities, relations and types in the knowledge base
        """
        super().__init__(save_path=None, load_path=load_path)
        self.template_matcher = template_matcher
        self.entity_linker = entity_linker
        self.wiki_parser = wiki_parser
        self.rel_ranker = rel_ranker
        self.rels_in_ranking_queries_fname = rels_in_ranking_queries_fname
        self.rels_in_ranking_queries = {}
        self.entities_to_leave = entities_to_leave
        self.rels_to_leave = rels_to_leave
        self.syntax_structure_known = syntax_structure_known
        self.use_wp_api_requester = use_wp_api_requester
        self.use_el_api_requester = use_el_api_requester
        self.use_alt_templates = use_alt_templates
        self.sparql_queries_filename = sparql_queries_filename
        self.delete_rel_prefix = delete_rel_prefix
        self.kb_prefixes = kb_prefixes

        self.load()


        Args:
            template_matcher: component deeppavlov.models.kbqa.template_matcher
            rel_ranker: component deeppavlov.models.kbqa.rel_ranking_infer
            load_path: path to folder with wikidata files
            sparql_queries_filename: file with sparql query templates
            entity_linker: component deeppavlov.models.entity_extraction.entity_linking for linking of entities
            rels_in_ranking_queries_fname: file with list of rels in queries for questions with ranking
            wiki_parser: component deeppavlov.models.kbqa.wiki_parser
            entities_to_leave: how many entities to leave after entity linking
            rels_to_leave: how many relations to leave after relation ranking
            syntax_structure_known: if syntax tree parser was used to define query template type
            use_wp_api_requester: whether deeppavlov.models.api_requester.api_requester component will be used for
                Wiki Parser
            use_el_api_requester: whether deeppavlov.models.api_requester.api_requester component will be used for
                Entity Linking
            use_alt_templates: whether to use alternative templates if no answer was found for default query template
            delete_rel_prefix: whether to delete prefix in relations
            kb_prefixes: prefixes for entities, relations and types in the knowledge base
        
deeppavlov/models/kbqa/query_generator_base.py