notice

This is documentation for Rasa Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).

Version: 2.x

rasa.nlu.featurizers.sparse_featurizer.lexical_syntactic_featurizer

LexicalSyntacticFeaturizer Objects

class LexicalSyntacticFeaturizer(SparseFeaturizer)

Creates features for entity extraction.

Moves with a sliding window over every token in the user message and creates features according to the configuration.

__init__

| __init__(component_config: Dict[Text, Any], feature_to_idx_dict: Optional[Dict[Text, Any]] = None)

Creates a LexicalSyntacticFeaturizer.

Arguments:

  • component_config - Component config as defined in config.yml
  • feature_to_idx_dict - Prepared feature to idx for loading from disk

load

| @classmethod
| load(cls, meta: Dict[Text, Any], model_dir: Text, model_metadata: Optional[Metadata] = None, cached_component: Optional["LexicalSyntacticFeaturizer"] = None, **kwargs: Any, ,) -> "LexicalSyntacticFeaturizer"

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

persist

| persist(file_name: Text, model_dir: Text) -> Optional[Dict[Text, Any]]

Persist this model into the passed directory.

Return the metadata necessary to load the model again.