nuance_CALENDARX

Defines a discrete calendar event in terms of date, time, or both. Additionally, the calendar event may be in absolute or relative terms. Named holidays are also represented.

Sample language

  • July
  • 5:00
  • around 5:30
  • in 9 hours
  • within the next 2 hours
  • in the first week of april
  • between 1pm and 4pm
  • from Monday to Friday
  • Christmas

Examples

The input “from Monday to Friday” returns this response:

{
  "nuance_CALENDAR_RANGE": {
     "nuance_CALENDAR_RANGE_START": {
       "nuance_CALENDAR": {
         "nuance_DATE": {
           "nuance_DATE_REL": {
             "nuance_INCREMENT": 0,
             "nuance_DAY_OF_WEEK": 2
           }
         }
       }
     },
     "nuance_CALENDAR_RANGE_END": {
       "nuance_CALENDAR": {
         "nuance_DATE": {
           "nuance_DATE_REL": {
             "nuance_INCREMENT": 0,
             "nuance_DAY_OF_WEEK": 6
           }
         }
       }
     }
  }
}

The input “Christmas” returns this response:

{
     "nuance_CALENDAR":
    {
         "nuance_DATE": {
             "nuance_DATE_ABS": {
                 "nuance_DAY": 25,
                 'nuance_MONTH":12
            }
        }
    }
}

Numeric value range

  • For nuance_CALENDARX, nuance_DATE_REL, nuance_TIME_REL: <= 120. (Note that this grammar also covers Arabic numbers. For example, “in 120 hours”.)
  • For nuance_YEAR: 1900-2050 (as Arabic numbers in GrXML for English and as compounds for de-de).

Schema

{
     "$schema": "http://json-schema.org/draft-04/schema#",
     "definitions": {
         "__main__.TimeAbs": {
             "type": "object",
             "properties": {
                 "nuance_TIME_ABS": {
                     "type": "object",
                     "properties": {
                         "nuance_AMPM": {
                             "type": "string",
                             "pattern": "[am|pm]"
                         },
                         "nuance_MINUTE": {
                             "type": "number"
                         },
                         "nuance_HOUR": {
                             "type": "number"
                         },
                         "nuance_MODIFIER": {
                             "type": "string",
                             "pattern": "[fuzzy]"
                         }
                     }
                 }
             },
             "additionalProperties": false
         },
         "__main__.TimeRel": {
             "type": "object",
             "properties": {
                 "nuance_TIME_REL": {
                     "type": "object",
                     "properties": {
                         "nuance_INCREMENT": {
                             "type": "number"
                         },
                         "nuance_STEP": {
                             "type": "string",
                             "pattern": "[hour|minute]"
                         },
                         "nuance_MODIFIER": {
                             "type": "string",
                             "pattern": "[fuzzy]"
                         }
                     }
                 }
             },
             "additionalProperties": false
         },
         "__main__.DateAbs": {
             "type": "object",
             "properties": {
                 "nuance_DATE_ABS": {
                     "type": "object",
                     "properties": {
                         "nuance_DAY": {
                             "type": "number"
                         },
                         "nuance_MONTH": {
                             "type": "number"
                         },
                         "nuance_YEAR": {
                             "type": "number"
                         },
                         "nuance_MODIFIER": {
                             "type": "string",
                             "pattern": "[fuzzy]"
                         }
                     }
                 }
             },
             "additionalProperties": false
         },
         "__main__.DateRel": {
             "type": "object",
             "properties": {
                 "nuance_DATE_REL": {
                     "type": "object",
                     "properties": {
                         "nuance_NAMED_DAY": {
                             "type": "string"
                         },
                         "nuance_DAY_OF_WEEK": {
                             "type": "number",
                             "pattern": "[1-7]"
                         },
                         "nuance_INCREMENT": {
                             "type": "number"
                         },
                         "nuance_STEP": {
                             "type": "string",
                             "pattern": "[day|week|month|year]"
                         },
                         "nuance_MODIFIER": {
                             "type": "string",
                             "pattern": "[fuzzy]"
                         }
                     }
                 }
             },
             "additionalProperties": false
         },
         "__main__.Date": {
             "type": "object",
             "properties": {
                 "nuance_DATE": {
                     "anyOf": [
                         {
                             "$ref": "#/definitions/__main__.DateAbs"
                         },
                         {
                             "$ref": "#/definitions/__main__.DateRel"
                         }
                     ]
                 }
             },
             "additionalProperties": false
         },
         "__main__.Time": {
             "type": "object",
             "properties": {
                 "nuance_TIME": {
                     "anyOf": [
                         {
                             "$ref": "#/definitions/__main__.TimeAbs"
                         },
                         {
                             "$ref": "#/definitions/__main__.TimeRel"
                         }
                     ]
                 }
             },
             "additionalProperties": false
         },
         "__main__.CalendarRange": {
             "type": "object",
             "properties": {
                 "nuance_CALENDAR_RANGE_START": {
                   "nuance_CALENDAR": {
                     "anyOf": [
                         {
                             "$ref": "#/definitions/__main__.Date"
                         },
                         {
                             "$ref": "#/definitions/__main__.Time"
                         }
                     ]
                   }
                 },
                 "nuance_CALENDAR_RANGE_END": {
                   "nuance_CALENDAR": {
                     "anyOf": [
                         {
                             "$ref": "#/definitions/__main__.Date"
                         },
                         {
                             "$ref": "#/definitions/__main__.Time"
                         }
                     ]
                   }
                 }
             },
             "additionalProperties": false
         }
     },
     "type": "object",
     "properties": {
         "CALENDARX": {
             "type": "object",
             "properties": {
                 "oneOf": [
                     {
                         "nuance_CALENDAR": {
                             "anyOf": [
                                 {
                                     "$ref": "#/definitions/__main__.Date"
                                 },
                                 {
                                     "$ref": "#/definitions/__main__.Time"
                                 }
                             ]
                         },
                         "nuance_CALENDAR_RANGE": {
                             "$ref": "#/definitions/__main__.CalendarRange"
                         }
                     }
                 ]
             }
         }
     },
     "additionalProperties": false
}