diff --git a/functions/src/definitions/common/counters.ts b/functions/src/definitions/common/counters.ts index 023ba640..3a4f5e27 100644 --- a/functions/src/definitions/common/counters.ts +++ b/functions/src/definitions/common/counters.ts @@ -102,13 +102,14 @@ const getVoteCounts = async function (messageRef: DocumentReference) { const factCheckerCount = totalVoteRequestsCount - passCount //don't count "error" votes in number of fact checkers, as this will slow the replies unnecessarily. const validResponsesCount = responsesCount - passCount //can remove in future and replace with nonErrorCount const susCount = scamCount + illicitCount + const noClaimCount = irrelevantCount + legitimateCount const truthScore = computeTruthScore(infoCount, voteTotal) let harmfulCount = scamCount + illicitCount - let harmlessCount = legitimateCount + spamCount + irrelevantCount + let harmlessCount = legitimateCount + spamCount if (truthScore !== null) { if (truthScore < (thresholds.falseUpperBound || 2.5)) { harmfulCount += infoCount - } else if (truthScore <= (thresholds.misleadingUpperBound || 4)) { + } else if (truthScore <= (thresholds.misleadingUpperBound || 3.75)) { //pass } else { harmlessCount += infoCount @@ -132,6 +133,7 @@ const getVoteCounts = async function (messageRef: DocumentReference) { voteTotal, validResponsesCount, susCount, + noClaimCount, truthScore, harmfulCount, harmlessCount, diff --git a/functions/src/definitions/common/parameters/thresholds.json b/functions/src/definitions/common/parameters/thresholds.json index b48ee5ad..a0fbb40d 100644 --- a/functions/src/definitions/common/parameters/thresholds.json +++ b/functions/src/definitions/common/parameters/thresholds.json @@ -7,6 +7,7 @@ "endVoteUnsureAbsolute": 16, "startVote": 1, "isSpam": 0.5, + "isNoClaim": 0.5, "isLegitimate": 0.5, "isInfo": 0.5, "isIrrelevant": 0.5, diff --git a/functions/src/definitions/eventHandlers/onVoteRequestUpdate.ts b/functions/src/definitions/eventHandlers/onVoteRequestUpdate.ts index 6032ca48..6559e282 100644 --- a/functions/src/definitions/eventHandlers/onVoteRequestUpdate.ts +++ b/functions/src/definitions/eventHandlers/onVoteRequestUpdate.ts @@ -97,6 +97,7 @@ const onVoteRequestUpdateV2 = onDocumentUpdated( voteTotal, validResponsesCount, susCount, + noClaimCount, factCheckerCount, truthScore, harmfulCount, @@ -112,10 +113,10 @@ const onVoteRequestUpdateV2 = onDocumentUpdated( const isInfo = infoCount > thresholds.isInfo * validResponsesCount const isSatire = satireCount > thresholds.isSatire * validResponsesCount const isSpam = spamCount > thresholds.isSpam * validResponsesCount - const isLegitimate = - legitimateCount > thresholds.isLegitimate * validResponsesCount - const isIrrelevant = - irrelevantCount > thresholds.isIrrelevant * validResponsesCount + const isNoClaim = + noClaimCount > thresholds.isNoClaim * validResponsesCount + const isLegitimate = isNoClaim && legitimateCount > irrelevantCount + const isIrrelevant = isNoClaim && !isLegitimate const isHarmless = harmlessCount > thresholds.isHarmless * validResponsesCount const isHarmful =