【问题标题】:RASA NLU overfitting entity extractionRASA NLU 过拟合实体提取
【发布时间】: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


    【解决方案1】:

    是的,条件随机字段似乎确实非常关注单个单词。为了解决这个问题,您可以提供一些示例(例如call apple)并且不要注释apple,以便强制条件随机字段泛化。

    我还建议更新到最新的 Rasa 版本 (1.1.4),因为您的版本已经很旧了。 https://forum.rasa.com 也是一个非常有用的帮助资源。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多