TextPredictionGenerator 类

定义

根据拼音字符前缀预测日语单词。

public ref class TextPredictionGenerator sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Data.Text.ITextPredictionGeneratorFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Experimental]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TextPredictionGenerator final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Data.Text.ITextPredictionGeneratorFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class TextPredictionGenerator final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Data.Text.ITextPredictionGeneratorFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Experimental]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TextPredictionGenerator
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Data.Text.ITextPredictionGeneratorFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class TextPredictionGenerator
function TextPredictionGenerator(languageTag)
Public NotInheritable Class TextPredictionGenerator
继承
Object Platform::Object IInspectable TextPredictionGenerator
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

版本历史记录

Windows 版本 SDK 版本 增值
1809 17763 GetCandidatesAsync (String,UInt32,TextPredictionOptions,IEnumerable<String>)
1809 17763 GetNextWordCandidatesAsync
1809 17763 InputScope

构造函数

TextPredictionGenerator(String)

基于特定的 BCP-47 语言标记构造 TextPredictionGenerator 对象。

属性

InputScope

获取或设置文本预测的输入范围。

LanguageAvailableButNotInstalled

确定指定的语言标记是否可用于生成预测,但未安装在用户的设备上。

ResolvedLanguage

获取成功创建的 TextPredictionGenerator 对象的语言标记。

方法

GetCandidatesAsync(String)

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

GetCandidatesAsync(String, UInt32)

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

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

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

GetNextWordCandidatesAsync(UInt32, IIterable<String>)

异步检索包含下一个单词预测候选项的字符串集合。

适用于

另请参阅