KeyHandler // Simplify findHighestScore().

This commit is contained in:
ShikiSuen 2022-06-29 13:54:52 +08:00
parent f4894e5828
commit e53dd174e2
1 changed files with 1 additions and 4 deletions

View File

@ -310,10 +310,7 @@ class KeyHandler {
var highestScore: Double = 0 var highestScore: Double = 0
for currentAnchor in nodes { for currentAnchor in nodes {
if let theNode = currentAnchor.node { if let theNode = currentAnchor.node {
let score = theNode.highestUnigramScore highestScore = max(theNode.highestUnigramScore, highestScore)
if score > highestScore {
highestScore = score
}
} }
} }
return highestScore + epsilon return highestScore + epsilon