Beispiel #1
0
def create_component_by_name(component_name, config):
    # type: (Text, Dict[Text, Any]) -> Optional[Component]
    """Resolves a components name and calls it's create method to init it based on a previously persisted model."""
    from rasa_nlu.components import create_component

    component_clz = get_component_class(component_name)
    return create_component(component_clz, config)
Beispiel #2
0
def create_component_by_name(component_name, config):
    # type: (Text, Dict[Text, Any]) -> Optional[Component]
    """Resolves a components name and calls it's load method to init it based on a previously persisted model."""
    from rasa_nlu.components import create_component

    component_clz = get_component_class(component_name)
    return create_component(component_clz, config)
Beispiel #3
0
def test_create_can_handle_none():
    assert create_component(None, {}) is None
Beispiel #4
0
def test_create_can_handle_none():
    assert create_component(None, {}) is None