Skip to content

Commit 01d59fa

Browse files
committed
feat(Natural Language Understanding): Added missing properties, made some properties nullable
1 parent 5388443 commit 01d59fa

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Scripts/Services/NaturalLanguageUnderstanding/v1/DataModels.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,10 @@ public class Parameters
525525
/// ISO 639-1 code indicating the language to use in the analysis
526526
/// </summary>
527527
public string language { get; set; }
528+
/// <summary>
529+
/// Sets the maximum number of characters that are processed by the service
530+
/// </summary>
531+
public int? limit_text_characters { get; set; }
528532
}
529533

530534
[fsObject(Converter = typeof(FeaturesConverter))]
@@ -637,19 +641,25 @@ public class EntitiesOptions
637641
/// <summary>
638642
/// Maximum number of entities to return
639643
/// </summary>
640-
public int limit { get; set; }
644+
public int? limit { get; set; }
641645
/// <summary>
642646
/// Enter a custom model ID to override the standard entity detection model
643647
/// </summary>
644648
public string model { get; set; }
645649
/// <summary>
646650
/// Set this to true to return sentiment information for detected entities
647651
/// </summary>
648-
public bool sentiment { get; set; }
652+
public bool? sentiment { get; set; }
649653
/// <summary>
650654
/// Set this to true to analyze emotion for detected keywords
651655
/// </summary>
652-
public bool emotion { get; set; }
656+
public bool? emotion { get; set; }
657+
/// <summary>
658+
/// Set this to true to return locations of entity mentions
659+
/// </summary>
660+
public bool? mentions { get; set; }
661+
}
662+
653663
#region Entities Options Converter
654664
public class EntitiesOptionsConverter : fsConverter
655665
{
@@ -872,6 +882,9 @@ public override fsResult TrySerialize(object instance, out fsData serialized, Ty
872882
if (parameters.xpath != null)
873883
serialization.Add("xpath", new fsData(parameters.xpath));
874884

885+
if (parameters.limit_text_characters != null)
886+
serialization.Add("limit_text_characters", new fsData((int)parameters.limit_text_characters));
887+
875888
fsData tempData = null;
876889
_serializer.TrySerialize(parameters.features, out tempData);
877890
serialization.Add("features", tempData);

0 commit comments

Comments
 (0)