From f55d2646c3e4e835ad8fba776f7e42eeaef91d21 Mon Sep 17 00:00:00 2001 From: Bidisha Chakraborty <29803402+bidisha-c@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:02:08 -0800 Subject: [PATCH 1/2] Duplicate the BaseResolution in analyze-text and analyze-conversations --- .../Language/analyzeconversations.json | 660 +++++++++++++++++- .../data-plane/Language/analyzetext.json | 660 +++++++++++++++++- .../data-plane/Language/common.json | 658 ----------------- .../analyzeconversations.json | 660 +++++++++++++++++- .../2022-10-01-preview/analyzetext.json | 660 +++++++++++++++++- .../preview/2022-10-01-preview/common.json | 658 ----------------- 6 files changed, 2636 insertions(+), 1320 deletions(-) diff --git a/dev/cognitiveservices/data-plane/Language/analyzeconversations.json b/dev/cognitiveservices/data-plane/Language/analyzeconversations.json index 92ef9a1fdd91..a1a6ee2a6aae 100644 --- a/dev/cognitiveservices/data-plane/Language/analyzeconversations.json +++ b/dev/cognitiveservices/data-plane/Language/analyzeconversations.json @@ -828,7 +828,7 @@ "description": "The collection of entity resolution objects.", "type": "array", "items": { - "$ref": "common.json#/definitions/BaseResolution" + "$ref": "#/definitions/BaseResolution" } }, "extraInformation": { @@ -840,6 +840,664 @@ } } }, + "BaseResolution": { + "description": "The abstract base class for entity resolutions.", + "type": "object", + "discriminator": "resolutionKind", + "properties": { + "resolutionKind": { + "description": "The entity resolution object kind.", + "type": "string", + "enum": [ + "BooleanResolution", + "DateTimeResolution", + "NumberResolution", + "OrdinalResolution", + "SpeedResolution", + "WeightResolution", + "LengthResolution", + "VolumeResolution", + "AreaResolution", + "AgeResolution", + "InformationResolution", + "TemperatureResolution", + "CurrencyResolution", + "NumericRangeResolution", + "TemporalSpanResolution" + ], + "x-ms-enum": { + "name": "ResolutionKind", + "modelAsString": true + } + } + }, + "required": [ + "resolutionKind" + ] + }, + "QuantityResolution": { + "description": "Represents resolutions for quantities.", + "type": "object", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + } + }, + "required": [ + "value" + ] + }, + "AgeResolution": { + "description": "Represents the Age entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AgeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Year", + "Month", + "Week", + "Day" + ], + "x-ms-enum": { + "name": "AgeUnit", + "modelAsString": true + }, + "description": "The Age Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "VolumeResolution": { + "description": "Represents the volume entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "VolumeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" + ], + "x-ms-enum": { + "name": "VolumeUnit", + "modelAsString": true + }, + "description": "The Volume Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "SpeedResolution": { + "description": "Represents the speed entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "SpeedResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "MetersPerSecond", + "KilometersPerHour", + "KilometersPerMinute", + "KilometersPerSecond", + "MilesPerHour", + "Knot", + "FootPerSecond", + "FootPerMinute", + "YardsPerMinute", + "YardsPerSecond", + "MetersPerMillisecond", + "CentimetersPerMillisecond", + "KilometersPerMillisecond" + ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true + }, + "description": "The speed Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "AreaResolution": { + "description": "Represents the area entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AreaResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" + ], + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true + }, + "description": "The area Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "LengthResolution": { + "description": "Represents the length entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "LengthResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Pt" + ], + "x-ms-enum": { + "name": "LengthUnit", + "modelAsString": true + }, + "description": "The length Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "InformationResolution": { + "description": "Represents the information (data) entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "InformationResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" + ], + "x-ms-enum": { + "name": "InformationUnit", + "modelAsString": true + }, + "description": "The information (data) Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "TemperatureResolution": { + "description": "Represents the temperature entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemperatureResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true + }, + "description": "The temperature Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "WeightResolution": { + "description": "Represents the weight entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "WeightResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true + }, + "description": "The weight Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "CurrencyResolution": { + "description": "Represents the currency entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "CurrencyResolution", + "properties": { + "ISO4217": { + "type": "string", + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." + }, + "value": { + "type": "number", + "format": "double", + "description": "The money amount captured in the extracted entity" + }, + "unit": { + "type": "string", + "description": "The unit of the amount captured in the extracted entity" + } + }, + "required": [ + "value", + "unit" + ] + }, + "BooleanResolution": { + "description": "A resolution for boolean expressions", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "BooleanResolution", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + }, + "DateTimeResolution": { + "description": "A resolution for datetime entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "DateTimeResolution", + "properties": { + "timex": { + "$ref": "#/definitions/TimeExpression" + }, + "dateTimeSubKind": { + "type": "string", + "enum": [ + "Time", + "Date", + "DateTime", + "Duration", + "Set" + ], + "x-ms-enum": { + "name": "DateTimeSubKind", + "modelAsString": true + }, + "description": "The DateTime SubKind" + }, + "value": { + "type": "string", + "description": "The actual time that the extracted text denote." + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + } + }, + "required": [ + "timex", + "dateTimeSubKind", + "value" + ] + }, + "NumberResolution": { + "description": "A resolution for numeric entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumberResolution", + "properties": { + "numberKind": { + "type": "string", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" + ], + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true + }, + "description": "The type of the extracted number entity." + }, + "value": { + "type": "string", + "description": "A numeric representation of what the extracted text denotes." + } + }, + "required": [ + "numberKind", + "value" + ] + }, + "OrdinalResolution": { + "description": "A resolution for ordinal numbers entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "OrdinalResolution", + "properties": { + "offset": { + "type": "string", + "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" + }, + "relativeTo": { + "type": "string", + "enum": [ + "Current", + "End", + "Start" + ], + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true + }, + "description": "The reference point that the ordinal number denotes." + }, + "value": { + "type": "string", + "description": "A simple arithmetic expression that the ordinal denotes." + } + }, + "required": [ + "offset", + "relativeTo", + "value" + ] + }, + "TemporalSpanResolution": { + "description": "represents the resolution of a date and/or time span.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemporalSpanResolution", + "properties": { + "begin": { + "$ref": "#/definitions/TimeExpression" + }, + "end": { + "$ref": "#/definitions/TimeExpression" + }, + "duration": { + "type": "string", + "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + }, + "timex": { + "type": "string", + "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + } + } + }, + "NumericRangeResolution": { + "description": "represents the resolution of numeric intervals.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumericRangeResolution", + "properties": { + "rangeKind": { + "type": "string", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true + }, + "description": "The kind of range that the resolution object represents." + }, + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." + }, + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." + } + }, + "required": [ + "rangeKind", + "minimum", + "maximum" + ] + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true + } + }, + "TimeExpression": { + "type": "string", + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, "BaseExtraInformation": { "description": "The abstract base object for entity extra information.", "type": "object", diff --git a/dev/cognitiveservices/data-plane/Language/analyzetext.json b/dev/cognitiveservices/data-plane/Language/analyzetext.json index 15f9fe5da920..f1da7b5a3950 100644 --- a/dev/cognitiveservices/data-plane/Language/analyzetext.json +++ b/dev/cognitiveservices/data-plane/Language/analyzetext.json @@ -1598,7 +1598,7 @@ "description": "The collection of entity resolution objects.", "type": "array", "items": { - "$ref": "common.json#/definitions/BaseResolution" + "$ref": "#/definitions/BaseResolution" } } } @@ -1743,6 +1743,664 @@ } } }, + "BaseResolution": { + "description": "The abstract base class for entity resolutions.", + "type": "object", + "discriminator": "resolutionKind", + "properties": { + "resolutionKind": { + "description": "The entity resolution object kind.", + "type": "string", + "enum": [ + "BooleanResolution", + "DateTimeResolution", + "NumberResolution", + "OrdinalResolution", + "SpeedResolution", + "WeightResolution", + "LengthResolution", + "VolumeResolution", + "AreaResolution", + "AgeResolution", + "InformationResolution", + "TemperatureResolution", + "CurrencyResolution", + "NumericRangeResolution", + "TemporalSpanResolution" + ], + "x-ms-enum": { + "name": "ResolutionKind", + "modelAsString": true + } + } + }, + "required": [ + "resolutionKind" + ] + }, + "QuantityResolution": { + "description": "Represents resolutions for quantities.", + "type": "object", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + } + }, + "required": [ + "value" + ] + }, + "AgeResolution": { + "description": "Represents the Age entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AgeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Year", + "Month", + "Week", + "Day" + ], + "x-ms-enum": { + "name": "AgeUnit", + "modelAsString": true + }, + "description": "The Age Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "VolumeResolution": { + "description": "Represents the volume entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "VolumeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" + ], + "x-ms-enum": { + "name": "VolumeUnit", + "modelAsString": true + }, + "description": "The Volume Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "SpeedResolution": { + "description": "Represents the speed entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "SpeedResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "MeterPerSecond", + "KilometerPerHour", + "KilometerPerMinute", + "KilometerPerSecond", + "MilesPerHour", + "Knot", + "FootPerSecond", + "FootPerMinute", + "YardPerMinute", + "YardPerSecond", + "MeterPerMillisecond", + "CentimeterPerMillisecond", + "KilometerPerMillisecond" + ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true + }, + "description": "The speed Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "AreaResolution": { + "description": "Represents the area entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AreaResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" + ], + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true + }, + "description": "The area Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "LengthResolution": { + "description": "Represents the length entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "LengthResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Pt" + ], + "x-ms-enum": { + "name": "LengthUnit", + "modelAsString": true + }, + "description": "The length Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "InformationResolution": { + "description": "Represents the information (data) entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "InformationResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" + ], + "x-ms-enum": { + "name": "InformationUnit", + "modelAsString": true + }, + "description": "The information (data) Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "TemperatureResolution": { + "description": "Represents the temperature entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemperatureResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true + }, + "description": "The temperature Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "WeightResolution": { + "description": "Represents the weight entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "WeightResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true + }, + "description": "The weight Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "CurrencyResolution": { + "description": "Represents the currency entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "CurrencyResolution", + "properties": { + "iso4217": { + "type": "string", + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." + }, + "value": { + "type": "number", + "format": "double", + "description": "The money amount captured in the extracted entity" + }, + "unit": { + "type": "string", + "description": "The unit of the amount captured in the extracted entity" + } + }, + "required": [ + "value", + "unit" + ] + }, + "BooleanResolution": { + "description": "A resolution for boolean expressions", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "BooleanResolution", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + }, + "DateTimeResolution": { + "description": "A resolution for datetime entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "DateTimeResolution", + "properties": { + "timex": { + "$ref": "#/definitions/TimeExpression" + }, + "dateTimeSubKind": { + "type": "string", + "enum": [ + "Time", + "Date", + "DateTime", + "Duration", + "Set" + ], + "x-ms-enum": { + "name": "DateTimeSubKind", + "modelAsString": true + }, + "description": "The DateTime SubKind" + }, + "value": { + "type": "string", + "description": "The actual time that the extracted text denote." + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + } + }, + "required": [ + "timex", + "dateTimeSubKind", + "value" + ] + }, + "NumberResolution": { + "description": "A resolution for numeric entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumberResolution", + "properties": { + "numberKind": { + "type": "string", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" + ], + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true + }, + "description": "The type of the extracted number entity." + }, + "value": { + "type": "string", + "description": "A numeric representation of what the extracted text denotes." + } + }, + "required": [ + "numberKind", + "value" + ] + }, + "OrdinalResolution": { + "description": "A resolution for ordinal numbers entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "OrdinalResolution", + "properties": { + "offset": { + "type": "string", + "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" + }, + "relativeTo": { + "type": "string", + "enum": [ + "Current", + "End", + "Start" + ], + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true + }, + "description": "The reference point that the ordinal number denotes." + }, + "value": { + "type": "string", + "description": "A simple arithmetic expression that the ordinal denotes." + } + }, + "required": [ + "offset", + "relativeTo", + "value" + ] + }, + "TemporalSpanResolution": { + "description": "represents the resolution of a date and/or time span.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemporalSpanResolution", + "properties": { + "begin": { + "$ref": "#/definitions/TimeExpression" + }, + "end": { + "$ref": "#/definitions/TimeExpression" + }, + "duration": { + "type": "string", + "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + }, + "timex": { + "type": "string", + "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + } + } + }, + "NumericRangeResolution": { + "description": "represents the resolution of numeric intervals.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumericRangeResolution", + "properties": { + "rangeKind": { + "type": "string", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true + }, + "description": "The kind of range that the resolution object represents." + }, + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." + }, + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." + } + }, + "required": [ + "rangeKind", + "minimum", + "maximum" + ] + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true + } + }, + "TimeExpression": { + "type": "string", + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, "Match": { "type": "object", "required": [ diff --git a/dev/cognitiveservices/data-plane/Language/common.json b/dev/cognitiveservices/data-plane/Language/common.json index e59f09b4890f..2479b6d19524 100644 --- a/dev/cognitiveservices/data-plane/Language/common.json +++ b/dev/cognitiveservices/data-plane/Language/common.json @@ -832,664 +832,6 @@ "description": "The length of the context. Use of different 'stringIndexType' values can affect the length returned." } } - }, - "BaseResolution": { - "description": "The abstract base class for entity resolutions.", - "type": "object", - "discriminator": "resolutionKind", - "properties": { - "resolutionKind": { - "description": "The entity resolution object kind.", - "type": "string", - "enum": [ - "BooleanResolution", - "DateTimeResolution", - "NumberResolution", - "OrdinalResolution", - "SpeedResolution", - "WeightResolution", - "LengthResolution", - "VolumeResolution", - "AreaResolution", - "AgeResolution", - "InformationResolution", - "TemperatureResolution", - "CurrencyResolution", - "NumericRangeResolution", - "TemporalSpanResolution" - ], - "x-ms-enum": { - "name": "ResolutionKind", - "modelAsString": true - } - } - }, - "required": [ - "resolutionKind" - ] - }, - "QuantityResolution": { - "description": "Represents resolutions for quantities.", - "type": "object", - "properties": { - "value": { - "type": "number", - "format": "double", - "description": "The numeric value that the extracted text denotes." - } - }, - "required": [ - "value" - ] - }, - "AgeResolution": { - "description": "Represents the Age entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "AgeResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Year", - "Month", - "Week", - "Day" - ], - "x-ms-enum": { - "name": "AgeUnit", - "modelAsString": true - }, - "description": "The Age Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "VolumeResolution": { - "description": "Represents the volume entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "VolumeResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "CubicMeter", - "CubicCentimeter", - "CubicMillimeter", - "Hectoliter", - "Decaliter", - "Liter", - "Centiliter", - "Milliliter", - "CubicYard", - "CubicInch", - "CubicFoot", - "CubicMile", - "FluidOunce", - "Teaspoon", - "Tablespoon", - "Pint", - "Quart", - "Cup", - "Gill", - "Pinch", - "FluidDram", - "Barrel", - "Minim", - "Cord", - "Peck", - "Bushel", - "Hogshead" - ], - "x-ms-enum": { - "name": "VolumeUnit", - "modelAsString": true - }, - "description": "The Volume Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "SpeedResolution": { - "description": "Represents the speed entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "SpeedResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "MetersPerSecond", - "KilometersPerHour", - "KilometersPerMinute", - "KilometersPerSecond", - "MilesPerHour", - "Knot", - "FootPerSecond", - "FootPerMinute", - "YardsPerMinute", - "YardsPerSecond", - "MetersPerMillisecond", - "CentimetersPerMillisecond", - "KilometersPerMillisecond" - ], - "x-ms-enum": { - "name": "SpeedUnit", - "modelAsString": true - }, - "description": "The speed Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "AreaResolution": { - "description": "Represents the area entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "AreaResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "SquareKilometer", - "SquareHectometer", - "SquareDecameter", - "SquareDecimeter", - "SquareMeter", - "SquareCentimeter", - "SquareMillimeter", - "SquareInch", - "SquareFoot", - "SquareMile", - "SquareYard", - "Acre" - ], - "x-ms-enum": { - "name": "AreaUnit", - "modelAsString": true - }, - "description": "The area Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "LengthResolution": { - "description": "Represents the length entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "LengthResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilometer", - "Hectometer", - "Decameter", - "Meter", - "Decimeter", - "Centimeter", - "Millimeter", - "Micrometer", - "Nanometer", - "Picometer", - "Mile", - "Yard", - "Inch", - "Foot", - "LightYear", - "Pt" - ], - "x-ms-enum": { - "name": "LengthUnit", - "modelAsString": true - }, - "description": "The length Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "InformationResolution": { - "description": "Represents the information (data) entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "InformationResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Bit", - "Kilobit", - "Megabit", - "Gigabit", - "Terabit", - "Petabit", - "Byte", - "Kilobyte", - "Megabyte", - "Gigabyte", - "Terabyte", - "Petabyte" - ], - "x-ms-enum": { - "name": "InformationUnit", - "modelAsString": true - }, - "description": "The information (data) Unit of measurement." - } - }, - "required": [ - "unit" - ] - }, - "TemperatureResolution": { - "description": "Represents the temperature entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "TemperatureResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Fahrenheit", - "Kelvin", - "Rankine", - "Celsius" - ], - "x-ms-enum": { - "name": "TemperatureUnit", - "modelAsString": true - }, - "description": "The temperature Unit of measurement." - } - }, - "required": [ - "unit" - ] - }, - "WeightResolution": { - "description": "Represents the weight entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "WeightResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilogram", - "Gram", - "Milligram", - "Gallon", - "MetricTon", - "Ton", - "Pound", - "Ounce", - "Grain", - "PennyWeight", - "LongTonBritish", - "ShortTonUS", - "ShortHundredWeightUS", - "Stone", - "Dram" - ], - "x-ms-enum": { - "name": "WeightUnit", - "modelAsString": true - }, - "description": "The weight Unit of measurement." - } - }, - "required": [ - "unit" - ] - }, - "CurrencyResolution": { - "description": "Represents the currency entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "CurrencyResolution", - "properties": { - "ISO4217": { - "type": "string", - "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." - }, - "value": { - "type": "number", - "format": "double", - "description": "The money amount captured in the extracted entity" - }, - "unit": { - "type": "string", - "description": "The unit of the amount captured in the extracted entity" - } - }, - "required": [ - "value", - "unit" - ] - }, - "BooleanResolution": { - "description": "A resolution for boolean expressions", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "BooleanResolution", - "properties": { - "value": { - "type": "boolean" - } - }, - "required": [ - "value" - ] - }, - "DateTimeResolution": { - "description": "A resolution for datetime entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "DateTimeResolution", - "properties": { - "timex": { - "$ref": "#/definitions/TimeExpression" - }, - "dateTimeSubKind": { - "type": "string", - "enum": [ - "Time", - "Date", - "DateTime", - "Duration", - "Set" - ], - "x-ms-enum": { - "name": "DateTimeSubKind", - "modelAsString": true - }, - "description": "The DateTime SubKind" - }, - "value": { - "type": "string", - "description": "The actual time that the extracted text denote." - }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" - } - }, - "required": [ - "timex", - "dateTimeSubKind", - "value" - ] - }, - "NumberResolution": { - "description": "A resolution for numeric entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "NumberResolution", - "properties": { - "numberKind": { - "type": "string", - "enum": [ - "Integer", - "Decimal", - "Power", - "Fraction", - "Percent", - "Unspecified" - ], - "x-ms-enum": { - "name": "NumberKind", - "modelAsString": true - }, - "description": "The type of the extracted number entity." - }, - "value": { - "type": "string", - "description": "A numeric representation of what the extracted text denotes." - } - }, - "required": [ - "numberKind", - "value" - ] - }, - "OrdinalResolution": { - "description": "A resolution for ordinal numbers entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "OrdinalResolution", - "properties": { - "offset": { - "type": "string", - "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" - }, - "relativeTo": { - "type": "string", - "enum": [ - "Current", - "End", - "Start" - ], - "x-ms-enum": { - "name": "RelativeTo", - "modelAsString": true - }, - "description": "The reference point that the ordinal number denotes." - }, - "value": { - "type": "string", - "description": "A simple arithmetic expression that the ordinal denotes." - } - }, - "required": [ - "offset", - "relativeTo", - "value" - ] - }, - "TemporalSpanResolution": { - "description": "represents the resolution of a date and/or time span.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "TemporalSpanResolution", - "properties": { - "begin": { - "$ref": "#/definitions/TimeExpression" - }, - "end": { - "$ref": "#/definitions/TimeExpression" - }, - "duration": { - "type": "string", - "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" - }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" - }, - "timex": { - "type": "string", - "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." - } - } - }, - "NumericRangeResolution": { - "description": "represents the resolution of numeric intervals.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "NumericRangeResolution", - "properties": { - "rangeKind": { - "type": "string", - "enum": [ - "Number", - "Speed", - "Weight", - "Length", - "Volume", - "Area", - "Age", - "Information", - "Temperature", - "Currency" - ], - "x-ms-enum": { - "name": "RangeKind", - "modelAsString": true - }, - "description": "The kind of range that the resolution object represents." - }, - "minimum": { - "type": "number", - "format": "double", - "description": "The beginning value of the interval." - }, - "maximum": { - "type": "number", - "format": "double", - "description": "The ending value of the interval." - } - }, - "required": [ - "rangeKind", - "minimum", - "maximum" - ] - }, - "TemporalModifier": { - "type": "string", - "description": "An optional modifier of a date/time instance.", - "enum": [ - "AfterApprox", - "Before", - "BeforeStart", - "Approx", - "ReferenceUndefined", - "SinceEnd", - "AfterMid", - "Start", - "After", - "BeforeEnd", - "Until", - "End", - "Less", - "Since", - "AfterStart", - "BeforeApprox", - "Mid", - "More" - ], - "x-ms-enum": { - "name": "TemporalModifier", - "modelAsString": true - } - }, - "TimeExpression": { - "type": "string", - "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" } }, "parameters": { diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json index 36ccca359826..bdc2236efffb 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json @@ -828,7 +828,7 @@ "description": "The collection of entity resolution objects.", "type": "array", "items": { - "$ref": "common.json#/definitions/BaseResolution" + "$ref": "#/definitions/BaseResolution" } }, "extraInformation": { @@ -840,6 +840,664 @@ } } }, + "BaseResolution": { + "description": "The abstract base class for entity resolutions.", + "type": "object", + "discriminator": "resolutionKind", + "properties": { + "resolutionKind": { + "description": "The entity resolution object kind.", + "type": "string", + "enum": [ + "BooleanResolution", + "DateTimeResolution", + "NumberResolution", + "OrdinalResolution", + "SpeedResolution", + "WeightResolution", + "LengthResolution", + "VolumeResolution", + "AreaResolution", + "AgeResolution", + "InformationResolution", + "TemperatureResolution", + "CurrencyResolution", + "NumericRangeResolution", + "TemporalSpanResolution" + ], + "x-ms-enum": { + "name": "ResolutionKind", + "modelAsString": true + } + } + }, + "required": [ + "resolutionKind" + ] + }, + "QuantityResolution": { + "description": "Represents resolutions for quantities.", + "type": "object", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + } + }, + "required": [ + "value" + ] + }, + "AgeResolution": { + "description": "Represents the Age entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AgeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Year", + "Month", + "Week", + "Day" + ], + "x-ms-enum": { + "name": "AgeUnit", + "modelAsString": true + }, + "description": "The Age Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "VolumeResolution": { + "description": "Represents the volume entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "VolumeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" + ], + "x-ms-enum": { + "name": "VolumeUnit", + "modelAsString": true + }, + "description": "The Volume Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "SpeedResolution": { + "description": "Represents the speed entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "SpeedResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "MetersPerSecond", + "KilometersPerHour", + "KilometersPerMinute", + "KilometersPerSecond", + "MilesPerHour", + "Knot", + "FootPerSecond", + "FootPerMinute", + "YardsPerMinute", + "YardsPerSecond", + "MetersPerMillisecond", + "CentimetersPerMillisecond", + "KilometersPerMillisecond" + ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true + }, + "description": "The speed Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "AreaResolution": { + "description": "Represents the area entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AreaResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" + ], + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true + }, + "description": "The area Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "LengthResolution": { + "description": "Represents the length entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "LengthResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Pt" + ], + "x-ms-enum": { + "name": "LengthUnit", + "modelAsString": true + }, + "description": "The length Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "InformationResolution": { + "description": "Represents the information (data) entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "InformationResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" + ], + "x-ms-enum": { + "name": "InformationUnit", + "modelAsString": true + }, + "description": "The information (data) Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "TemperatureResolution": { + "description": "Represents the temperature entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemperatureResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true + }, + "description": "The temperature Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "WeightResolution": { + "description": "Represents the weight entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "WeightResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true + }, + "description": "The weight Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "CurrencyResolution": { + "description": "Represents the currency entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "CurrencyResolution", + "properties": { + "ISO4217": { + "type": "string", + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." + }, + "value": { + "type": "number", + "format": "double", + "description": "The money amount captured in the extracted entity" + }, + "unit": { + "type": "string", + "description": "The unit of the amount captured in the extracted entity" + } + }, + "required": [ + "value", + "unit" + ] + }, + "BooleanResolution": { + "description": "A resolution for boolean expressions", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "BooleanResolution", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + }, + "DateTimeResolution": { + "description": "A resolution for datetime entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "DateTimeResolution", + "properties": { + "timex": { + "$ref": "#/definitions/TimeExpression" + }, + "dateTimeSubKind": { + "type": "string", + "enum": [ + "Time", + "Date", + "DateTime", + "Duration", + "Set" + ], + "x-ms-enum": { + "name": "DateTimeSubKind", + "modelAsString": true + }, + "description": "The DateTime SubKind" + }, + "value": { + "type": "string", + "description": "The actual time that the extracted text denote." + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + } + }, + "required": [ + "timex", + "dateTimeSubKind", + "value" + ] + }, + "NumberResolution": { + "description": "A resolution for numeric entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumberResolution", + "properties": { + "numberKind": { + "type": "string", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" + ], + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true + }, + "description": "The type of the extracted number entity." + }, + "value": { + "type": "string", + "description": "A numeric representation of what the extracted text denotes." + } + }, + "required": [ + "numberKind", + "value" + ] + }, + "OrdinalResolution": { + "description": "A resolution for ordinal numbers entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "OrdinalResolution", + "properties": { + "offset": { + "type": "string", + "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" + }, + "relativeTo": { + "type": "string", + "enum": [ + "Current", + "End", + "Start" + ], + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true + }, + "description": "The reference point that the ordinal number denotes." + }, + "value": { + "type": "string", + "description": "A simple arithmetic expression that the ordinal denotes." + } + }, + "required": [ + "offset", + "relativeTo", + "value" + ] + }, + "TemporalSpanResolution": { + "description": "represents the resolution of a date and/or time span.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemporalSpanResolution", + "properties": { + "begin": { + "$ref": "#/definitions/TimeExpression" + }, + "end": { + "$ref": "#/definitions/TimeExpression" + }, + "duration": { + "type": "string", + "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + }, + "timex": { + "type": "string", + "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + } + } + }, + "NumericRangeResolution": { + "description": "represents the resolution of numeric intervals.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumericRangeResolution", + "properties": { + "rangeKind": { + "type": "string", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true + }, + "description": "The kind of range that the resolution object represents." + }, + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." + }, + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." + } + }, + "required": [ + "rangeKind", + "minimum", + "maximum" + ] + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true + } + }, + "TimeExpression": { + "type": "string", + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, "BaseExtraInformation": { "description": "The abstract base object for entity extra information.", "type": "object", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json index 0bf26e40789c..2f18f562f167 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json @@ -1598,7 +1598,7 @@ "description": "The collection of entity resolution objects.", "type": "array", "items": { - "$ref": "common.json#/definitions/BaseResolution" + "$ref": "#/definitions/BaseResolution" } } } @@ -1743,6 +1743,664 @@ } } }, + "BaseResolution": { + "description": "The abstract base class for entity resolutions.", + "type": "object", + "discriminator": "resolutionKind", + "properties": { + "resolutionKind": { + "description": "The entity resolution object kind.", + "type": "string", + "enum": [ + "BooleanResolution", + "DateTimeResolution", + "NumberResolution", + "OrdinalResolution", + "SpeedResolution", + "WeightResolution", + "LengthResolution", + "VolumeResolution", + "AreaResolution", + "AgeResolution", + "InformationResolution", + "TemperatureResolution", + "CurrencyResolution", + "NumericRangeResolution", + "TemporalSpanResolution" + ], + "x-ms-enum": { + "name": "ResolutionKind", + "modelAsString": true + } + } + }, + "required": [ + "resolutionKind" + ] + }, + "QuantityResolution": { + "description": "Represents resolutions for quantities.", + "type": "object", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + } + }, + "required": [ + "value" + ] + }, + "AgeResolution": { + "description": "Represents the Age entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AgeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Year", + "Month", + "Week", + "Day" + ], + "x-ms-enum": { + "name": "AgeUnit", + "modelAsString": true + }, + "description": "The Age Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "VolumeResolution": { + "description": "Represents the volume entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "VolumeResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" + ], + "x-ms-enum": { + "name": "VolumeUnit", + "modelAsString": true + }, + "description": "The Volume Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "SpeedResolution": { + "description": "Represents the speed entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "SpeedResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "MeterPerSecond", + "KilometerPerHour", + "KilometerPerMinute", + "KilometerPerSecond", + "MilesPerHour", + "Knot", + "FootPerSecond", + "FootPerMinute", + "YardPerMinute", + "YardPerSecond", + "MeterPerMillisecond", + "CentimeterPerMillisecond", + "KilometerPerMillisecond" + ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true + }, + "description": "The speed Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "AreaResolution": { + "description": "Represents the area entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "AreaResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" + ], + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true + }, + "description": "The area Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "LengthResolution": { + "description": "Represents the length entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "LengthResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Pt" + ], + "x-ms-enum": { + "name": "LengthUnit", + "modelAsString": true + }, + "description": "The length Unit of measurement" + } + }, + "required": [ + "unit" + ] + }, + "InformationResolution": { + "description": "Represents the information (data) entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "InformationResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" + ], + "x-ms-enum": { + "name": "InformationUnit", + "modelAsString": true + }, + "description": "The information (data) Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "TemperatureResolution": { + "description": "Represents the temperature entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemperatureResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true + }, + "description": "The temperature Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "WeightResolution": { + "description": "Represents the weight entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "WeightResolution", + "properties": { + "unit": { + "type": "string", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true + }, + "description": "The weight Unit of measurement." + } + }, + "required": [ + "unit" + ] + }, + "CurrencyResolution": { + "description": "Represents the currency entity resolution model.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + }, + { + "$ref": "#/definitions/QuantityResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "CurrencyResolution", + "properties": { + "iso4217": { + "type": "string", + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." + }, + "value": { + "type": "number", + "format": "double", + "description": "The money amount captured in the extracted entity" + }, + "unit": { + "type": "string", + "description": "The unit of the amount captured in the extracted entity" + } + }, + "required": [ + "value", + "unit" + ] + }, + "BooleanResolution": { + "description": "A resolution for boolean expressions", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "BooleanResolution", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + }, + "DateTimeResolution": { + "description": "A resolution for datetime entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "DateTimeResolution", + "properties": { + "timex": { + "$ref": "#/definitions/TimeExpression" + }, + "dateTimeSubKind": { + "type": "string", + "enum": [ + "Time", + "Date", + "DateTime", + "Duration", + "Set" + ], + "x-ms-enum": { + "name": "DateTimeSubKind", + "modelAsString": true + }, + "description": "The DateTime SubKind" + }, + "value": { + "type": "string", + "description": "The actual time that the extracted text denote." + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + } + }, + "required": [ + "timex", + "dateTimeSubKind", + "value" + ] + }, + "NumberResolution": { + "description": "A resolution for numeric entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumberResolution", + "properties": { + "numberKind": { + "type": "string", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" + ], + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true + }, + "description": "The type of the extracted number entity." + }, + "value": { + "type": "string", + "description": "A numeric representation of what the extracted text denotes." + } + }, + "required": [ + "numberKind", + "value" + ] + }, + "OrdinalResolution": { + "description": "A resolution for ordinal numbers entity instances.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "OrdinalResolution", + "properties": { + "offset": { + "type": "string", + "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" + }, + "relativeTo": { + "type": "string", + "enum": [ + "Current", + "End", + "Start" + ], + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true + }, + "description": "The reference point that the ordinal number denotes." + }, + "value": { + "type": "string", + "description": "A simple arithmetic expression that the ordinal denotes." + } + }, + "required": [ + "offset", + "relativeTo", + "value" + ] + }, + "TemporalSpanResolution": { + "description": "represents the resolution of a date and/or time span.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "TemporalSpanResolution", + "properties": { + "begin": { + "$ref": "#/definitions/TimeExpression" + }, + "end": { + "$ref": "#/definitions/TimeExpression" + }, + "duration": { + "type": "string", + "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier" + }, + "timex": { + "type": "string", + "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + } + } + }, + "NumericRangeResolution": { + "description": "represents the resolution of numeric intervals.", + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "type": "object", + "x-ms-discriminator-value": "NumericRangeResolution", + "properties": { + "rangeKind": { + "type": "string", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true + }, + "description": "The kind of range that the resolution object represents." + }, + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." + }, + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." + } + }, + "required": [ + "rangeKind", + "minimum", + "maximum" + ] + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true + } + }, + "TimeExpression": { + "type": "string", + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, "Match": { "type": "object", "required": [ diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/common.json b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/common.json index a6ab296d945e..29bc08014939 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/common.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/common.json @@ -832,664 +832,6 @@ "description": "The length of the context. Use of different 'stringIndexType' values can affect the length returned." } } - }, - "BaseResolution": { - "description": "The abstract base class for entity resolutions.", - "type": "object", - "discriminator": "resolutionKind", - "properties": { - "resolutionKind": { - "description": "The entity resolution object kind.", - "type": "string", - "enum": [ - "BooleanResolution", - "DateTimeResolution", - "NumberResolution", - "OrdinalResolution", - "SpeedResolution", - "WeightResolution", - "LengthResolution", - "VolumeResolution", - "AreaResolution", - "AgeResolution", - "InformationResolution", - "TemperatureResolution", - "CurrencyResolution", - "NumericRangeResolution", - "TemporalSpanResolution" - ], - "x-ms-enum": { - "name": "ResolutionKind", - "modelAsString": true - } - } - }, - "required": [ - "resolutionKind" - ] - }, - "QuantityResolution": { - "description": "Represents resolutions for quantities.", - "type": "object", - "properties": { - "value": { - "type": "number", - "format": "double", - "description": "The numeric value that the extracted text denotes." - } - }, - "required": [ - "value" - ] - }, - "AgeResolution": { - "description": "Represents the Age entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "AgeResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Year", - "Month", - "Week", - "Day" - ], - "x-ms-enum": { - "name": "AgeUnit", - "modelAsString": true - }, - "description": "The Age Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "VolumeResolution": { - "description": "Represents the volume entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "VolumeResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "CubicMeter", - "CubicCentimeter", - "CubicMillimeter", - "Hectoliter", - "Decaliter", - "Liter", - "Centiliter", - "Milliliter", - "CubicYard", - "CubicInch", - "CubicFoot", - "CubicMile", - "FluidOunce", - "Teaspoon", - "Tablespoon", - "Pint", - "Quart", - "Cup", - "Gill", - "Pinch", - "FluidDram", - "Barrel", - "Minim", - "Cord", - "Peck", - "Bushel", - "Hogshead" - ], - "x-ms-enum": { - "name": "VolumeUnit", - "modelAsString": true - }, - "description": "The Volume Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "SpeedResolution": { - "description": "Represents the speed entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "SpeedResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "MetersPerSecond", - "KilometersPerHour", - "KilometersPerMinute", - "KilometersPerSecond", - "MilesPerHour", - "Knot", - "FootPerSecond", - "FootPerMinute", - "YardsPerMinute", - "YardsPerSecond", - "MetersPerMillisecond", - "CentimetersPerMillisecond", - "KilometersPerMillisecond" - ], - "x-ms-enum": { - "name": "SpeedUnit", - "modelAsString": true - }, - "description": "The speed Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "AreaResolution": { - "description": "Represents the area entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "AreaResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "SquareKilometer", - "SquareHectometer", - "SquareDecameter", - "SquareDecimeter", - "SquareMeter", - "SquareCentimeter", - "SquareMillimeter", - "SquareInch", - "SquareFoot", - "SquareMile", - "SquareYard", - "Acre" - ], - "x-ms-enum": { - "name": "AreaUnit", - "modelAsString": true - }, - "description": "The area Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "LengthResolution": { - "description": "Represents the length entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "LengthResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilometer", - "Hectometer", - "Decameter", - "Meter", - "Decimeter", - "Centimeter", - "Millimeter", - "Micrometer", - "Nanometer", - "Picometer", - "Mile", - "Yard", - "Inch", - "Foot", - "LightYear", - "Pt" - ], - "x-ms-enum": { - "name": "LengthUnit", - "modelAsString": true - }, - "description": "The length Unit of measurement" - } - }, - "required": [ - "unit" - ] - }, - "InformationResolution": { - "description": "Represents the information (data) entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "InformationResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Bit", - "Kilobit", - "Megabit", - "Gigabit", - "Terabit", - "Petabit", - "Byte", - "Kilobyte", - "Megabyte", - "Gigabyte", - "Terabyte", - "Petabyte" - ], - "x-ms-enum": { - "name": "InformationUnit", - "modelAsString": true - }, - "description": "The information (data) Unit of measurement." - } - }, - "required": [ - "unit" - ] - }, - "TemperatureResolution": { - "description": "Represents the temperature entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "TemperatureResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Fahrenheit", - "Kelvin", - "Rankine", - "Celsius" - ], - "x-ms-enum": { - "name": "TemperatureUnit", - "modelAsString": true - }, - "description": "The temperature Unit of measurement." - } - }, - "required": [ - "unit" - ] - }, - "WeightResolution": { - "description": "Represents the weight entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "WeightResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilogram", - "Gram", - "Milligram", - "Gallon", - "MetricTon", - "Ton", - "Pound", - "Ounce", - "Grain", - "PennyWeight", - "LongTonBritish", - "ShortTonUS", - "ShortHundredWeightUS", - "Stone", - "Dram" - ], - "x-ms-enum": { - "name": "WeightUnit", - "modelAsString": true - }, - "description": "The weight Unit of measurement." - } - }, - "required": [ - "unit" - ] - }, - "CurrencyResolution": { - "description": "Represents the currency entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "CurrencyResolution", - "properties": { - "ISO4217": { - "type": "string", - "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." - }, - "value": { - "type": "number", - "format": "double", - "description": "The money amount captured in the extracted entity" - }, - "unit": { - "type": "string", - "description": "The unit of the amount captured in the extracted entity" - } - }, - "required": [ - "value", - "unit" - ] - }, - "BooleanResolution": { - "description": "A resolution for boolean expressions", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "BooleanResolution", - "properties": { - "value": { - "type": "boolean" - } - }, - "required": [ - "value" - ] - }, - "DateTimeResolution": { - "description": "A resolution for datetime entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "DateTimeResolution", - "properties": { - "timex": { - "$ref": "#/definitions/TimeExpression" - }, - "dateTimeSubKind": { - "type": "string", - "enum": [ - "Time", - "Date", - "DateTime", - "Duration", - "Set" - ], - "x-ms-enum": { - "name": "DateTimeSubKind", - "modelAsString": true - }, - "description": "The DateTime SubKind" - }, - "value": { - "type": "string", - "description": "The actual time that the extracted text denote." - }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" - } - }, - "required": [ - "timex", - "dateTimeSubKind", - "value" - ] - }, - "NumberResolution": { - "description": "A resolution for numeric entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "NumberResolution", - "properties": { - "numberKind": { - "type": "string", - "enum": [ - "Integer", - "Decimal", - "Power", - "Fraction", - "Percent", - "Unspecified" - ], - "x-ms-enum": { - "name": "NumberKind", - "modelAsString": true - }, - "description": "The type of the extracted number entity." - }, - "value": { - "type": "string", - "description": "A numeric representation of what the extracted text denotes." - } - }, - "required": [ - "numberKind", - "value" - ] - }, - "OrdinalResolution": { - "description": "A resolution for ordinal numbers entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "OrdinalResolution", - "properties": { - "offset": { - "type": "string", - "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" - }, - "relativeTo": { - "type": "string", - "enum": [ - "Current", - "End", - "Start" - ], - "x-ms-enum": { - "name": "RelativeTo", - "modelAsString": true - }, - "description": "The reference point that the ordinal number denotes." - }, - "value": { - "type": "string", - "description": "A simple arithmetic expression that the ordinal denotes." - } - }, - "required": [ - "offset", - "relativeTo", - "value" - ] - }, - "TemporalSpanResolution": { - "description": "represents the resolution of a date and/or time span.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "TemporalSpanResolution", - "properties": { - "begin": { - "$ref": "#/definitions/TimeExpression" - }, - "end": { - "$ref": "#/definitions/TimeExpression" - }, - "duration": { - "type": "string", - "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" - }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" - }, - "timex": { - "type": "string", - "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." - } - } - }, - "NumericRangeResolution": { - "description": "represents the resolution of numeric intervals.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], - "type": "object", - "x-ms-discriminator-value": "NumericRangeResolution", - "properties": { - "rangeKind": { - "type": "string", - "enum": [ - "Number", - "Speed", - "Weight", - "Length", - "Volume", - "Area", - "Age", - "Information", - "Temperature", - "Currency" - ], - "x-ms-enum": { - "name": "RangeKind", - "modelAsString": true - }, - "description": "The kind of range that the resolution object represents." - }, - "minimum": { - "type": "number", - "format": "double", - "description": "The beginning value of the interval." - }, - "maximum": { - "type": "number", - "format": "double", - "description": "The ending value of the interval." - } - }, - "required": [ - "rangeKind", - "minimum", - "maximum" - ] - }, - "TemporalModifier": { - "type": "string", - "description": "An optional modifier of a date/time instance.", - "enum": [ - "AfterApprox", - "Before", - "BeforeStart", - "Approx", - "ReferenceUndefined", - "SinceEnd", - "AfterMid", - "Start", - "After", - "BeforeEnd", - "Until", - "End", - "Less", - "Since", - "AfterStart", - "BeforeApprox", - "Mid", - "More" - ], - "x-ms-enum": { - "name": "TemporalModifier", - "modelAsString": true - } - }, - "TimeExpression": { - "type": "string", - "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" } }, "parameters": { From dc50a140af92e5667bbe11cf4a54b2e7e1f7607a Mon Sep 17 00:00:00 2001 From: Bidisha Chakraborty <29803402+bidisha-c@users.noreply.github.com> Date: Tue, 15 Nov 2022 17:20:55 -0800 Subject: [PATCH 2/2] Address comments --- .../data-plane/Language/analyzeconversations.json | 3 ++- dev/cognitiveservices/data-plane/Language/analyzetext.json | 5 +++-- .../preview/2022-10-01-preview/analyzeconversations.json | 3 ++- .../Language/preview/2022-10-01-preview/analyzetext.json | 5 +++-- .../Language/stable/2022-05-01/analyzeconversations.json | 3 ++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dev/cognitiveservices/data-plane/Language/analyzeconversations.json b/dev/cognitiveservices/data-plane/Language/analyzeconversations.json index a1a6ee2a6aae..0019fee295d9 100644 --- a/dev/cognitiveservices/data-plane/Language/analyzeconversations.json +++ b/dev/cognitiveservices/data-plane/Language/analyzeconversations.json @@ -1343,7 +1343,8 @@ "description": "The type of the extracted number entity." }, "value": { - "type": "string", + "type": "number", + "format": "double", "description": "A numeric representation of what the extracted text denotes." } }, diff --git a/dev/cognitiveservices/data-plane/Language/analyzetext.json b/dev/cognitiveservices/data-plane/Language/analyzetext.json index f1da7b5a3950..e6d4990cd412 100644 --- a/dev/cognitiveservices/data-plane/Language/analyzetext.json +++ b/dev/cognitiveservices/data-plane/Language/analyzetext.json @@ -1902,7 +1902,7 @@ "KilometerPerHour", "KilometerPerMinute", "KilometerPerSecond", - "MilesPerHour", + "MilePerHour", "Knot", "FootPerSecond", "FootPerMinute", @@ -2246,7 +2246,8 @@ "description": "The type of the extracted number entity." }, "value": { - "type": "string", + "type": "number", + "format": "double", "description": "A numeric representation of what the extracted text denotes." } }, diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json index bdc2236efffb..1ff482f4b3d2 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzeconversations.json @@ -1343,7 +1343,8 @@ "description": "The type of the extracted number entity." }, "value": { - "type": "string", + "type": "number", + "format": "double", "description": "A numeric representation of what the extracted text denotes." } }, diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json index 2f18f562f167..9fc684b74ac4 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-10-01-preview/analyzetext.json @@ -1902,7 +1902,7 @@ "KilometerPerHour", "KilometerPerMinute", "KilometerPerSecond", - "MilesPerHour", + "MilePerHour", "Knot", "FootPerSecond", "FootPerMinute", @@ -2246,7 +2246,8 @@ "description": "The type of the extracted number entity." }, "value": { - "type": "string", + "type": "number", + "format": "double", "description": "A numeric representation of what the extracted text denotes." } }, diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json index 02ee702a667c..10c1683bfa82 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json @@ -1219,7 +1219,8 @@ "description": "The type of the extracted number entity." }, "value": { - "type": "string", + "type": "number", + "format": "double", "description": "A numeric representation of what the extracted text denotes." } },