TextPredictionGenerator.GetCandidatesAsync 方法

定义

重载

GetCandidatesAsync(String)

根据提供的拼音字符前缀异步检索候选字词的列表。

GetCandidatesAsync(String, UInt32)

根据提供的拼音字符前缀,异步检索候选字词列表(最大计数)。

GetCandidatesAsync(String, UInt32, TextPredictionOptions, IIterable<String>)

根据提供的拼音字符前缀和选项,异步检索候选字词列表(最大计数)。

GetCandidatesAsync(String)

根据提供的拼音字符前缀异步检索候选字词的列表。

public:
 virtual IAsyncOperation<IVectorView<Platform::String ^> ^> ^ GetCandidatesAsync(Platform::String ^ input) = GetCandidatesAsync;
/// [Windows.Foundation.Metadata.Overload("GetCandidatesAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<winrt::hstring>> GetCandidatesAsync(winrt::hstring const& input);
[Windows.Foundation.Metadata.Overload("GetCandidatesAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<string>> GetCandidatesAsync(string input);
function getCandidatesAsync(input)
Public Function GetCandidatesAsync (input As String) As IAsyncOperation(Of IReadOnlyList(Of String))

参数

input
String

Platform::String

winrt::hstring

要返回的单词的开头拼音字符。

返回

异步操作对象在完成时包含字符串的 IVectorView ,这些字符串是预测的单词。

属性

另请参阅

适用于

GetCandidatesAsync(String, UInt32)

根据提供的拼音字符前缀,异步检索候选字词列表(最大计数)。

public:
 virtual IAsyncOperation<IVectorView<Platform::String ^> ^> ^ GetCandidatesAsync(Platform::String ^ input, unsigned int maxCandidates) = GetCandidatesAsync;
/// [Windows.Foundation.Metadata.Overload("GetCandidatesWithMaxCountAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<winrt::hstring>> GetCandidatesAsync(winrt::hstring const& input, uint32_t const& maxCandidates);
[Windows.Foundation.Metadata.Overload("GetCandidatesWithMaxCountAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<string>> GetCandidatesAsync(string input, uint maxCandidates);
function getCandidatesAsync(input, maxCandidates)
Public Function GetCandidatesAsync (input As String, maxCandidates As UInteger) As IAsyncOperation(Of IReadOnlyList(Of String))

参数

input
String

Platform::String

winrt::hstring

要返回的单词的开头拼音字符。

maxCandidates
UInt32

unsigned int

uint32_t

要返回的最大预测单词数。

返回

异步操作对象在完成时包含字符串的 IVectorView ,这些字符串是预测的单词。

属性

另请参阅

适用于

GetCandidatesAsync(String, UInt32, TextPredictionOptions, IIterable<String>)

根据提供的拼音字符前缀和选项,异步检索候选字词列表(最大计数)。

public:
 virtual IAsyncOperation<IVectorView<Platform::String ^> ^> ^ GetCandidatesAsync(Platform::String ^ input, unsigned int maxCandidates, TextPredictionOptions predictionOptions, IIterable<Platform::String ^> ^ previousStrings) = GetCandidatesAsync;
/// [Windows.Foundation.Metadata.Overload("GetCandidatesWithParametersAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<winrt::hstring>> GetCandidatesAsync(winrt::hstring const& input, uint32_t const& maxCandidates, TextPredictionOptions const& predictionOptions, IIterable<winrt::hstring> const& previousStrings);
[Windows.Foundation.Metadata.Overload("GetCandidatesWithParametersAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<string>> GetCandidatesAsync(string input, uint maxCandidates, TextPredictionOptions predictionOptions, IEnumerable<string> previousStrings);
function getCandidatesAsync(input, maxCandidates, predictionOptions, previousStrings)
Public Function GetCandidatesAsync (input As String, maxCandidates As UInteger, predictionOptions As TextPredictionOptions, previousStrings As IEnumerable(Of String)) As IAsyncOperation(Of IReadOnlyList(Of String))

参数

input
String

Platform::String

winrt::hstring

要返回的单词的开头拼音字符。

maxCandidates
UInt32

unsigned int

uint32_t

要返回的最大预测单词数。

predictionOptions
TextPredictionOptions

包含预测选项 的 TextPredictionOptions 值。

previousStrings

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

以前输入的字词的集合 (以帮助文本预测) 。

返回

异步操作对象在完成时包含字符串的 IVectorView ,这些字符串是预测的单词。

属性

Windows 要求

设备系列
Windows 10, version 1809 (在 10.0.17763.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v7.0 中引入)

适用于