1
Fork 0
mirror of https://github.com/Steffo99/unimore-bda-6.git synced 2024-11-22 07:54:19 +00:00

Group documents in just two categories

This commit is contained in:
Steffo 2023-02-02 04:07:28 +01:00
parent ded20c33e1
commit b8acf5fc7c
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -83,14 +83,11 @@ class VanillaReviewSA(VanillaSA):
Return the label corresponding to the given rating.
Possible categories are:
* negative (0.0 <= rating < 2.5)
* mixed (2.5 <= rating <= 3.5)
* positive (3.5 < rating <= 5.0)
* negative (0.0 <= rating < 3.0)
* positive (3.0 < rating <= 5.0)
"""
if rating < 2.5:
if rating < 3.0:
return "negative"
elif rating <= 3.5:
return "mixed"
else:
return "positive"