Duckling 不提取时间和有序实体

问题描述

我在我的管道中使用 DuckingEntityExtractor 来提取时间和序数实体,但它没有提取一些以前用于 DucklingHTTPExtractor 的实体。但是它适用于小鸭解析器。

这是我的管道和实体示例的片段:

管道:

language: en
pipeline:
  - name: Whitespacetokenizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: char_wb
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 100
  - name: EntitySynonymMapper
  - name: "DucklingHTTPExtractor"
    # url of the running duckling server
    url: "http://xxxx.xxx.com"
    # dimensions to extract
    dimensions: ["time","number","email","ordinal"]
    # allows you to configure the locale,by default the language is
    # used
    locale: "de_DE"
  - name: FallbackClassifier
    threshold: 0.7
    ambiguity_threshold: 0.1

示例:

正文:9 月 22 日

Next Message:
22 sep

{
  "text": "22 sep","intent": {
    "id": -1711287076799534405,"name": "book_slot","confidence": 0.9992443919181824
  },"entities": [
    {
      "start": 0,"end": 6,"text": "22 sep","value": "2021-09-22T00:00:00.000-07:00","confidence": 1.0,"additional_info": {
        "values": [
          {
            "value": "2021-09-22T00:00:00.000-07:00","grain": "day","type": "value"
          },{
            "value": "2022-09-22T00:00:00.000-07:00",{
            "value": "2023-09-22T00:00:00.000-07:00","type": "value"
          }
        ],"type": "value"
      },"entity": "time","extractor": "DucklingEntityExtractor"
    }
  ]

正文:下周五

next friday
{
  "text": "next friday","intent": {
    "id": 1386275381868498380,"name": "goodbye","confidence": 0.9995949268341064
  },"entities": []
}

文字:第一

Next message:
First
{
  "text": "First","intent": {
    "name": "nlu_fallback","confidence": 0.5972589552402496
  },"entities": []
}

小鸭解析器输出


cmd: curl -d "text=next friday" -X POST http://xxxx.xxx.com/parse

[{"body":"next friday","start":0,"value":{"values":[{"value":"2021-01-15T00:00:00.000-08:00","grain":"day","type":"value"}],"value":"2021-01-15T00:00:00.000-08:00","type":"value"},"end":11,"dim":"time","latent":false}]

有人可以帮忙吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...