version: "2.0" nlu: - name: "count_vectors" model: "en" vector_length: 50 stop_words: "english" lowercase: true oov_token: oov batch_size: 64 binary_features: false发生错误YamlValidationException: Failed to validate 'data\vocabulary.yml'. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation:
时间: 2024-03-17 16:44:51 浏览: 152
这个错误提示表明 vocabulary.yml 文件格式不正确,其中缺少了必要的参数,导致解析失败。在这个例子中,您需要在 version 和 nlu 之间添加一个换行符,以将 nlu 声明为一个新的列表项。修改后的文件应该如下所示:
```
version: "2.0"
nlu:
- name: "count_vectors"
model: "en"
vector_length: 50
stop_words: "english"
lowercase: true
oov_token: oov
batch_size: 64
binary_features: false
```
请注意,在 YAML 文件中,每个属性和值之间必须以冒号和空格分隔。如果您需要在值中包含空格或其他特殊字符,必须使用引号将其括起来。同时,缩进也非常重要,缩进必须使用空格而不是制表符,并且必须保持统一。如果缩进不正确,将会导致 YAML 解析失败。
阅读全文