首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >请问:rasa_nlu的regex_features如何工作?

请问:rasa_nlu的regex_features如何工作?

提问于 2019-07-02 14:07:52
回答 0关注 0查看 175

关于rasa_nlu 的regex_features

我想请问一下他是如何工作的,他是怎么样设置nlu和pipline并且如果匹配错误会返回什么。我这边的设置应该做怎么样的一个修改,万分感谢!

这是我设置的内容

{ "rasa_nlu_data": { "common_examples": [ { "intent": "zipcode", "entities": [ { "entity": "zipcode", "value": "52231", "start": 6, "end": 11 } ], "text": "这是我的邮编52231" }, { "intent": "zipcode", "entities": [ { "entity": "zipcode", "value": "34212", "start": 0, "end": 5 } ], "text": "34212是我的邮编" } ], "regex_features": [ { "name": "zipcode", "pattern": "[0-9]{5}" } ], "lookup_tables": [], "entity_synonyms": [] } }
pipeline: - name: "MitieNLP" model: "data/total_word_feature_extractor_zh.dat" - name: "JiebaTokenizer" - name: "MitieEntityExtractor" - name: "EntitySynonymMapper" - name: "RegexFeaturizer" - name: "MitieFeaturizer" - name: "SklearnIntentClassifier" - name: "CRFEntityExtractor"

但是跑出来的结果不是我想要的。不论我输入正确的邮编还是错误的邮编我都没有看到任何regex工作的信息

Next message: 3422是我的邮编 { "intent": { "name": "zipcode", "confidence": 0.37416135730113564 }, "entities": [ { "entity": "zipcode", "value": "3422", "start": 0, "end": 4, "confidence": null, "extractor": "MitieEntityExtractor" } ] "text": "3422是我的邮编" }

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档