nuance_QUANTITY
Defines values of magnitude. Can be relative (for example, “greater than nine”, < 100, “some”, “lots”) or absolute (for example, “ten”, 20). Note that QUANTITY_ABS does not have built-in grammars.
See Changes between 6.x and 9.x for nuance_QUANTITY.
Sample language
- a lot
- 10
- at least 10
- less than 10
- maximum of 10
- > 25
- none
Examples
Responses for the above samples are shown below.
Example: a lot
{
"nuance_MODIFIER": "LOTS"
}
Example: 10
{
"nuance_QUANTITY_ABS": {
"nuance_NUMBER": {
"nuance_CARDINAL_NUMBER": 10
}
}
}
Example: at least ten
{
"nuance_MODIFIER": "GE",
"nuance_QUANTITY_ABS": {
"nuance_NUMBER": {
"nuance_CARDINAL_NUMBER": 10
}
}
}
Example: less than ten
{
"nuance_MODIFIER": "LT",
"nuance_QUANTITY_ABS": {
"nuance_NUMBER": {
"nuance_CARDINAL_NUMBER": 10
}
}
}
Example: maximum of 10
{
"nuance_MODIFIER": "LE",
"nuance_QUANTITY_ABS": {
"nuance_NUMBER": {
"nuance_CARDINAL_NUMBER": 10
}
}
}
Example: > 25
{
"nuance_MODIFIER": "GT",
"nuance_QUANTITY_ABS": {
"nuance_NUMBER": {
"nuance_CARDINAL_NUMBER": 25
}
}
}
Example: none
{
"nuance_MODIFIER": "NONE"
}
Numeric value range
<= 99,999,999
Changes between 6.x and 9.x for nuance_QUANTITY
nuance_NUMBER now returns, instead of a number, either:
Example: “less than ten”
- 6.x:
{"nuance_MODIFIER":"LT","nuance_QUANTITY_ABS":{"nuance_NUMBER":10}}
- 9.x:
{"nuance_MODIFIER":"LT","nuance_QUANTITY_ABS":{"nuance_NUMBER":{"nuance_CARDINAL_NUMBER":10}}}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"nuance_QUANTITY": {
"type": "object",
"properties": {
"oneOf": [{
"nuance_QUANTITY_ABS": {
"type": "object",
"properties": {
"nuance_NUMBER": {
"type": "object",
"properties": {
"oneOf": [{
"nuance_CARDINAL_NUMBER": {
"anyOf": [{
"type": "number"
}, {
"type": "string"
}
]
}
}, {
"nuance_DOUBLE": {
"anyOf": [{
"type": "number"
}, {
"type": "string"
}
]
}
}
]
}
}
}
}
}, {
"nuance_QUANTITY_REL": {
"type": "object",
"properties": {
"nuance_MODIFIER": {
"type": "string",
"pattern": "[GT|LT|GE|LE|EQ|INC|NONE|SOME|LOTS]"
},
"nuance_QUANTITY_ABS": {
"type": "object",
"properties": {
"nuance_NUMBER": {
"type": "object",
"properties": {
"oneOf": [{
"nuance_CARDINAL_NUMBER": {
"anyOf": [{
"type": "number"
}, {
"type": "string"
}
]
}
}, {
"nuance_DOUBLE": {
"anyOf": [{
"type": "number"
}, {
"type": "string"
}
]
}
}
]
}
}
}
}
},
"required": "nuance_MODIFIER"
}
}
]
}
}
},
"additionalProperties": false
}
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.