diff --git a/memory.py b/memory.py index 8350879..c681c9b 100644 --- a/memory.py +++ b/memory.py @@ -23,7 +23,8 @@ def keepOnlyAlphaChars(word): 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]) + important_words = set([w for w in normalized_words + if len(w) >= WORD_THRESHOLD]) return important_words def insert(db, row):