microsoft / botframework-components

The repository for components built by Microsoft for the Azure Bot Framework.
https://aka.ms/botdocs
MIT License
112 stars 80 forks source link

Bot Framework Composer can't retrive entities with microsoft.bot.components.recognizers.clurecognizer V1.0.1 library #1546

Closed Symon94 closed 2 months ago

Symon94 commented 9 months ago

Describe the bug

In Bot Framework Composer, after installing microsoft.bot.components.recognizers.clurecognizer V1.0.1 library for CLU, the bot doesn't recognize some entities if the language is different to en-US . So I search in the source code provided here and I think that I found a bug.

Screenshot (132)

In the image above, I show where the bug is. I change that portion of code adding a field "language" = "it". After restarting the Bot Framework Composer, bot manages to capture entities correctly for the chosen language. I think it is possible to be able to retrieve the language using the DialogContext property Locale

Version

Release: 2.1.3-nightly.364675.1a93f21 SDK runtime packages: 4.12.0

To Reproduce

Screenshot (133)

Expected behavior

I expect the captured entities to be in the entities field

InfinytRam commented 8 months ago

hi @Symon94,

I'm not able to reproduce this issue.

In dotnet composer bot, I added multiple languages support such as Italian ("it") and German ("de"). In both of these languages the entities were captured from CLU.

Here are the steps I took:

  1. Created CLU in Language studio and deployed a model.

CLU_Schema

Data_Labeling

  1. Added Multiple languages to Composer

  2. Install ConversationLanguageUnderstanding V1.0.1 package in Composer and configure the main dialog for custom CLU recognizer.

  3. In "Unknown intent" trigger, I added the following response:

Screenshot from 2024-01-14 01-50-50

  1. In Emulator, change locale. From my end I tested with "it" and "de".

  2. Send an utterance to the bot

  3. Entities is captures in different language:

em

{
  "lgType": "Activity",
  "text": {
    "text": "order pizza",
    "alteredText": null,
    "intents": {
      "OrderPizza": {
        "score": 0.9621253
      }
    },
    "entities": {
      "$instance": {},
      "order": [
        {
          "category": "order",
          "text": "order",
          "offset": 0,
          "length": 5,
          "confidenceScore": 1
        }
      ],
      "pizza": [
        {
          "category": "pizza",
          "text": "pizza",
          "offset": 6,
          "length": 5,
          "confidenceScore": 1
        }
      ]
    },
    "intent": "OrderPizza",
    "score": 0.9621253
  }
}
dmvtech commented 2 months ago

Closing due to inability to reproduce or confirm a bug.