コード例 #1
0
def nlp():
    the_nlp = NaturalLanguageProcessor(APP_PATH)
    try:
        the_nlp.load()
    except ClassifierLoadError as exc:
        raise ClassifierLoadError(
            "Could not load app. Have you built the models? "
            "Run 'python -m {} build' to do so.".format(
                os.path.split(APP_PATH[1]))) from exc
    return the_nlp
コード例 #2
0
def diaglogflow_nlp(mindmeld_project_path2):
    nlp = NaturalLanguageProcessor(mindmeld_project_path2)
    nlp.build()
    return nlp
コード例 #3
0
def skill_nlp(skill_dir) -> NaturalLanguageProcessor:  # pylint: disable=redefined-outer-name
    """Provides a built processor instance"""
    nlp = NaturalLanguageProcessor(app_path=skill_dir)
    nlp.build()
    nlp.dump()
    return nlp
コード例 #4
0
def rasa_nlp(rasa_converter, mindmeld_rasa_converter_app_path):
    nlp = NaturalLanguageProcessor(mindmeld_rasa_converter_app_path)
    nlp.build()
    return nlp
コード例 #5
0
ファイル: rasa.py プロジェクト: yinmingjun/mindmeld
def rasa_nlp(mindmeld_project_path):
    nlp = NaturalLanguageProcessor(mindmeld_project_path)
    nlp.build()
    return nlp
コード例 #6
0
def _skill_nlp(skill_dir) -> NaturalLanguageProcessor:
    """Provides a built processor instance"""
    nlp = NaturalLanguageProcessor(app_path=skill_dir)
    nlp.build()
    nlp.dump()
    return nlp