LanguageSpec#
- class scikitplot.cleanprompt.LanguageSpec(code, name, genre, sizes)[source]#
One language spaCy publishes models for.
- Parameters:
- codestr
ISO 639-1 code.
- namestr
English name of the language, for help text and reports.
- genrestr
"web"or"news"; part of the model name.- sizestuple of str
Sizes actually published for this language.
- Parameters:
- model_for(size)[source]#
Return the model name for
size, falling back to the nearest.- Parameters:
- sizestr
Preferred size.
- Returns:
- str
A model name this language actually publishes.
- Parameters:
size (str)
- Return type:
Notes
Developer notes. Falls back downwards to the largest available size no bigger than the request, and only upwards when nothing smaller exists. Asking for
lgon a language that publishes onlysmshould getsm, not a name that does not resolve.