Skip to content

Commit bc79b4e

Browse files
committed
feat(Discovery): Updated data models for Discovery NLU integration and RetreivalDetails
1 parent 97220df commit bc79b4e

21 files changed

+594
-0
lines changed

Scripts/Services/Discovery/v1/DataModels.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,10 @@ public enum LanguageEnum
803803
/// 'fr', 'fre', 'fra', 'it', 'ita', 'pt', 'por', 'ru', 'rus', 'es', 'spa', 'sv', 'swe']
804804
/// </summary>
805805
public string language { get; set; }
806+
/// <summary>
807+
/// Options which are specific to a particular enrichment.
808+
/// </summary>
809+
public NluEnrichmentFeatures features { get; set; }
806810
}
807811

808812
/// <summary>
@@ -1128,6 +1132,16 @@ public class QueryResponse
11281132
/// </summary>
11291133
[fsProperty("session_token")]
11301134
public string SessionToken { get; set; }
1135+
/// <summary>
1136+
/// The number of duplicates removed.
1137+
/// </summary>
1138+
[fsProperty("duplicates_removed")]
1139+
public int duplicatesRemoved { get; set; }
1140+
/// <summary>
1141+
/// An object contain retrieval type information.
1142+
/// </summary>
1143+
[fsProperty("retrieval_details")]
1144+
public RetrievalDetails retrievalDetails { get; set; }
11311145

