import subprocess

SPACY_LANG_TO_DP_MODEL = {
    # "ca": "ca_core_news_sm",
    # "zh": "zh_core_web_sm",
    # "hr": "hr_core_news_sm",
    # "da": "da_core_news_sm",
    # "nl": "nl_core_news_sm",
    # "en": "en_core_web_sm",
    # "fi": "fi_core_news_sm",
    # "fr": "fr_core_news_sm",
    # "de": "de_core_news_sm",
    # "el": "el_core_news_sm",
    # "it": "it_core_news_sm",
    # "ja": "ja_core_news_sm",
    # "ko": "ko_core_news_sm",
    # "lt": "lt_core_news_sm",
    # "mk": "mk_core_news_sm",
    # "nb": "nb_core_news_sm",
    # "pl": "pl_core_news_sm",
    # "pt": "pt_core_news_sm",
    # "ro": "ro_core_news_sm",
    # "ru": "ru_core_news_sm",
    # "es": "es_core_news_sm",
    # "sv": "sv_core_news_sm",
    # "uk": "uk_core_news_sm",
    "multi": "xx_sent_ud_sm"
}


def download_models():
    for lang, model in SPACY_LANG_TO_DP_MODEL.items():
        subprocess.run(["python3", "-m", "spacy", "download", model])


if __name__ == "__main__":
    download_models()
