mirror of
https://github.com/Steffo99/unimore-bda-6.git
synced 2024-11-23 00:14:19 +00:00
21 lines
460 B
Python
21 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",
|
|
)
|