'Illegal Plan' message when tagging training data with Vocab types

爷,独闯天下 提交于 2020-12-15 09:16:12

问题


I'm trying to tag my training data using vocab files to reduce the number of training phrases I need to add e.g. use a Bill vocab which allows the use of 'bill' or 'invoice' interchangeably. I have added a Bill enum type and an Bill vocab file. However when I try to tag the word 'bill' in my training phrase with value Bill:Bill I get an 'Illegal Plan' message in my training entry.

My goal is an action. Note that 'bill' is not an expected input to my action. I'm just trying to minimise the number of training phrases I need to add.

Also, could you explain the function of 'Role' in training data? I don't see an explanation in the documentation.

num (Bill) {
  symbol (Bill)
}
vocab (Bill) {
  "Bill" {"Bill", "bill", "invoice", "account balance"}
}
[g:FaqBill] check my (bill)[v:Bill:Bill]

I would expect the NL model to compile successfully but I get an 'Illegal Plan' message in my training entry.


回答1:


I attempted to do the same thing and was able to get the expected plan.

Here are the parts of my attempt at reproducing the behavior you described. Please check each file to see if it matches the code below:

Enum:

enum (Bill) {
  symbol (Bill)
}

Vocabulary:

vocab (Bill) {
  "Bill" {"Bill", "bill", "invoice", "account balance"}
}

Action:

action (GetBill) {
  description (Gets the bill)
  type (Search)
  collect {
    input (bill) {
      type (Bill)
      min (Required) max (One)
    }
  }
  output (Bill)
}

Action JS:

module.exports = {
  function: GetBill
}

function GetBill (bill) {
  return bill
}

With these 4 elements, I was able to get the utterance training plan shown in the screenshot provided above.



来源:https://stackoverflow.com/questions/55726751/illegal-plan-message-when-tagging-training-data-with-vocab-types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!