mirror of
https://github.com/Steffo99/unimore-bda-6.git
synced 2024-11-24 16:54:20 +00:00
22 lines
460 B
Python
22 lines
460 B
Python
|
from .base import BaseSentimentAnalyzer
|
||
|
from ..database.cache import CachedDatasetFunc
|
||
|
|
||
|
|
||
|
class ThreeCheat(BaseSentimentAnalyzer):
|
||
|
"""
|
||
|
A sentiment analyzer that always predicts a 3.0* rating.
|
||
|
|
||
|
Why? To test the scoring!
|
||
|
"""
|
||
|
|
||
|
def train(self, training_dataset_func: CachedDatasetFunc, validation_dataset_func: CachedDatasetFunc) -> None:
|
||
|
pass
|
||
|
|
||
|
def use(self, text: str) -> float:
|
||
|
return 3.0
|
||
|
|
||
|
|
||
|
__all__ = (
|
||
|
"ThreeCheat",
|
||
|
)
|