Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Duplicate utterances create malformed LUIS JSON #509

Closed

Description

Issue

Duplicate utterances under an intent in a LU file results in a malformed LUIS JSON that cannot be imported into LUIS. The resulting errors from LUIS do not help to diagnose the issue.

Description

If a LU file has two instances of the same utterance under an intent, e.g.:

  • no, i already have meeting {FromTime=3pm} {FromDate=tomorrow} afternoon
  • no, i already have meeting {FromTime=3pm} {FromDate=tomorrow} afternoon

bf luis:convert then generates the following malformed JSON fragment whereby there are overlapping entities (startpos, endpos)

{
      "text": "no, i already have meeting 3pm tomorrow afternoon",
      "intent": "RejectCalendar",
      "entities": [
        {
          "entity": "FromTime",
          "startPos": 27,
          "endPos": 29
        },
        {
          "entity": "FromDate",
          "startPos": 31,
          "endPos": 38
        },
        {
          "entity": "FromTime",
          "startPos": 27,
          "endPos": 29
        },
        {
          "entity": "FromDate",
          "startPos": 31,
          "endPos": 38
        }
      ]
},

ludown CLI gracefully handled this situation whereby it ignored the extra instance however the new bf luis:convert CLI generates a malformed element whereby it duplicates the entities under the same utterance likely due to it grouping them together.

Suggested way forward

bf luis:convert display a warning message about a duplicate utterance and drop it still generating the LUIS file (which ludown did). Alternatively you can stop processing and display a clear error as to which intent/utterance is causing the issue

Activity

  1. added
    lu
    R8
    on Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

R8lu

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions