diff --git a/memory.py b/memory.py index c681c9b..5281380 100644 --- a/memory.py +++ b/memory.py @@ -3,7 +3,7 @@ import json from math import sqrt import re -WORD_THRESHOLD = 4 +WORD_LENGTH_THRESHOLD = 4 class RowDecoder(json.JSONDecoder): def decode(self, s): @@ -24,7 +24,7 @@ def index(text): words = re.split('\s', text) normalized_words = [keepOnlyAlphaChars(word) for word in words] important_words = set([w for w in normalized_words - if len(w) >= WORD_THRESHOLD]) + if len(w) >= WORD_LENGTH_THRESHOLD]) return important_words def insert(db, row):