add predictionUsable check

This commit is contained in:
ensan-hcl
2023-09-21 01:28:20 +09:00
parent 5ec176c215
commit 326806e558

View File

@@ -63,7 +63,9 @@ extension Kana2Kanji {
totalWord.insert(contentsOf: element.word, at: totalWord.startIndex)
totalRuby.insert(contentsOf: element.ruby, at: totalRuby.startIndex)
totalData.insert(element, at: 0)
let dicdata = self.dicdataStore.getPredictionLOUDSDicdata(key: totalRuby).filter {$0.word.hasPrefix(totalWord)}
let dicdata = self.dicdataStore.getPredictionLOUDSDicdata(key: totalRuby).filter {
DicdataStore.predictionUsable[$0.rcid] && $0.word.hasPrefix(totalWord)
}
for data in dicdata {
let ccValue = self.dicdataStore.getCCValue(prefixCandidateData.last?.rcid ?? CIDData.BOS.cid, data.lcid)