【发布时间】:2019-09-04 13:37:21
【问题描述】:
Rasa 版本: 0.1.1
Python 版本: 3.7
操作系统: osx
问题:
我正在制作一个可以从购物清单中挑选实体的应用程序。对于第一个版本,我只尝试了几个产品/品牌。
我的训练数据是使用 chatito 生成的,这些是查询形状:
%[inventory_count]('training': '0.99', 'testing': '')
order @[count] @[units?] of @[brand?] @[product]
@[count] @[units?] @[product] by @[brand]
@[brand] @[product] is @[count] @[units?]
add @[brand] @[product] @[count] @[units?]
@[brand] @[product] @[count] @[units?] on floor
产品列表是这样的:
spinach 5 oz
spinach 5 ounces
spinach 16 oz
spinach 16 ounces
spinach
spinach sixteen ounces
spinach five ounces
gala apples
gala apple
apples
apple
经过训练的模型能够检测到上面列表中的所有产品,但它也可以检测到这样的任意产品(文本中可能存在潜在错误,我想测试是否存在否定情况):
spinach 50 oz
call apples
这是过拟合吗?有哪些可能的解决方案?
配置文件内容(config.yml):
language: "en"
pipeline:
- name: "tokenizer_whitespace"
- name: "ner_crf"
- name: "intent_featurizer_count_vectors"
- name: "intent_classifier_tensorflow_embedding"
droprate: 0.5
epochs: 300
C2: 0.02
【问题讨论】:
标签: python nlp rasa-nlu named-entity-recognition crf