def __init__(self, load_path: str,
                 rel_q2name_filename: str,
                 return_elements: List[str] = None,
                 ranker: Chainer = None,
                 wiki_parser: Optional[WikiParser] = None,
                 batch_size: int = 32,
                 softmax: bool = False,
                 use_api_requester: bool = False,
                 rank: bool = True,
                 nll_rel_ranking: bool = False,
                 nll_path_ranking: bool = False,
                 top_possible_answers: int = -1,
                 top_n: int = 1,
                 pos_class_num: int = 1,
                 rel_thres: float = 0.0,
                 type_rels: List[str] = None, **kwargs):
        """

        Args:
            load_path: path to folder with wikidata files
            rel_q2name_filename: name of file which maps relation id to name
            return_elements: what elements return in output
            ranker: component deeppavlov.models.ranking.rel_ranker
            wiki_parser: component deeppavlov.models.wiki_parser
            batch_size: infering batch size
            softmax: whether to process relation scores with softmax function
            use_api_requester: whether wiki parser will be used as external api
            rank: whether to rank relations or simple copy input
            nll_rel_ranking: whether use components trained with nll loss for relation ranking
            nll_path_ranking: whether use components trained with nll loss for relation path ranking
            top_possible_answers: number of answers returned for a question in each list of candidate answers
            top_n: number of lists of candidate answers returned for a question
            pos_class_num: index of positive class in the output of relation ranking model
            rel_thres: threshold of relation confidence
            type_rels: list of relations in the knowledge base which connect an entity and its type 
            **kwargs:
        """
        super().__init__(save_path=None, load_path=load_path)
        self.rel_q2name_filename = rel_q2name_filename
        self.ranker = ranker
        self.wiki_parser = wiki_parser
        self.batch_size = batch_size
        self.softmax = softmax
        self.return_elements = return_elements or list()
        self.use_api_requester = use_api_requester
        self.rank = rank
        self.nll_rel_ranking = nll_rel_ranking
        self.nll_path_ranking = nll_path_ranking
        self.top_possible_answers = top_possible_answers
        self.top_n = top_n
        self.pos_class_num = pos_class_num
        self.rel_thres = rel_thres
        self.type_rels = type_rels or set()
        self.load()


        Args:
            load_path: path to folder with wikidata files
            rel_q2name_filename: name of file which maps relation id to name
            return_elements: what elements return in output
            ranker: component deeppavlov.models.ranking.rel_ranker
            wiki_parser: component deeppavlov.models.wiki_parser
            batch_size: infering batch size
            softmax: whether to process relation scores with softmax function
            use_api_requester: whether wiki parser will be used as external api
            rank: whether to rank relations or simple copy input
            nll_rel_ranking: whether use components trained with nll loss for relation ranking
            nll_path_ranking: whether use components trained with nll loss for relation path ranking
            top_possible_answers: number of answers returned for a question in each list of candidate answers
            top_n: number of lists of candidate answers returned for a question
            pos_class_num: index of positive class in the output of relation ranking model
            rel_thres: threshold of relation confidence
            type_rels: list of relations in the knowledge base which connect an entity and its type 
            **kwargs:
        
deeppavlov/models/kbqa/rel_ranking_infer.py