BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

Nuget package with Lucene DynamicList and templates

Open chrimc62 opened this issue 4 years ago • 1 comments

Goals of this item:

  1. Show people how to wire up external recognizers.
  2. Figure out how to package up code and template extensions into a nuget package.
  3. Expose dynamic lists with fuzzy matching.

We want a standalone nuget package that includes both the Lucene DynamicList recognizer and the templates to add a new schema to the template generation that is part of the nuget package. This builds on the standard DynamicList schema but instead of DynamicList it would use an ExternalRecognizer which in this case supports fuzzy matching. The LUIS model would be generated in the same way as for the standard DynamicList, but it would use the ExternalRecognizer field to bind to the Lucene DynamicList recognizer and inside of that it would refer to a memory location with the dynamic list definition. There would also be a SetProperty added to BeginDialog to define the default value for that list.

https://github.com/tomlm/iciclecreek.bot/tree/master/source/Libraries/Iciclecreek.Bot.Builder.Dialogs.Recognizers.Lucene

{
    "$kind": "Microsoft.LuisRecognizer",
    ...
    "externalEntityRecognizer": {
        "$kind": "Iciclecreek.DynamicListRecognizer",
        "dynamicList": "=dialog.PersonValue"
    }
}```

chrimc62 avatar Mar 19 '21 02:03 chrimc62

  1. Use the existing community FuzzyRecognizer package.
  2. Add a new class AdaptiveFuzzyRecognizer that is structured like the LuisAdaptiveRecognizer in the SDK or the Lucene recognizer. The properties you expose are the options for the fuzzy recognizer and in the implementation you will make use of the existing fuzzy recognizer.
  3. Define the schema file for the properties in the Adaptive fuzzy recognizer.
  4. Add a new class AdaptiveFuzzyRecognizerBotComponent which is modeled after LuisBotComponent.
  5. Add the templates required to use the AdaptiveFuzzyRecognizer as an external recognizer to LUIS. These templates should be in the exported directory so that they get imported when a dialog:merge is done by composer. When generation happens the imported directory will be included which should pick up any templates that are defined there. The current generation code may not be smart enough to look inside of directories and that may need to be fixed. You can work around this by calling generation with the paths you need to include to test this.
  6. Add a dependency in runbot to the fuzzy recognizer package.

If Gary wants a new package, then the new classes would be in a new package in the community repo.

The goal would be someone adds this nuget package to composer and they could see the new property type when doing forms in the new UI.

chrimc62 avatar Apr 14 '21 01:04 chrimc62