nuance_TEMPERATURE

Temperature as expressed in degrees such as Celsius or Fahrenheit. Temperature can be expressed as a whole number or a floating point value.

See Changes between 6.x and 9.x for nuance_TEMPERATURE.

Sample language

  • twenty three degrees Celsius
  • eighteen point five degrees Fahrenheit
  • two hundred fifty three degrees Kelvin
  • Fahrenheit four hundred fifty one
  • eighteen below zero

Examples

Responses for the above samples are shown below.

Example: twenty three degrees Celsius

{
     "nuance_NUMBER": {
         "nuance_CARDINAL_NUMBER": 23
     },
     "nuance_UNIT": "C"
}

Example: eighteen point five degrees Fahrenheit

{
     "nuance_NUMBER": {
         "nuance_DOUBLE": 18.5
     },
     "nuance_UNIT": "F"
}

Example: two hundred fifty three degrees Kelvin

{
     "nuance_NUMBER": {
         "nuance_CARDINAL_NUMBER": 253
     },
     "nuance_UNIT": "K"
}

Example: Fahrenheit four hundred fifty one

{
     "nuance_NUMBER": {
         "nuance_CARDINAL_NUMBER": 451
     },
     "nuance_UNIT": "F"
}

Example: eighteen below zero

{
     "nuance_NUMBER": {
         "nuance_CARDINAL_NUMBER": -18
     }
}

Numeric value range

  • Up to 4 digits (<= 9,999) for whole numbers
  • For the whole part and decimal part in decimal-point numbers: <= 99,999,999
  • For fractions: Denominators up to tenth

Changes between 6.x and 9.x for nuance_TEMPERATURE

nuance_NUMBER now returns, instead of a number, either:

Example: “twenty two degrees celsius”

  • 6.x: {"nuance_NUMBER":23,"nuance_UNIT":"C"}
  • 9.x: {"nuance_NUMBER":{"nuance_CARDINAL_NUMBER":23},"nuance_UNIT":"C"}

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "nuance_TEMPERATURE": {
      "type": "object",
      "properties": {
        "nuance_UNIT": {
          "type": "string",
          "pattern": "[C|F|K]"
        },
        "nuance_NUMBER": {
          "type": "object",
          "properties": {
            "oneOf": [{
                "nuance_CARDINAL_NUMBER": {
                  "anyOf": [{
                      "type": "number"
                    }, {
                      "type": "string"
                    }
                  ]

                }
              }, {
                "nuance_DOUBLE": {
                  "anyOf": [{
                      "type": "number"
                    }, {
                      "type": "string"
                    }
                  ]

                }
              }
            ]
          }

        }

      },
      "required": [
        "nuance_NUMBER"
      ]
    }
  },
  "additionalProperties": false
}