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.

bf luis:generate:cs generate entity type in C# code not match with the luis predicted result #699

@xhr0804

Description

@xhr0804

Versions

@microsoft/botframework-cli/4.9.0-preview.113642 win32-x64 node-v12.14.1

Describe the bug

I have a luis model in schema 6.0.0, I use bf luis:convert to convert it to .json, and then use bf
luis:generate:cs to generate a C# source code.
But when I use a luis recognizer to recognize a query from luis service, I get an error.
Seems it is because the "genre" field in C# source code is string[]
image
but the luis predicted result is "genre":[["genre_list"]]
image

After I change the string[] to string[][] manually, it is resolved.

To Reproduce

Steps to reproduce the behavior:

  1. Use this .lu file
> LUIS application information
> !# @app.name = MusicSkill
> !# @app.versionId = 0.1
> !# @app.culture = en-us
> !# @app.luis_schema_version = 6.0.0


> # Intent definitions

## PlayMusic
- {@MusicParent={@beforeMusic=play} {@music=adeles} {@afterMusic=latest album}}
- {@MusicParent={@beforeMusic=play} {@music=prince}}
- {@MusicParent={@beforeMusic=play} {@genre=schlager}}
- {@MusicParent={@beforeMusic=can you play} {@inBetweenMusic=rihanna} {@afterMusic=please?}}
- {@MusicParent={@beforeMusic=can you play} {@genre=boi}
- {@MusicParent={@beforeMusic=can you play} {@music=crazy beautiful}}

> # Entity definitions

@ ml MusicParent 
    - @ ml beforeMusic
    - @ ml afterMusic
    - @ ml music
    - @ ml inBetweenMusic
    - @ GenreList genre


> # PREBUILT Entity definitions

> # Phrase list definitions

> # List entities

@ list GenreList = 
	- genre_list :
		- schlager
		- deathrash metal
		- boi
		- drill music



> # RegEx entities


  1. use bf luis:convert to convert it to .json
  2. use bf luis:generate:cs to get a C# resource code, named as "MusicSkillLuis"
  3. use a luis recognizer to recognize the luis result from the luis service.
    luisrecognizer.RecognizeAsync<MusicSkillLuis>

Expected behavior

Give a clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

[bug]

Metadata

Metadata

Assignees

Labels

P1Painful if we don't fix, won't block releasingR9Release 9 - May 15th, 2020

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions