from pathlib import Path
import json


def deserialize_wikifier_config(uid: str, pid: str, region_filename: str) -> dict:
    """
    This function reads and deserialize the wikifier config file
    :param uid:
    :param pid:
    :param region_filename:
    :return:
    """
    file_path = str(Path.cwd() / "config" / "uploads" / uid / pid / "wf" / region_filename)
    with open(file_path, 'r') as wikifier_region_config:
        wikifier_config = json.load(wikifier_region_config)
    return wikifier_config