From de1c190137317c48a3426dcf80bce053dc13629e Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 17 Jul 2022 23:21:10 +0800 Subject: [PATCH] LMCoreEX // Omit score reading if it contains sharp sign. --- Source/Modules/LangModelRelated/SubLMs/lmCoreEX.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/LangModelRelated/SubLMs/lmCoreEX.swift b/Source/Modules/LangModelRelated/SubLMs/lmCoreEX.swift index 19eb1179..088e656e 100644 --- a/Source/Modules/LangModelRelated/SubLMs/lmCoreEX.swift +++ b/Source/Modules/LangModelRelated/SubLMs/lmCoreEX.swift @@ -154,7 +154,7 @@ extension vChewing { let theValue: String = shouldReverse ? String(neta[0]) : String(neta[1]) let kvPair = Megrez.KeyValuePaired(key: key, value: theValue) var theScore = defaultScore - if neta.count >= 3, !shouldForceDefaultScore { + if neta.count >= 3, !shouldForceDefaultScore, !neta[2].contains("#") { theScore = .init(String(neta[2])) ?? defaultScore } if theScore > 0 {