show static words in a sorted manner

This commit is contained in:
Miroslav Stampar
2010-10-14 12:38:06 +00:00
parent 255b21f2f4
commit f07608ef4d
2 changed files with 8 additions and 1 deletions

View File

@@ -1150,9 +1150,16 @@ def showStaticWords(firstPage, secondPage):
commonText = firstPage[match[0]:match[0]+match[2]]
commonWords = getPageTextWordsSet(commonText)
infoMsg = "static words: "
if commonWords:
commonWords = list(commonWords)
commonWords.sort(lambda a, b: cmp(a.lower(), b.lower()))
for word in commonWords:
if len(word) > 2:
infoMsg += "'%s', " % word
infoMsg = infoMsg.rstrip(", ")
logger.info(infoMsg)
def decloakToNamedTemporaryFile(filepath, name=None):