private calendarLuis GetBaseDeleteMeetingIntent(
     string userInput,
     calendarLuis.Intent intents = calendarLuis.Intent.DeleteCalendarEntry,
     string[] subject            = null,
     string[] contactName        = null,
     string[] fromDate           = null,
     string[] toDate             = null,
     string[] fromTime           = null,
     string[] toTime             = null,
     string[] duration           = null,
     string[] meetingRoom        = null,
     string[] location           = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                subject: subject,
                contactName: contactName,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime,
                duration: duration,
                meetingRoom: meetingRoom,
                location: location));
 }
Beispiel #2
0
 private calendarLuis GetCreateMeetingIntent(
     string userInput,
     calendarLuis.Intent intents = calendarLuis.Intent.CreateCalendarEntry,
     string[] subject            = null,
     string[] contactName        = null,
     string[] fromDate           = null,
     string[] toDate             = null,
     string[] fromTime           = null,
     string[] toTime             = null,
     string[] duration           = null,
     string[] meetingRoom        = null,
     string[] location           = null,
     double[] ordinal            = null,
     double[] number             = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                subject: subject,
                contactName: contactName,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime,
                duration: duration,
                meetingRoom: meetingRoom,
                location: location,
                ordinal: ordinal,
                number: number));
 }
        protected static calendarLuis GetCalendarIntent(
            string userInput             = null,
            calendarLuis.Intent intents  = calendarLuis.Intent.None,
            double[] ordinal             = null,
            double[] number              = null,
            string[] subject             = null,
            string[] contactName         = null,
            string[] fromDate            = null,
            string[] toDate              = null,
            string[] fromTime            = null,
            string[] toTime              = null,
            string[] duration            = null,
            string[] meetingRoom         = null,
            string[] location            = null,
            string[] moveEarlierTimeSpan = null,
            string[] moveLaterTimeSpan   = null,
            string[] orderReference      = null,
            string[] askParameter        = null)
        {
            var intent = new calendarLuis
            {
                Text    = userInput,
                Intents = new Dictionary <calendarLuis.Intent, IntentScore>()
            };

            intent.Intents.Add(intents, new IntentScore()
            {
                Score = TopIntentScore
            });
            intent.Entities = new calendarLuis._Entities
            {
                _instance  = new calendarLuis._Entities._Instance(),
                ordinal    = ordinal,
                Subject    = subject,
                personName = contactName
            };
            intent.Entities._instance.personName = GetInstanceDatas(userInput, contactName);
            intent.Entities.FromDate             = fromDate;
            intent.Entities._instance.FromDate   = GetInstanceDatas(userInput, fromDate);
            intent.Entities.ToDate                   = toDate;
            intent.Entities._instance.ToDate         = GetInstanceDatas(userInput, toDate);
            intent.Entities.FromTime                 = fromTime;
            intent.Entities._instance.FromTime       = GetInstanceDatas(userInput, fromTime);
            intent.Entities.ToTime                   = toTime;
            intent.Entities._instance.ToTime         = GetInstanceDatas(userInput, toTime);
            intent.Entities.Duration                 = duration;
            intent.Entities.MeetingRoom              = meetingRoom;
            intent.Entities.Location                 = location;
            intent.Entities.MoveEarlierTimeSpan      = moveEarlierTimeSpan;
            intent.Entities.MoveLaterTimeSpan        = moveLaterTimeSpan;
            intent.Entities.OrderReference           = orderReference;
            intent.Entities._instance.OrderReference = GetInstanceDatas(userInput, orderReference);
            return(intent);
        }
 private calendarLuis GetBaseTimeRemainingIntent(
     string userInput,
     calendarLuis.Intent intents = calendarLuis.Intent.TimeRemaining,
     string[] fromDate           = null,
     string[] toDate             = null,
     string[] fromTime           = null,
     string[] toTime             = null,
     string[] orderReference     = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime,
                orderReference: orderReference));
 }
 public static calendarLuis GetBaseUpdateMeetingIntent(
     string userInput,
     calendarLuis.Intent intents = calendarLuis.Intent.ChangeCalendarEntry,
     string[] subject            = null,
     string[] fromDate           = null,
     string[] toDate             = null,
     string[] fromTime           = null,
     string[] toTime             = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                subject: subject,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime));
 }
 private calendarLuis GetBaseConnectToMeetingIntent(
     string userInput,
     calendarLuis.Intent intents = calendarLuis.Intent.ConnectToMeeting,
     string[] subject            = null,
     string[] fromDate           = null,
     string[] toDate             = null,
     string[] fromTime           = null,
     string[] toTime             = null,
     string[] orderReference     = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                subject: subject,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime,
                orderReference: orderReference));
 }
 private calendarLuis GetBaseFindMeetingIntent(
     string userInput,
     calendarLuis.Intent intents = calendarLuis.Intent.FindCalendarEntry,
     string[] fromDate           = null,
     string[] toDate             = null,
     string[] fromTime           = null,
     string[] toTime             = null,
     double[] ordinal            = null,
     double[] number             = null,
     string[] orderReference     = null,
     string[] askParameter       = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime,
                ordinal: ordinal,
                number: number,
                orderReference: orderReference,
                askParameter: askParameter));
 }