Skip to content

Commit

Permalink
nGram // Fix conditions for comparison methods. (#61)
Browse files Browse the repository at this point in the history
* Cleanup.

* nGram // Fix conditions for comparison methods.
  • Loading branch information
ShikiSuen authored Jul 9, 2022
1 parent 75560c1 commit 16fb096
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 349 deletions.
321 changes: 0 additions & 321 deletions Megrez.xcodeproj/project.pbxproj

This file was deleted.

2 changes: 1 addition & 1 deletion Sources/Megrez/6_Bigram.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extension Megrez {

public static func < (lhs: Bigram, rhs: Bigram) -> Bool {
lhs.precedingKeyValue < rhs.precedingKeyValue
|| (lhs.keyValue < rhs.keyValue || (lhs.keyValue == rhs.keyValue && lhs.keyValue < rhs.keyValue))
|| (lhs.keyValue < rhs.keyValue || (lhs.keyValue == rhs.keyValue && lhs.score < rhs.score))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Megrez/6_Unigram.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extension Megrez {
}

public static func < (lhs: Unigram, rhs: Unigram) -> Bool {
lhs.keyValue < rhs.keyValue || (lhs.keyValue == rhs.keyValue && lhs.keyValue < rhs.keyValue)
lhs.keyValue < rhs.keyValue || (lhs.keyValue == rhs.keyValue && lhs.score < rhs.score)
}
}
}
Expand Down
26 changes: 0 additions & 26 deletions main.swift

This file was deleted.

0 comments on commit 16fb096

Please sign in to comment.