Closed mekinney closed 5 years ago
It doesn't seem like the output from LuisGen has recently changed. The using statements are still there. @cahann please assign someone from the VA team to take a look.
@darrenj who is the right person in your team to look into this issue?
Don't think it's an issue on our side? I've just re-run luisgen for the attached Calendar.json file and it matches the original example given, I can't repro the 2nd example?
This is on version 2.0.2.0
// <auto-generated>
// Code generated by LUISGen calendar.json -cs Luis.CalendarLU -o
// Tool github: https://github.com/microsoft/botbuilder-tools
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
using Newtonsoft.Json;
using System.Collections.Generic;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.AI.Luis;
namespace Luis
{
public class CalendarLU: IRecognizerConvert
{
public string Text;
public string AlteredText;
public enum Intent {
AcceptEventEntry,
ChangeCalendarEntry,
CheckAvailability,
ConnectToMeeting,
ContactMeetingAttendees,
CreateCalendarEntry,
DeleteCalendarEntry,
FindCalendarDetail,
FindCalendarEntry,
FindCalendarWhen,
FindCalendarWhere,
FindCalendarWho,
FindDuration,
FindMeetingRoom,
GoBack,
None,
ShowNextCalendar,
ShowPreviousCalendar,
TimeRemaining
};
public Dictionary<Intent, IntentScore> Intents;
public class _Entities
{
// Simple entities
public string[] Subject;
public string[] FromDate;
public string[] FromTime;
public string[] ToTime;
public string[] MeetingRoom;
public string[] Location;
public string[] MoveEarlierTimeSpan;
public string[] MoveLaterTimeSpan;
public string[] ToDate;
public string[] SlotAttribute;
public string[] OrderReference;
public string[] PositionReference;
public string[] Message;
public string[] Duration;
public string[] DestinationCalendar;
// Built-in entities
public DateTimeSpec[] datetime;
public double[] number;
public double[] ordinal;
public string[] personName;
// Lists
public string[][] RelationshipName;
// Instance
public class _Instance
{
public InstanceData[] Subject;
public InstanceData[] FromDate;
public InstanceData[] FromTime;
public InstanceData[] ToTime;
public InstanceData[] MeetingRoom;
public InstanceData[] Location;
public InstanceData[] MoveEarlierTimeSpan;
public InstanceData[] MoveLaterTimeSpan;
public InstanceData[] ToDate;
public InstanceData[] SlotAttribute;
public InstanceData[] OrderReference;
public InstanceData[] PositionReference;
public InstanceData[] Message;
public InstanceData[] Duration;
public InstanceData[] DestinationCalendar;
public InstanceData[] datetime;
public InstanceData[] number;
public InstanceData[] ordinal;
public InstanceData[] personName;
public InstanceData[] RelationshipName;
}
[JsonProperty("$instance")]
public _Instance _instance;
}
public _Entities Entities;
[JsonExtensionData(ReadData = true, WriteData = true)]
public IDictionary<string, object> Properties {get; set; }
public void Convert(dynamic result)
{
var app = JsonConvert.DeserializeObject<CalendarLU>(JsonConvert.SerializeObject(result));
Text = app.Text;
AlteredText = app.AlteredText;
Intents = app.Intents;
Entities = app.Entities;
Properties = app.Properties;
}
public (Intent intent, double score) TopIntent()
{
Intent maxIntent = Intent.None;
var max = 0.0;
foreach (var entry in Intents)
{
if (entry.Value.Score > max)
{
maxIntent = entry.Key;
max = entry.Value.Score.Value;
}
}
return (maxIntent, max);
}
}
}
On vacation, so slow response and can’t retest. Daily build worked for me. Seems to be a release issue, if that helps.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Darren Jefford notifications@github.com Sent: Thursday, April 18, 2019 4:11:32 AM To: Microsoft/botbuilder-tools Cc: Mike Kinney; Author Subject: Re: [Microsoft/botbuilder-tools] LUISGen creates incorrect package names (#1060)
Don't think it's an issue on our side? I've just re-run luisgen for the attached Calendar.json file and it matches the original example given, I can't repro the 2nd example?
This is on version 2.0.2.0
//
public class _Entities
{
// Simple entities
public string[] Subject;
public string[] FromDate;
public string[] FromTime;
public string[] ToTime;
public string[] MeetingRoom;
public string[] Location;
public string[] MoveEarlierTimeSpan;
public string[] MoveLaterTimeSpan;
public string[] ToDate;
public string[] SlotAttribute;
public string[] OrderReference;
public string[] PositionReference;
public string[] Message;
public string[] Duration;
public string[] DestinationCalendar;
// Built-in entities
public DateTimeSpec[] datetime;
public double[] number;
public double[] ordinal;
public string[] personName;
// Lists
public string[][] RelationshipName;
// Instance
public class _Instance
{
public InstanceData[] Subject;
public InstanceData[] FromDate;
public InstanceData[] FromTime;
public InstanceData[] ToTime;
public InstanceData[] MeetingRoom;
public InstanceData[] Location;
public InstanceData[] MoveEarlierTimeSpan;
public InstanceData[] MoveLaterTimeSpan;
public InstanceData[] ToDate;
public InstanceData[] SlotAttribute;
public InstanceData[] OrderReference;
public InstanceData[] PositionReference;
public InstanceData[] Message;
public InstanceData[] Duration;
public InstanceData[] DestinationCalendar;
public InstanceData[] datetime;
public InstanceData[] number;
public InstanceData[] ordinal;
public InstanceData[] personName;
public InstanceData[] RelationshipName;
}
[JsonProperty("$instance")]
public _Instance _instance;
}
public _Entities Entities;
[JsonExtensionData(ReadData = true, WriteData = true)]
public IDictionary<string, object> Properties {get; set; }
public void Convert(dynamic result)
{
var app = JsonConvert.DeserializeObject<CalendarLU>(JsonConvert.SerializeObject(result));
Text = app.Text;
AlteredText = app.AlteredText;
Intents = app.Intents;
Entities = app.Entities;
Properties = app.Properties;
}
public (Intent intent, double score) TopIntent()
{
Intent maxIntent = Intent.None;
var max = 0.0;
foreach (var entry in Intents)
{
if (entry.Value.Score > max)
{
maxIntent = entry.Key;
max = entry.Value.Score.Value;
}
}
return (maxIntent, max);
}
}
}
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fbotbuilder-tools%2Fissues%2F1060%23issuecomment-484527091&data=02%7C01%7C%7C92931cde6a9a4f6e418108d6c407c3c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636911934954628560&sdata=8eXdZ37UKEwv1qZqbTo52YSlqVApZHp3%2BrpVAXyMvMQ%3D&reserved=0, or mute the threadhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABZT22QBK7A3EC7QAOX72L3PRB6RJANCNFSM4HFBQGYA&data=02%7C01%7C%7C92931cde6a9a4f6e418108d6c407c3c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636911934954638555&sdata=AwM8UcWw5ufePjU7%2FsfFR%2FHDlHhRq57ptGh2JXR0Nm4%3D&reserved=0.
Closing as we can't reproduce the issue. @mekinney feel free to reopen if you have repro steps to follow. Thanks!
Tool
Name: LuisGen Version: 2.0.2.0
Describe the bug
Clearly, I'm doing something wrong because this is too obvious not to have been fixed.
I'm building the VirtualAssistant and LUISGen creates the incorrect CS files for Intents and Entities.
Correct Code included with VirtualAssistant project:
Code generated by LuisGen 2.0.2.0 has a number of errors: Using statements are missing. Namespaces are incorrect (Microsoft.Bot.Builder.Core.Extensions.IRecognizerConvert and Microsoft.Bot.Builder.Ai.LUIS.IntentData).
[bug]