LMCoreEX // Patch the score double if it is > 0 (mistyped).

This commit is contained in:
ShikiSuen 2022-05-09 09:49:33 +08:00
parent dd54d7d93c
commit 8cf6272a07
1 changed files with 3 additions and 0 deletions

View File

@ -127,6 +127,9 @@ extension vChewing {
if neta.count >= 3, !shouldForceDefaultScore { if neta.count >= 3, !shouldForceDefaultScore {
theScore = .init(neta[2]) ?? defaultScore theScore = .init(neta[2]) ?? defaultScore
} }
if theScore > 0 {
theScore *= -1 //
}
grams.append(Megrez.Unigram(keyValue: kvPair, score: theScore)) grams.append(Megrez.Unigram(keyValue: kvPair, score: theScore))
} }
} }