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:
parent
ded20c33e1
commit
b8acf5fc7c
1 changed files with 3 additions and 6 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue