diff --git a/.idea/runConfigurations/unimore_bda_6.xml b/.idea/runConfigurations/unimore_bda_6.xml
index 88d6f6a..f113c82 100644
--- a/.idea/runConfigurations/unimore_bda_6.xml
+++ b/.idea/runConfigurations/unimore_bda_6.xml
@@ -4,7 +4,7 @@
-
+
diff --git a/unimore_bda_6/__main__.py b/unimore_bda_6/__main__.py
index 009b505..1073343 100644
--- a/unimore_bda_6/__main__.py
+++ b/unimore_bda_6/__main__.py
@@ -82,8 +82,8 @@ def main():
try:
print("Model %s" % model)
- while True:
- print(model.use(input()))
+ while inp := input():
+ print(model.use(inp))
except KeyboardInterrupt:
pass
diff --git a/unimore_bda_6/analysis/vanilla.py b/unimore_bda_6/analysis/vanilla.py
index 6f233d2..a1ea0cd 100644
--- a/unimore_bda_6/analysis/vanilla.py
+++ b/unimore_bda_6/analysis/vanilla.py
@@ -61,6 +61,7 @@ class VanillaSA(BaseSA):
Does not use `SentimentAnalyzer.apply_features` due to unexpected behaviour when using iterators.
"""
+ count_passage("processed_features", 100)
return self.model.extract_features(data[0]), data[1]
def _train_from_dataset(self, dataset: t.Iterator[tuple[TokenBag, Category]]) -> None:
@@ -87,7 +88,8 @@ class VanillaSA(BaseSA):
raise NotTrainedError()
dataset_1 = map(self.__extract_features, dataset)
- return self.model.evaluate(dataset_1)
+ # FIXME: This won't work with streams :(
+ return self.model.evaluate(list(dataset_1))
def _use_from_tokenbag(self, tokens: TokenBag) -> Category:
"""