medcat.tokenizing.spacy_impl.utils
Functions:
-
ensure_spacy_model–Ensure the specified spacy model exists.
-
has_spacy_model–Checks if the spacy model is available.
Attributes:
-
logger–
ensure_spacy_model
ensure_spacy_model(model_name: str) -> None
Ensure the specified spacy model exists.
If the model does not currently exist, it will attempt downloading it.
Parameters:
-
(model_namestr) –The spacy model name.
Source code in medcat-v2/medcat/tokenizing/spacy_impl/utils.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
has_spacy_model
has_spacy_model(model_name: str) -> bool
Checks if the spacy model is available.
Parameters:
-
(model_namestr) –The model name.
Returns:
-
bool(bool) –True if the model is available, False otherwise.
Source code in medcat-v2/medcat/tokenizing/spacy_impl/utils.py
8 9 10 11 12 13 14 15 16 17 18 | |