from deeppavlov import build_model, configs
snips_model = build_model(configs.classifiers.intents_snips , download=True)
snips_model(["Hello! What is the weather in Boston tomorrow?"])大家好-我可以使用上面深度巴洛夫的预先训练的模型来进行预先创建的意图分类。然而,我想使用deeppavlov来创建我自己的意图分类模型,使用我自己的意图和文本。总共会有5到7个意向。
我该怎么做呢?
我用文本和意图得到的ie样本数据
text,intent
Where is McDonald's?, resturant
What is the weather today, weather
Where is the closest Burger King?, restaurant
Is it sunny today?, weather
What is the temperature today?, weather发布于 2021-02-02 17:14:00
很抱歉回答得太晚了。如果仍然相关,您可以考虑使用以下教程进行自定义分类:https://github.com/deepmipt/DeepPavlov/blob/master/examples/classification_tutorial.ipynb
有几种不同的嵌入方法和模型。您还可以尝试像本教程中那样实现自己的数据集,并使用更实际的模型,如基于BERT的分类,请参阅https://github.com/deepmipt/DeepPavlov/tree/master/deeppavlov/configs/classifiers目录中的_bert配置
发布于 2021-05-07 17:10:06
我们在DeepPavlov库的0.14版本中提供了一个新的模型/自然语言处理组件,称为意图捕获器。有了它,您可以提供自己的意图(目前采用JSON格式,但我们很快将提供一种更易于阅读的YML格式),然后根据您的意图训练分类模型。好消息是,您还可以使用它通过RegEx自动生成更多示例。
您可以在此处了解有关Intent Catcher的更多信息:
http://docs.deeppavlov.ai/en/master/features/models/intent_catcher.html
下面是关于如何使用它的教程:https://colab.research.google.com/drive/1l6Fhj3rEVup0N-n9Jy5z_iA3b1W53V6m?usp=sharing
让我们知道这对你是否有效
发布于 2020-08-25 17:20:04
训练intents_snips模型需要训练数据集。我建议,在收集数据之前,尝试使用轻量级的FAQ模型,其中每个类的训练示例很少就足够了。
from deeppavlov import configs, train_model
faq = train_model(configs.faq.tfidf_logreg_en_faq)
a = faq(["I need help"])
详情可以在here上找到
https://stackoverflow.com/questions/63288608
复制相似问题