private CalendarLU GetCreateMeetingIntent(
     string userInput,
     CalendarLU.Intent intents = CalendarLU.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));
 }
 private CalendarLU GetBaseDeleteMeetingIntent(
     string userInput,
     CalendarLU.Intent intents = CalendarLU.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));
 }
Esempio n. 3
0
        protected static CalendarLU GetCalendarIntent(
            string userInput             = null,
            CalendarLU.Intent intents    = CalendarLU.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 CalendarLU
            {
                Text    = userInput,
                Intents = new Dictionary <CalendarLU.Intent, IntentScore>()
            };

            intent.Intents.Add(intents, new IntentScore()
            {
                Score = TopIntentScore
            });
            intent.Entities = new CalendarLU._Entities
            {
                _instance   = new CalendarLU._Entities._Instance(),
                ordinal     = ordinal,
                number      = number,
                Subject     = subject,
                ContactName = contactName
            };
            intent.Entities._instance.ContactName = 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);
            intent.Entities.AskParameter             = askParameter;
            return(intent);
        }
 private CalendarLU GetBaseTimeRemainingIntent(
     string userInput,
     CalendarLU.Intent intents = CalendarLU.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));
 }
Esempio n. 5
0
 public static CalendarLU GetBaseUpdateMeetingIntent(
     string userInput,
     CalendarLU.Intent intents = CalendarLU.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 CalendarLU GetBaseConnectToMeetingIntent(
     string userInput,
     CalendarLU.Intent intents = CalendarLU.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 CalendarLU GetBaseFindMeetingIntent(
     string userInput,
     CalendarLU.Intent intents = CalendarLU.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));
 }