|
@@ -12,7 +12,7 @@ namespace KdanCommon.GoogleCloud.Data.Vision
|
|
|
[JsonProperty("requests")]
|
|
|
public ImageRequest[] Requests { get; set; }
|
|
|
|
|
|
- public ImgesRequest(List<string> inputContents)
|
|
|
+ public ImgesRequest(List<string> inputContents, string[] languageHints = null)
|
|
|
{
|
|
|
Requests = new ImageRequest[inputContents.Count];
|
|
|
for (int i = 0; i < inputContents.Count; i++)
|
|
@@ -29,6 +29,10 @@ namespace KdanCommon.GoogleCloud.Data.Vision
|
|
|
{
|
|
|
Type = "TEXT_DETECTION"
|
|
|
}
|
|
|
+ },
|
|
|
+ ImageContext = new ImageContext()
|
|
|
+ {
|
|
|
+ LanguageHints = languageHints
|
|
|
}
|
|
|
};
|
|
|
}
|
|
@@ -42,6 +46,9 @@ namespace KdanCommon.GoogleCloud.Data.Vision
|
|
|
|
|
|
[JsonProperty("features")]
|
|
|
public Feature[] Features { get; set; }
|
|
|
+
|
|
|
+ [JsonProperty("imageContext")]
|
|
|
+ public ImageContext ImageContext { get; set; }
|
|
|
}
|
|
|
|
|
|
public partial class Feature
|
|
@@ -55,4 +62,10 @@ namespace KdanCommon.GoogleCloud.Data.Vision
|
|
|
[JsonProperty("content")]
|
|
|
public string Content { get; set; }
|
|
|
}
|
|
|
+
|
|
|
+ public partial class ImageContext
|
|
|
+ {
|
|
|
+ [JsonProperty("languageHints")]
|
|
|
+ public string[] LanguageHints { get; set; }
|
|
|
+ }
|
|
|
}
|