EngineReadiness#

class scikitplot.cleanprompt.EngineReadiness(name, installed, language_supported, assets_checked, assets_ready, ready, status, reason, remedy, model=None, missing=(), version=None)[source]#

Whether one engine can run here, now, and if not, the one step that fixes it.

Parameters:
namestr

Engine name, as used by --ner-engine.

installedbool

Whether the engine’s capability tier reports AVAILABLE: the package is installed, inside the declared range, and importable according to its metadata.

language_supportedbool

Whether the engine handles the language asked for.

assets_checkedbool

Whether the engine’s data was looked at. False only for NLTK when the caller chose not to import it (see the notes).

assets_readybool or None

Whether the model or data packages are present; None when they were not checked.

readybool

installed and language_supported and assets_ready is not False — nothing known stands in the way of running.

statusstr

A CapabilityStatus value describing the first obstacle, or "AVAILABLE".

reasonstr

One sentence saying what was found.

remedystr

The command or flag that removes the first obstacle; empty when ready.

modelstr or None

For spaCy, the model this configuration loads; otherwise None.

missingtuple of str

For NLTK, the data packages that were not found.

versionstr or None

The installed distribution version, when known.

Parameters:

Notes

User notes. Read ready to decide, and remedy to act. reason is for a person: it says which of the three conditions failed.

Developer notes — why NLTK’s data may be unchecked. spaCy models are ordinary installed distributions, so their presence is read from metadata without importing anything. NLTK’s data packages live in directories that only nltk.data.find can resolve — the search path depends on environment variables, the interpreter prefix and the platform, and copying that logic here would be a guess about NLTK’s internals. So the check imports NLTK, and it runs only where the caller is about to load NLTK anyway: an explicit request, doctor, or the web app with entity detection switched on. Everywhere else the field says None rather than pretending to know.

as_dict()[source]#

Return a JSON-safe dictionary.

Return type:

dict[str, Any]

assets_checked: bool[source]#
assets_ready: bool | None[source]#
installed: bool[source]#
language_supported: bool[source]#
missing: tuple[str, ...] = ()#
model: str | None = None#
name: str[source]#
ready: bool[source]#
reason: str[source]#
remedy: str[source]#
status: str[source]#
version: str | None = None#