fix style

This commit is contained in:
pkufool 2023-11-18 18:32:29 +08:00
parent a7cb40a0a0
commit a8c10536de

View File

@ -159,7 +159,9 @@ class ContextGraph:
node = self.root
# If has customized score using the customized token score, otherwise
# using the default score
context_score = self.context_score if score == 0.0 else round(score / len(tokens), 2)
context_score = (
self.context_score if score == 0.0 else round(score / len(tokens), 2)
)
for i, token in enumerate(tokens):
node_next = {}
if token not in node.next: