spacyr
spacyr copied to clipboard
`spacy_install()` fails with multiple lang_models
According to the spacy_install()
documentation, one can provide a vector of multiple lang_models if you'd like multiple installed at once. But the code in spacy_download_langmodel()
can't handle this case. This check fails when length(lang_models) > 1
:
https://github.com/quanteda/spacyr/blob/1ce545812b7307ecbcc5d19c8695d54dd541c429/R/spacy_langmodel_functions.R#L23-L26
Specifically, installation ends with:
Error in if (!force & py_check_installed(lang_models)) { :
the condition has length > 1
presumably because it should be all(py_check_installed(lang_models))
to account for the case with multiple lang_models.