def __init__(self, wiki_filename: str,
                 file_format: str = "hdt",
                 prefixes: Dict[str, Union[str, Dict[str, str]]] = None,
                 rel_q2name_filename: str = None,
                 max_comb_num: int = 1e6,
                 lang: str = "@en", **kwargs) -> None:
        """

        Args:
            wiki_filename: file with Wikidata
            file_format: format of Wikidata file
            lang: Russian or English language
            **kwargs:
        """

        if prefixes is None:
            prefixes = {
                "entity": "http://we",
                "label": "http://wl",
                "alias": "http://wal",
                "description": "http://wd",
                "rels": {
                    "direct": "http://wpd",
                    "no_type": "http://wp",
                    "statement": "http://wps",
                    "qualifier": "http://wpq",
                    "type": "http://wpd/P31"
                },
                "statement": "http://ws"
            }
        self.prefixes = prefixes
        self.file_format = file_format
        self.wiki_filename = str(expand_path(wiki_filename))
        if self.file_format == "hdt":
            self.document = HDTDocument(self.wiki_filename)
        elif self.file_format == "pickle":
            self.document = load_pickle(self.wiki_filename)
            self.parsed_document = {}
        else:
            raise ValueError("Unsupported file format")
        self.used_rels = set()
        self.rel_q2name = dict()
        if rel_q2name_filename:
            if rel_q2name_filename.endswith("json"):
                self.rel_q2name = read_json(str(expand_path(rel_q2name_filename)))
            elif rel_q2name_filename.endswith("pickle"):
                self.rel_q2name = load_pickle(str(expand_path(rel_q2name_filename)))
            else:
                raise ValueError(f"Unsupported file format: {rel_q2name_filename}")

        self.max_comb_num = max_comb_num
        self.lang = lang
        self.replace_tokens = [('"', ''), (self.lang, " "), ('$', ' '), ('  ', ' ')]


        Args:
            wiki_filename: file with Wikidata
            file_format: format of Wikidata file
            lang: Russian or English language
            **kwargs:
        
deeppavlov/models/kbqa/wiki_parser.py