add type annotation

This commit is contained in:
Dr. Kiji
2025-01-02 20:24:57 +09:00
parent 4f5a4e7194
commit 2f6bfe8e30

View File

@@ -61,7 +61,7 @@ class MeCabKeywordTableHandler:
node = self.tagger.parseToNode(text)
# Calculate term frequencies and scores
term_scores = defaultdict(float)
term_scores: defaultdict[str, float] = defaultdict(float)
while node:
features = node.feature.split(",")
if len(features) > 0: