botpress / nlu

This repo contains every ML/NLU related code written by Botpress in the NodeJS environment. This includes the Botpress Standalone NLU Server.
22 stars 21 forks source link

[BUG] duckling.botpress.io entity extraction behaviour not the same as docker binary #106

Closed charlescatta closed 2 years ago

charlescatta commented 2 years ago

The default botpress-hosted version of duckling has a different extraction behaviour than the version in botpress/server's official docker image, example:

When extracting phone number + time:

Utterance: Call me on (034)-234-2019 on Sunday

On the docker version:

Screen Shot 2021-09-24 at 10 34 35 AM

On the botpress-hosted duckling.botpress.io:

Screen Shot 2021-09-24 at 10 36 35 AM
franklevasseur commented 2 years ago

Hi!

This bug is now fixed. Just try the following command:

curl -XPOST https://duckling.botpress.io/parse --data 'locale=en_GB&text=Call me on (034)-234-2019 on Sunday'

it will output:

[
  {
    "body": "(034)-234-2019",
    "start": 11,
    "value": { "value": "0342342019", "type": "value" },
    "end": 25,
    "dim": "phone-number",
    "latent": false
  },
  {
    "body": "on Sunday",
    "start": 26,
    "value": {
      "values": [
        {
          "value": "2021-12-19T00:00:00.000-08:00",
          "grain": "day",
          "type": "value"
        },
        {
          "value": "2021-12-26T00:00:00.000-08:00",
          "grain": "day",
          "type": "value"
        },
        {
          "value": "2022-01-02T00:00:00.000-08:00",
          "grain": "day",
          "type": "value"
        }
      ],
      "value": "2021-12-19T00:00:00.000-08:00",
      "grain": "day",
      "type": "value"
    },
    "end": 35,
    "dim": "time",
    "latent": false
  }
]