コード例 #1
0
ファイル: registry.py プロジェクト: dhpollack/rasa_nlu
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)
コード例 #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)
コード例 #3
0
ファイル: test_components.py プロジェクト: verloop/rasa_nlu
def test_create_can_handle_none():
    assert create_component(None, {}) is None
コード例 #4
0
ファイル: test_components.py プロジェクト: dhpollack/rasa_nlu
def test_create_can_handle_none():
    assert create_component(None, {}) is None