from typing import Dict


def get_default_result_dict(dir: str, data_name: str, index_name: str, fea_name: str) -> Dict:
    """
    Get the default result dict based on the experimental factors.

    Args:
        dir (str): the path of one single extracted feature directory.
        data_name (str): the name of the dataset.
        index_name (str): the name of query process.
        fea_name (str): the name of the features to be loaded.

    Returns:
        result_dict (Dict): a default configuration dict.
    """
    result_dict = {
        "data_name": data_name.split("_")[0],
        "pre_process_name": dir.split("_")[2],
        "model_name": "_".join(dir.split("_")[-2:]),
        "feature_map_name": fea_name.split("_")[0],
        "post_process_name": index_name
    }

    if len(fea_name.split("_")) == 1:
        result_dict["aggregator_name"] = "none"
    else:
        result_dict["aggregator_name"] = fea_name.split("_")[1]

    return result_dict