你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

QuestionAnsweringModelFactory.TextAnswer 方法

定义

初始化 TextAnswer 的新实例。

public static Azure.AI.Language.QuestionAnswering.TextAnswer TextAnswer (string answer = default, double? confidence = default, string id = default, Azure.AI.Language.QuestionAnswering.AnswerSpan shortAnswer = default, int? offset = default, int? length = default);
static member TextAnswer : string * Nullable<double> * string * Azure.AI.Language.QuestionAnswering.AnswerSpan * Nullable<int> * Nullable<int> -> Azure.AI.Language.QuestionAnswering.TextAnswer
Public Shared Function TextAnswer (Optional answer As String = Nothing, Optional confidence As Nullable(Of Double) = Nothing, Optional id As String = Nothing, Optional shortAnswer As AnswerSpan = Nothing, Optional offset As Nullable(Of Integer) = Nothing, Optional length As Nullable(Of Integer) = Nothing) As TextAnswer

参数

answer
String

答案。

confidence
Nullable<Double>

答案置信度分数,值范围为 0 到 1。

id
String

记录 ID。

shortAnswer
AnswerSpan

回答范围对象与用户的问题有关。

offset
Nullable<Int32>

句子与文档开头的偏移量。

length
Nullable<Int32>

句子的长度。

返回

用于模拟的新 TextAnswer 实例。

适用于