Rename the corresponding variable to be more explicit
This commit is contained in:
parent
8eae217d17
commit
f2caf77510
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue