首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >DeepPavlov对自己的回答进行排名

DeepPavlov对自己的回答进行排名
EN

Stack Overflow用户
提问于 2019-05-30 20:14:56
回答 1查看 120关注 0票数 2

有没有人知道,如何在自己的回复中使用deeppavlov排名模块?文档(http://docs.deeppavlov.ai/en/master/components/neural_ranking.html)提供了以下代码(用于保险数据集):

代码语言:javascript
复制
rank_model = build_model(configs.ranking.ranking_insurance_interact, download=True)
predictor = rank_model.pipe[-1][-1]
candidates = ['auto insurance', 'life insurance', 'home insurance']
predictor.rebuild_responses(candidates)

但当我对ubuntu数据集使用以下代码时:

代码语言:javascript
复制
rank_model = build_model(configs.ranking.ranking_ubuntu_v2_bert_sep_interact, download=False)
predictor = rank_model.pipe[-1][-1]
candidates = ['environment variable', 'graphical interface', 'broken terminal']
predictor.rebuilt_responces(candidates)

事实证明,没有rebuilt_responces方法:

代码语言:javascript
复制
AttributeError                            Traceback (most recent call last)
<ipython-input-9-e013af513ae2> in <module>
      4 predictor = rank_model.pipe[-1][-1]
      5 candidates = ['environment variable', 'graphical interface', 'broken terminal']
----> 6 predictor.rebuilt_responces(candidates)

AttributeError: 'BertSepRankerPredictor' object has no attribute 'rebuilt_responces'

有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-06-07 15:49:50

我不得不手动用数据替换文件。github问题中提供了解决方案:https://github.com/deepmipt/DeepPavlov/issues/862

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56378147

复制
相关文章

相似问题

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