notice

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

Version: Master/Unreleased

rasa.nlu.classifiers.mitie_intent_classifier

MitieIntentClassifierGraphComponent Objects

class MitieIntentClassifierGraphComponent(GraphComponent, IntentClassifier2)

Intent classifier which uses the mitie library.

required_components

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

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

get_default_config

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

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

__init__

def __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
def required_packages(cls) -> List[Text]

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

train

def 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

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

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
def create(cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext) -> MitieIntentClassifierGraphComponent

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

load

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

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