LMAssembly // Remove duplicated symbols.

This commit is contained in:
ShikiSuen 2022-12-11 19:49:43 +08:00
parent 83801eee1b
commit c1350bccc3
3 changed files with 6 additions and 8 deletions

View File

@ -92,7 +92,7 @@ extension vChewingLM {
// MARK: -
public var isLanguageModelLoaded: Bool { lmCore.isLoaded }
public var isCoreLMLoaded: Bool { lmCore.isLoaded }
public func loadLanguageModel(path: String) {
if FileManager.default.isReadableFile(atPath: path) {
lmCore.open(path)
@ -219,8 +219,6 @@ extension vChewingLM {
// MARK: -
public var isCoreLoaded: Bool { lmCore.isLoaded }
public func hasAssociatedPhrasesFor(pair: Megrez.Compositor.KeyValuePaired) -> Bool {
lmAssociates.hasValuesFor(pair: pair)
}

View File

@ -95,7 +95,7 @@ public class LMMgr {
}
group.leave()
}
if !Self.lmCHT.isLanguageModelLoaded {
if !Self.lmCHT.isCoreLMLoaded {
showFinishNotification = true
Notifier.notify(
message: NSLocalizedString("Loading CHT Core Dict...", comment: "")
@ -106,7 +106,7 @@ public class LMMgr {
group.leave()
}
}
if !Self.lmCHS.isLanguageModelLoaded {
if !Self.lmCHS.isCoreLMLoaded {
showFinishNotification = true
Notifier.notify(
message: NSLocalizedString("Loading CHS Core Dict...", comment: "")
@ -159,7 +159,7 @@ public class LMMgr {
}
switch mode {
case .imeModeCHS:
if !Self.lmCHS.isLanguageModelLoaded {
if !Self.lmCHS.isCoreLMLoaded {
showFinishNotification = true
Notifier.notify(
message: NSLocalizedString("Loading CHS Core Dict...", comment: "")
@ -171,7 +171,7 @@ public class LMMgr {
}
}
case .imeModeCHT:
if !Self.lmCHT.isLanguageModelLoaded {
if !Self.lmCHT.isCoreLMLoaded {
showFinishNotification = true
Notifier.notify(
message: NSLocalizedString("Loading CHT Core Dict...", comment: "")

View File

@ -104,7 +104,7 @@ extension SessionCtl {
guard let inputHandler = inputHandler, client() != nil else { return false }
///
if !LMMgr.currentLM.isCoreLoaded {
if !LMMgr.currentLM.isCoreLMLoaded {
if (event as InputSignalProtocol).isReservedKey { return false }
var newState: IMEStateProtocol = IMEState.ofEmpty()
newState.tooltip = NSLocalizedString("Factory dictionary not loaded yet.", comment: "") + "  "