from pathlib import Path
import json


def load_decoder_parameters(path):
    """
    Load Decoder parameters

    Parameters
    ----------
        path : str
            Directory path

    Returns
    -------

        decode: Dict
            Decode parameters
    """
    out_dir = Path(path, "dataset")

    file_name = Path(out_dir, "decode.json").as_posix()
    with open(file_name) as json_file:
        decode = json.load(json_file)

    return decode