notice

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

Version: Main/Unreleased

rasa.nlu.extractors.crf_entity_extractor

CRFEntityExtractorOptions Objects

class CRFEntityExtractorOptions(str, Enum)

Features that can be used for the 'CRFEntityExtractor'.

CRFEntityExtractor Objects

@DefaultV1Recipe.register(
DefaultV1Recipe.ComponentType.ENTITY_EXTRACTOR, is_trainable=True
)
class CRFEntityExtractor(GraphComponent, EntityExtractorMixin)

Implements conditional random fields (CRF) to do named entity recognition.

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]

The component's default config (see parent class for full docstring).

__init__

| __init__(config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, entity_taggers: Optional[Dict[Text, "CRF"]] = None) -> None

Creates an instance of entity extractor.

create

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

Creates a new untrained component (see parent class for full docstring).

required_packages

| @staticmethod
| required_packages() -> List[Text]

Any extra python dependencies required for this component to run.

train

| train(training_data: TrainingData) -> Resource

Trains the extractor on a data set.

process

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

Augments messages with entities.

extract_entities

| extract_entities(message: Message) -> List[Dict[Text, Any]]

Extract entities from the given message using the trained model(s).

load

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

Loads trained component (see parent class for full docstring).

persist

| persist() -> None

Persist this model into the passed directory.