nuance_DISTANCE

Amount of space between two things or people.

Sample language

  • five meters
  • 42 km
  • seven inches

Examples

The input “more than three km” returns this response:

{
  "nuance_DISTANCE_REL": {
     "nuance_DISTANCE_ABS": {
       "nuance_UNIT": "km",
       "nuance_NUMBER": 3
     },
     "nuance_MODIFIER": "GT"
  }
}

The input “two and a half meters” returns:

{
  "nuance_DISTANCE_ABS": {
     "nuance_UNIT": "m",
     "nuance_NUMBER": 2.5
  }
}

Numeric value range

<= 99,999,999

Schema

{
     "$schema": "http://json-schema.org/draft-04/schema#",
     "type": "object",
     "properties": {
         "nuance_DISTANCE": {
             "type": "object",
             "properties": {
                 "oneOf": [{
                         "nuance_DISTANCE_ABS": {
                             "type": "object",
                             "properties": {
                                 "nuance_UNIT": {
                                     "type": "string",
                                     "pattern": "[km|m|cm|mm|mi|yd|ft|in]"
                                 },
                                 "nuance_MODIFIER": {
                                     "type": "string",
                                     "pattern": "fuzzy"
                                 },
                                 "nuance_NUMBER": {
                                     "anyOf": [{
                                             "type": "number"
                                         },
                                         {
                                             "type": "string"
                                         }
                                     ]

                                 }
                             }
                         }
                     },
                     {
                         "nuance_DISTANCE_REL": {
                             "type": "object",
                             "properties": {
                                 "nuance_DISTANCE_ABS": {
                                     "type": "object",
                                     "properties": {
                                         "nuance_NUMBER": {
                                             "anyOf": [{
                                                     "type": "number"
                                                 },
                                                 {
                                                     "type": "string"
                                                 }
                                             ]

                                         },
                                         "nuance_UNIT": {
                                             "type": "string",
                                             "pattern": "[km|m|cm|mm|mi|yd|ft|in]"
                                         }
                                     },
                                     "nuance_MODIFIER": {
                                         "type": "string",
                                         "pattern": "[GT|LT|GE|LE|EQ|INC]"
                                     }
                                 }
                             },
                             "required": "nuance_MODIFIER"
                         }
                     }
                 ]
             }
         }
     },
     "additionalProperties": false
}