import re


def get_preferred_weather(request: str, weather_dict: dict) -> str:
    """Extract a weather type from user's request.

    :param request: a human utterance
    :type request: str
    :param weather_dict: a dictionary containing aliases for weather types
    :type weather_dict: dict
    :return: a weather type or an empty string if the extraction failed
    :rtype: str
    """
    preferred_weather = ""
    for weather in weather_dict.keys():
        synonyms = "|".join([f"({s})" for s in weather_dict[weather]["synonyms"]])
        re_weather = rf".*({synonyms})([\s,\.]+|$)"
        if re.match(re_weather, request.lower()):
            preferred_weather = weather
    return preferred_weather