Version: 3.x


MitieModel Objects

class MitieModel()

Wraps MitieNLP output to make it fingerprintable.


| __init__(model_path: Path, word_feature_extractor: Optional["mitie.total_word_feature_extractor"] = None) -> None

Initializing MitieModel.


| fingerprint() -> Text

Fingerprints the model path.

Use a static fingerprint as we assume this only changes if the file path changes and want to avoid investigating the model in greater detail for now.


Fingerprint for model.

MitieNLP Objects

DefaultV1Recipe.ComponentType.MODEL_LOADER, is_trainable=False
class MitieNLP(GraphComponent)

Component which provides the common configuration and loaded model to others.

This is used to avoid loading the Mitie model multiple times. Instead the Mitie model is only loaded once and then shared by depending components.


| @staticmethod
| get_default_config() -> Dict[Text, Any]

Returns default config (see parent class for full docstring).


| __init__(path_to_model_file: Path, extractor: Optional["mitie.total_word_feature_extractor"] = None) -> None

Constructs a new language model from the MITIE framework.


| @classmethod
| required_packages(cls) -> List[Text]

Lists required dependencies (see parent class for full docstring).


| @classmethod
| create(cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext) -> MitieNLP

Creates component (see parent class for full docstring).


| provide() -> MitieModel

Provides loaded MitieModel and path during training and inference.