11321146
public override string ToString()
11331147
{
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
19+
{
20+
/// <summary>
21+
/// An object that indicates the Categories enrichment will be applied to the specified field.
22+
/// </summary>
23+
public class NluEnrichmentCategories
24+
{
25+
}
26+
27+
}

Scripts/Services/Discovery/v1/Models/NluEnrichmentCategories.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using FullSerializer;
19+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
20+
{
21+
/// <summary>
22+
/// An object specifiying the concepts enrichment and related parameters.
23+
/// </summary>
24+
public class NluEnrichmentConcepts
25+
{
26+
/// <summary>
27+
/// The maximum number of concepts enrichments to extact from each instance of the specified field.
28+
/// </summary>
29+
[fsProperty("limit")]
30+
public long? Limit { get; set; }
31+
}
32+
33+
}

Scripts/Services/Discovery/v1/Models/NluEnrichmentConcepts.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using System.Collections.Generic;
19+
using FullSerializer;
20+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
21+
{
22+
/// <summary>
23+
/// An object specifying the emotion detection enrichment and related parameters.
24+
/// </summary>
25+
public class NluEnrichmentEmotion
26+
{
27+
/// <summary>
28+
/// When `true`, emotion detection is performed on the entire field.
29+
/// </summary>
30+
[fsProperty("document")]
31+
public bool? Document { get; set; }
32+
/// <summary>
33+
/// A comma-separated list of target strings that will have any associated emotions detected.
34+
/// </summary>
35+
[fsProperty("targets")]
36+
public List<string> Targets { get; set; }
37+
}
38+
39+
}

Scripts/Services/Discovery/v1/Models/NluEnrichmentEmotion.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using FullSerializer;
19+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
20+
{
21+
/// <summary>
22+
/// An object speficying the Entities enrichment and related parameters.
23+
/// </summary>
24+
public class NluEnrichmentEntities
25+
{
26+
/// <summary>
27+
/// When `true`, sentiment analysis of entities will be performed on the specified field.
28+
/// </summary>
29+
[fsProperty("sentiment")]
30+
public bool? Sentiment { get; set; }
31+
/// <summary>
32+
/// When `true`, emotion detection of entities will be performed on the specified field.
33+
/// </summary>
34+
[fsProperty("emotion")]
35+
public bool? Emotion { get; set; }
36+
/// <summary>
37+
/// The maximum number of entities to extract for each instance of the specified field.
38+
/// </summary>
39+
[fsProperty("limit")]
40+
public long? Limit { get; set; }
41+
/// <summary>
42+
/// When `true`, the number of mentions of each identified entity is recorded. The default is `false`.
43+
/// </summary>
44+
[fsProperty("mentions")]
45+
public bool? Mentions { get; set; }
46+
/// <summary>
47+
/// When `true`, the types of mentions for each idetifieid entity is recorded. The default is `false`.
48+
/// </summary>
49+
[fsProperty("mention_types")]
50+
public bool? MentionTypes { get; set; }
51+
/// <summary>
52+
/// When `true`, a list of sentence locations for each instance of each identified entity is recorded. The
53+
/// default is `false`.
54+
/// </summary>
55+
[fsProperty("sentence_locations")]
56+
public bool? SentenceLocations { get; set; }
57+
/// <summary>
58+
/// The enrichement model to use with entity extraction. May be a custom model provided by Watson Knowledge
59+
/// Studio, the public model for use with Knowledge Graph `en-news`, or the default public model `alchemy`.
60+
/// </summary>
61+
[fsProperty("model")]
62+
public string Model { get; set; }
63+
}
64+
65+
}

Scripts/Services/Discovery/v1/Models/NluEnrichmentEntities.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using FullSerializer;
19+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
20+
{
21+
/// <summary>
22+
/// NluEnrichmentFeatures.
23+
/// </summary>
24+
public class NluEnrichmentFeatures
25+
{
26+
/// <summary>
27+
/// An object specifying the Keyword enrichment and related parameters.
28+
/// </summary>
29+
[fsProperty("keywords")]
30+
public NluEnrichmentKeywords Keywords { get; set; }
31+
/// <summary>
32+
/// An object speficying the Entities enrichment and related parameters.
33+
/// </summary>
34+
[fsProperty("entities")]
35+
public NluEnrichmentEntities Entities { get; set; }
36+
/// <summary>
37+
/// An object specifying the sentiment extraction enrichment and related parameters.
38+
/// </summary>
39+
[fsProperty("sentiment")]
40+
public NluEnrichmentSentiment Sentiment { get; set; }
41+
/// <summary>
42+
/// An object specifying the emotion detection enrichment and related parameters.
43+
/// </summary>
44+
[fsProperty("emotion")]
45+
public NluEnrichmentEmotion Emotion { get; set; }
46+
/// <summary>
47+
/// An object that indicates the Categories enrichment will be applied to the specified field.
48+
/// </summary>
49+
[fsProperty("categories")]
50+
public NluEnrichmentCategories Categories { get; set; }
51+
/// <summary>
52+
/// An object specifiying the semantic roles enrichment and related parameters.
53+
/// </summary>
54+
[fsProperty("semantic_roles")]
55+
public NluEnrichmentSemanticRoles SemanticRoles { get; set; }
56+
/// <summary>
57+
/// An object specifying the relations enrichment and related parameters.
58+
/// </summary>
59+
[fsProperty("relations")]
60+
public NluEnrichmentRelations Relations { get; set; }
61+
/// <summary>
62+
/// An object specifiying the concepts enrichment and related parameters.
63+
/// </summary>
64+
[fsProperty("concepts")]
65+
public NluEnrichmentConcepts Concepts { get; set; }
66+
}
67+
68+
}

Scripts/Services/Discovery/v1/Models/NluEnrichmentFeatures.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using FullSerializer;
19+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
20+
{
21+
/// <summary>
22+
/// An object specifying the Keyword enrichment and related parameters.
23+
/// </summary>
24+
public class NluEnrichmentKeywords
25+
{
26+
/// <summary>
27+
/// When `true`, sentiment analysis of keywords will be performed on the specified field.
28+
/// </summary>
29+
[fsProperty("sentiment")]
30+
public bool? Sentiment { get; set; }
31+
/// <summary>
32+
/// When `true`, emotion detection of keywords will be performed on the specified field.
33+
/// </summary>
34+
[fsProperty("emotion")]
35+
public bool? Emotion { get; set; }
36+
/// <summary>
37+
/// The maximum number of keywords to extract for each instance of the specified field.
38+
/// </summary>
39+
[fsProperty("limit")]
40+
public long? Limit { get; set; }
41+
}
42+
43+
}

Scripts/Services/Discovery/v1/Models/NluEnrichmentKeywords.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)