mirror of
https://github.com/Steffo99/unimore-bda-6.git
synced 2024-11-21 23:44: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.
|
Return the label corresponding to the given rating.
|
||||||
|
|
||||||
Possible categories are:
|
Possible categories are:
|
||||||
* negative (0.0 <= rating < 2.5)
|
* negative (0.0 <= rating < 3.0)
|
||||||
* mixed (2.5 <= rating <= 3.5)
|
* positive (3.0 < rating <= 5.0)
|
||||||
* positive (3.5 < rating <= 5.0)
|
|
||||||
"""
|
"""
|
||||||
if rating < 2.5:
|
if rating < 3.0:
|
||||||
return "negative"
|
return "negative"
|
||||||
elif rating <= 3.5:
|
|
||||||
return "mixed"
|
|
||||||
else:
|
else:
|
||||||
return "positive"
|
return "positive"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue