azure_cognitiveservices_luisruntime 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2.0/generated/azure_cognitiveservices_luisruntime/luis_runtime_client.rb +1 -1
- data/lib/2.0/generated/azure_cognitiveservices_luisruntime/prediction.rb +6 -6
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime.rb +39 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/luis_runtime_client.rb +131 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/dynamic_list.rb +67 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/error.rb +47 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/error_body.rb +57 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/external_entity.rb +80 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/intent.rb +58 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction.rb +121 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction_request.rb +101 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction_request_options.rb +59 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction_response.rb +58 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/request_list.rb +76 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/models/sentiment.rb +57 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/module_definition.rb +9 -0
- data/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb +267 -0
- data/lib/azure_cognitiveservices_luisruntime.rb +1 -0
- data/lib/profiles/latest/modules/luisruntime_profile_module.rb +38 -30
- data/lib/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be4e6b7e399b56b2d6ab6f6a1eaddb27654a4af5b811c3b79c927abedb920034
|
4
|
+
data.tar.gz: b8ba8430861a3f2b1b907f8493318e567c8dae1e283afcb75550ffbba84b202a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9fd5f4e5868dcd72a8867c176771d38cb695eeaf7e2451b218145a512f59240961c8386592e0eaa5cd8558035804521c37cfb57f877d7552832744b8310f67b
|
7
|
+
data.tar.gz: 37be850584ae59f4eb64fb53a229c7a827961778a4c04e6d6c09cb2ca83bf52fea9d992d43eddd46b2d973580edb2f3dc635b15d6998b772cda02c57a4eeedc4
|
@@ -124,7 +124,7 @@ module Azure::CognitiveServices::LuisRuntime::V2_0
|
|
124
124
|
#
|
125
125
|
def add_telemetry
|
126
126
|
sdk_information = 'azure_cognitiveservices_luisruntime'
|
127
|
-
sdk_information = "#{sdk_information}/0.17.
|
127
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
128
128
|
add_user_agent_information(sdk_information)
|
129
129
|
end
|
130
130
|
end
|
@@ -25,7 +25,7 @@ module Azure::CognitiveServices::LuisRuntime::V2_0
|
|
25
25
|
# Gets predictions for a given utterance, in the form of intents and entities.
|
26
26
|
# The current maximum query size is 500 characters.
|
27
27
|
#
|
28
|
-
# @param app_id
|
28
|
+
# @param app_id The LUIS application ID (Guid).
|
29
29
|
# @param query [String] The utterance to predict.
|
30
30
|
# @param timezone_offset [Float] The timezone offset for the location of the
|
31
31
|
# request.
|
@@ -34,7 +34,7 @@ module Azure::CognitiveServices::LuisRuntime::V2_0
|
|
34
34
|
# @param staging [Boolean] Use the staging endpoint slot.
|
35
35
|
# @param spell_check [Boolean] Enable spell checking.
|
36
36
|
# @param bing_spell_check_subscription_key [String] The subscription key to use
|
37
|
-
# when enabling
|
37
|
+
# when enabling Bing spell check
|
38
38
|
# @param log [Boolean] Log query (default is true)
|
39
39
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
40
40
|
# will be added to the HTTP request.
|
@@ -50,7 +50,7 @@ module Azure::CognitiveServices::LuisRuntime::V2_0
|
|
50
50
|
# Gets predictions for a given utterance, in the form of intents and entities.
|
51
51
|
# The current maximum query size is 500 characters.
|
52
52
|
#
|
53
|
-
# @param app_id
|
53
|
+
# @param app_id The LUIS application ID (Guid).
|
54
54
|
# @param query [String] The utterance to predict.
|
55
55
|
# @param timezone_offset [Float] The timezone offset for the location of the
|
56
56
|
# request.
|
@@ -59,7 +59,7 @@ module Azure::CognitiveServices::LuisRuntime::V2_0
|
|
59
59
|
# @param staging [Boolean] Use the staging endpoint slot.
|
60
60
|
# @param spell_check [Boolean] Enable spell checking.
|
61
61
|
# @param bing_spell_check_subscription_key [String] The subscription key to use
|
62
|
-
# when enabling
|
62
|
+
# when enabling Bing spell check
|
63
63
|
# @param log [Boolean] Log query (default is true)
|
64
64
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
65
65
|
# will be added to the HTTP request.
|
@@ -74,7 +74,7 @@ module Azure::CognitiveServices::LuisRuntime::V2_0
|
|
74
74
|
# Gets predictions for a given utterance, in the form of intents and entities.
|
75
75
|
# The current maximum query size is 500 characters.
|
76
76
|
#
|
77
|
-
# @param app_id
|
77
|
+
# @param app_id The LUIS application ID (Guid).
|
78
78
|
# @param query [String] The utterance to predict.
|
79
79
|
# @param timezone_offset [Float] The timezone offset for the location of the
|
80
80
|
# request.
|
@@ -83,7 +83,7 @@ module Azure::CognitiveServices::LuisRuntime::V2_0
|
|
83
83
|
# @param staging [Boolean] Use the staging endpoint slot.
|
84
84
|
# @param spell_check [Boolean] Enable spell checking.
|
85
85
|
# @param bing_spell_check_subscription_key [String] The subscription key to use
|
86
|
-
# when enabling
|
86
|
+
# when enabling Bing spell check
|
87
87
|
# @param log [Boolean] Log query (default is true)
|
88
88
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
89
89
|
# to the HTTP request.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '3.0-preview/generated/azure_cognitiveservices_luisruntime/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::CognitiveServices::LuisRuntime::V3_0_preview
|
23
|
+
autoload :PredictionOperations, '3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb'
|
24
|
+
autoload :LuisRuntimeClient, '3.0-preview/generated/azure_cognitiveservices_luisruntime/luis_runtime_client.rb'
|
25
|
+
|
26
|
+
module Models
|
27
|
+
autoload :Intent, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/intent.rb'
|
28
|
+
autoload :Sentiment, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/sentiment.rb'
|
29
|
+
autoload :ExternalEntity, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/external_entity.rb'
|
30
|
+
autoload :Prediction, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction.rb'
|
31
|
+
autoload :DynamicList, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/dynamic_list.rb'
|
32
|
+
autoload :PredictionResponse, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction_response.rb'
|
33
|
+
autoload :PredictionRequestOptions, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction_request_options.rb'
|
34
|
+
autoload :ErrorBody, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/error_body.rb'
|
35
|
+
autoload :PredictionRequest, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/prediction_request.rb'
|
36
|
+
autoload :Error, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/error.rb'
|
37
|
+
autoload :RequestList, '3.0-preview/generated/azure_cognitiveservices_luisruntime/models/request_list.rb'
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::LuisRuntime::V3_0_preview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class LuisRuntimeClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_reader :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials1
|
19
|
+
|
20
|
+
# @return [String] Supported Cognitive Services endpoints (protocol and
|
21
|
+
# hostname, for example: https://westus.api.cognitive.microsoft.com).
|
22
|
+
attr_accessor :endpoint
|
23
|
+
|
24
|
+
# @return Subscription credentials which uniquely identify client
|
25
|
+
# subscription.
|
26
|
+
attr_accessor :credentials
|
27
|
+
|
28
|
+
# @return [String] The preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
38
|
+
attr_accessor :generate_client_request_id
|
39
|
+
|
40
|
+
# @return [PredictionOperations] prediction_operations
|
41
|
+
attr_reader :prediction_operations
|
42
|
+
|
43
|
+
#
|
44
|
+
# Creates initializes a new instance of the LuisRuntimeClient class.
|
45
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
46
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
47
|
+
#
|
48
|
+
def initialize(credentials = nil, options = nil)
|
49
|
+
super(credentials, options)
|
50
|
+
@base_url = '{Endpoint}/luis/v3.0-preview'
|
51
|
+
|
52
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
53
|
+
@credentials = credentials
|
54
|
+
|
55
|
+
@prediction_operations = PredictionOperations.new(self)
|
56
|
+
@accept_language = 'en-US'
|
57
|
+
@long_running_operation_retry_timeout = 30
|
58
|
+
@generate_client_request_id = true
|
59
|
+
add_telemetry
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Makes a request and returns the body of the response.
|
64
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
65
|
+
# @param path [String] the path, relative to {base_url}.
|
66
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
67
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
68
|
+
# Example:
|
69
|
+
#
|
70
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
71
|
+
# path = "/path"
|
72
|
+
# options = {
|
73
|
+
# body: request_content,
|
74
|
+
# query_params: {'api-version' => '2016-02-01'}
|
75
|
+
# }
|
76
|
+
# result = @client.make_request(:put, path, options)
|
77
|
+
#
|
78
|
+
def make_request(method, path, options = {})
|
79
|
+
result = make_request_with_http_info(method, path, options)
|
80
|
+
result.body unless result.nil?
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
# Makes a request and returns the operation response.
|
85
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
86
|
+
# @param path [String] the path, relative to {base_url}.
|
87
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
88
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
89
|
+
#
|
90
|
+
def make_request_with_http_info(method, path, options = {})
|
91
|
+
result = make_request_async(method, path, options).value!
|
92
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
93
|
+
result
|
94
|
+
end
|
95
|
+
|
96
|
+
#
|
97
|
+
# Makes a request asynchronously.
|
98
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
99
|
+
# @param path [String] the path, relative to {base_url}.
|
100
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
101
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
102
|
+
#
|
103
|
+
def make_request_async(method, path, options = {})
|
104
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
105
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
106
|
+
|
107
|
+
request_url = options[:base_url] || @base_url
|
108
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
109
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
110
|
+
end
|
111
|
+
|
112
|
+
request_headers = @request_headers
|
113
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
114
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
115
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
116
|
+
|
117
|
+
super(request_url, method, path, options)
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
private
|
122
|
+
#
|
123
|
+
# Adds telemetry information.
|
124
|
+
#
|
125
|
+
def add_telemetry
|
126
|
+
sdk_information = 'azure_cognitiveservices_luisruntime'
|
127
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
128
|
+
add_user_agent_information(sdk_information)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::LuisRuntime::V3_0_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines an extension for a list entity.
|
10
|
+
#
|
11
|
+
class DynamicList
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The name of the list entity to extend.
|
16
|
+
attr_accessor :list_entity_name
|
17
|
+
|
18
|
+
# @return [Array<RequestList>] The lists to append on the extended list
|
19
|
+
# entity.
|
20
|
+
attr_accessor :request_lists
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for DynamicList class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'DynamicList',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'DynamicList',
|
35
|
+
model_properties: {
|
36
|
+
list_entity_name: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: true,
|
39
|
+
serialized_name: 'listEntityName',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
request_lists: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: true,
|
47
|
+
serialized_name: 'requestLists',
|
48
|
+
type: {
|
49
|
+
name: 'Sequence',
|
50
|
+
element: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
serialized_name: 'RequestListElementType',
|
54
|
+
type: {
|
55
|
+
name: 'Composite',
|
56
|
+
class_name: 'RequestList'
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::LuisRuntime::V3_0_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Represents the error that occurred.
|
10
|
+
#
|
11
|
+
class Error
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [ErrorBody]
|
16
|
+
attr_accessor :error
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for Error class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'Error',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'Error',
|
31
|
+
model_properties: {
|
32
|
+
error: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: true,
|
35
|
+
serialized_name: 'error',
|
36
|
+
type: {
|
37
|
+
name: 'Composite',
|
38
|
+
class_name: 'ErrorBody'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::LuisRuntime::V3_0_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Represents the definition of the error that occurred.
|
10
|
+
#
|
11
|
+
class ErrorBody
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The error code.
|
16
|
+
attr_accessor :code
|
17
|
+
|
18
|
+
# @return [String] The error message.
|
19
|
+
attr_accessor :message
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for ErrorBody class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'ErrorBody',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'ErrorBody',
|
34
|
+
model_properties: {
|
35
|
+
code: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: true,
|
38
|
+
serialized_name: 'code',
|
39
|
+
type: {
|
40
|
+
name: 'String'
|
41
|
+
}
|
42
|
+
},
|
43
|
+
message: {
|
44
|
+
client_side_validation: true,
|
45
|
+
required: true,
|
46
|
+
serialized_name: 'message',
|
47
|
+
type: {
|
48
|
+
name: 'String'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::LuisRuntime::V3_0_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines a user predicted entity that extends an already existing one.
|
10
|
+
#
|
11
|
+
class ExternalEntity
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The name of the entity to extend.
|
16
|
+
attr_accessor :entity_name
|
17
|
+
|
18
|
+
# @return [Integer] The start character index of the predicted entity.
|
19
|
+
attr_accessor :start_index
|
20
|
+
|
21
|
+
# @return [Integer] The length of the predicted entity.
|
22
|
+
attr_accessor :entity_length
|
23
|
+
|
24
|
+
# @return A user supplied custom resolution to return as the entity's
|
25
|
+
# prediction.
|
26
|
+
attr_accessor :resolution
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# Mapper for ExternalEntity class as Ruby Hash.
|
31
|
+
# This will be used for serialization/deserialization.
|
32
|
+
#
|
33
|
+
def self.mapper()
|
34
|
+
{
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'ExternalEntity',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'ExternalEntity',
|
41
|
+
model_properties: {
|
42
|
+
entity_name: {
|
43
|
+
client_side_validation: true,
|
44
|
+
required: true,
|
45
|
+
serialized_name: 'entityName',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
start_index: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: true,
|
53
|
+
serialized_name: 'startIndex',
|
54
|
+
type: {
|
55
|
+
name: 'Number'
|
56
|
+
}
|
57
|
+
},
|
58
|
+
entity_length: {
|
59
|
+
client_side_validation: true,
|
60
|
+
required: true,
|
61
|
+
serialized_name: 'entityLength',
|
62
|
+
type: {
|
63
|
+
name: 'Number'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
resolution: {
|
67
|
+
client_side_validation: true,
|
68
|
+
required: false,
|
69
|
+
serialized_name: 'resolution',
|
70
|
+
type: {
|
71
|
+
name: 'Object'
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|