notice

This is unreleased documentation for Rasa Open Source Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased

rasa.nlu.classifiers.mitie_intent_classifier

MitieIntentClassifier Objects

@DefaultV1Recipe.register(
DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER,
is_trainable=True,
model_from="MitieNLP",
)
class MitieIntentClassifier(GraphComponent, IntentClassifier)

Intent classifier which uses the mitie library.

required_components

| @classmethod
| required_components(cls) -> List[Type]

Components that should be included in the pipeline before this component.

get_default_config

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

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

__init__

| __init__(config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, clf: Optional["mitie.text_categorizer"] = None) -> None

Constructs a new intent classifier using the MITIE framework.

required_packages

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

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

train

| train(training_data: TrainingData, model: MitieModel) -> Resource

Trains classifier.

Arguments:

  • training_data - The NLU training data.
  • model - The loaded mitie model provided by MitieNLP.

Returns:

The resource locator for the trained classifier.

process

| process(messages: List[Message], model: MitieModel) -> List[Message]

Make intent predictions using mitie.

Arguments:

  • messages - The message which the intents should be predicted for.
  • model - The loaded mitie model provided by MitieNLP.

create

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

Creates component for training see parent class for full docstring).

load

| @classmethod
| load(cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, **kwargs: Any, ,) -> MitieIntentClassifier

Loads component for inference see parent class for full docstring).