1
This commit is contained in:
@@ -7,9 +7,18 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger, KBSuggestionEngineType) {
|
||||
KBSuggestionEngineTypeLatin = 0, // 拉丁字母(英语、西班牙语、葡萄牙语、印尼语)
|
||||
KBSuggestionEngineTypePinyinSimplified, // 简体拼音
|
||||
KBSuggestionEngineTypePinyinTraditional, // 繁体拼音
|
||||
KBSuggestionEngineTypeBopomofo // 注音(繁体)
|
||||
};
|
||||
|
||||
/// Simple local suggestion engine (prefix match + lightweight ranking).
|
||||
@interface KBSuggestionEngine : NSObject
|
||||
|
||||
@property (nonatomic, assign) KBSuggestionEngineType engineType;
|
||||
|
||||
+ (instancetype)shared;
|
||||
|
||||
/// Returns suggestions for prefix (lowercase expected), limited by count.
|
||||
@@ -18,6 +27,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// Record a selection to slightly boost ranking next time.
|
||||
- (void)recordSelection:(NSString *)word;
|
||||
|
||||
/// 设置联想引擎类型(根据 profileId 的 suggestionEngine 字段)
|
||||
- (void)setEngineTypeFromString:(NSString *)engineTypeString;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user