24 lines
548 B
Objective-C
24 lines
548 B
Objective-C
//
|
|
// KBSuggestionEngine.h
|
|
// CustomKeyboard
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/// Simple local suggestion engine (prefix match + lightweight ranking).
|
|
@interface KBSuggestionEngine : NSObject
|
|
|
|
+ (instancetype)shared;
|
|
|
|
/// Returns suggestions for prefix (lowercase expected), limited by count.
|
|
- (NSArray<NSString *> *)suggestionsForPrefix:(NSString *)prefix limit:(NSUInteger)limit;
|
|
|
|
/// Record a selection to slightly boost ranking next time.
|
|
- (void)recordSelection:(NSString *)word;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|