def extract_split_from_filename(file_name):
    """Extract the split from the filename.

    Args:
        file_name: JSON path to the split
    Return:
        split: Name of the split (train | dev | devtest | test)
    """
    for split in ("train", "devtest", "dev", "test"):
        if split in file_name.split('/')[-1]:
            return split