KeyHandler // Simplify findHighestScore().
This commit is contained in:
parent
f4894e5828
commit
e53dd174e2
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue