feat(keyboard): rank pinyin by habit and persist user dictionaries
Erase dialect syllables before abbrev so wom prefers 我们, flush librime on leave, and add a settings action to forget learned Chinese and English order.
This commit is contained in:
@@ -35,6 +35,10 @@ public final class EnglishLearningStore: @unchecked Sendable {
|
||||
(defaults.dictionary(forKey: Self.defaultsKey) as? [String: Int]) ?? [:]
|
||||
}
|
||||
|
||||
public func clear() {
|
||||
defaults.removeObject(forKey: Self.defaultsKey)
|
||||
}
|
||||
|
||||
private func mutate(word: String, delta: Int) {
|
||||
let key = word.lowercased()
|
||||
guard !key.isEmpty else { return }
|
||||
|
||||
Reference in New Issue
Block a user