コード例 #1
0
 private Calendar GetCreateMeetingIntent(
     string userInput,
     Calendar.Intent intents = Calendar.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)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                subject: subject,
                contactName: contactName,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime,
                duration: duration,
                meetingRoom: meetingRoom,
                location: location));
 }
コード例 #2
0
        protected static Calendar GetCalendarIntent(
            string userInput             = null,
            Calendar.Intent intents      = Calendar.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 Calendar
            {
                Text    = userInput,
                Intents = new Dictionary <Calendar.Intent, IntentScore>()
            };

            intent.Intents.Add(intents, new IntentScore()
            {
                Score = TopIntentScore
            });
            intent.Entities = new Calendar._Entities
            {
                _instance   = new Calendar._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);
        }
コード例 #3
0
 private Calendar GetBaseFindMeetingIntent(
     string userInput,
     Calendar.Intent intents = Calendar.Intent.FindCalendarEntry,
     string[] fromDate       = null,
     string[] toDate         = null,
     string[] fromTime       = null,
     string[] toTime         = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime));
 }
コード例 #4
0
 private Calendar GetBaseUpdateMeetingIntent(
     string userInput,
     Calendar.Intent intents = Calendar.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));
 }
コード例 #5
0
 private Calendar GetBaseTimeRemainingIntent(
     string userInput,
     Calendar.Intent intents = Calendar.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));
 }
コード例 #6
0
 private Calendar GetBaseFindMeetingIntent(
     string userInput,
     Calendar.Intent intents = Calendar.Intent.FindCalendarEntry,
     string[] fromDate       = null,
     string[] toDate         = null,
     string[] fromTime       = null,
     string[] toTime         = null,
     double[] ordinal        = null,
     double[] number         = null)
 {
     return(GetCalendarIntent(
                userInput,
                intents,
                fromDate: fromDate,
                toDate: toDate,
                fromTime: fromTime,
                toTime: toTime,
                ordinal: ordinal,
                number: number));
 }
コード例 #7
0
 private Calendar GetBaseConnectToMeetingIntent(
     string userInput,
     Calendar.Intent intents = Calendar.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));
 }
コード例 #8
0
 private Calendar GetBaseNextMeetingIntent(string userinput, Calendar.Intent intents = Calendar.Intent.NextMeeting)
 {
     return(GetCalendarIntent(userinput, intents));
 }