From 6226666191db8a7601399a7f5e3a108f1691c9f6 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Sun, 7 Apr 2019 05:02:02 +0200 Subject: [PATCH] TV2v1.2. --- server/nightr/strategies/miloStrats.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/nightr/strategies/miloStrats.py b/server/nightr/strategies/miloStrats.py index 2b7903d..db7f158 100644 --- a/server/nightr/strategies/miloStrats.py +++ b/server/nightr/strategies/miloStrats.py @@ -76,5 +76,11 @@ def tv2newsStrat(context : Context) -> Prediction: p.weight = 0.7 print(avg_timestamp) p.probability = 0.75 if avg_timestamp > 40 else 0.25 - p.reasons.append('There were ' + ('few' if avg_timestamp > 40 else 'many') + ' recent articles on TV2 News') + few_or_many = 'few' if avg_timestamp > 40 else 'many' + p.reasons.append('There were ' + few_or_many + ' recent articles on TV2 News') + if few_or_many == "few": + p.reasons.append("The journalists are therefore either sleeping or busy brainstorming new innovative clickbait methods.") + else: + p.reasons.append("The journalists must be busy at work then.") + p.reasons.append("And since journalists only work during the day, it must be daytime.") return p