diff --git a/pom.xml b/pom.xml index 24b70cb..c3f89a6 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ clockvapor.telegram.markov-telegram-bot markov-telegram-bot - 0.2.2 + 0.2.3 1.3.21 diff --git a/src/main/kotlin/clockvapor/telegram/markov/Utils.kt b/src/main/kotlin/clockvapor/telegram/markov/Utils.kt index ec2253c..1ddf5f6 100644 --- a/src/main/kotlin/clockvapor/telegram/markov/Utils.kt +++ b/src/main/kotlin/clockvapor/telegram/markov/Utils.kt @@ -21,9 +21,15 @@ fun scoreMostDistinguishingWords(user: Map, universe: Map + val c = b.second.compareTo(a.second) + if (c == 0) + a.first.compareTo(b.first) + else + c + }).toMap() } fun computeUniverse(wordCountsCollection: Collection>): Map {