From 33ef87ce15d21f8c1f787edc264b8d8f78a37f30 Mon Sep 17 00:00:00 2001 From: Dan Sackett Date: Fri, 12 Dec 2014 09:57:16 -0500 Subject: [PATCH] Switching aspell and diction in if statement As it currently stands, the checks were backwards leading "aspell" to do the diction task and vice versa. --- python3/rank-writing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3/rank-writing.py b/python3/rank-writing.py index 0e593ce..b4cbb06 100755 --- a/python3/rank-writing.py +++ b/python3/rank-writing.py @@ -35,7 +35,7 @@ def getNumSuggestions(program,f_name): if program == "write-good": out = call(["write-good",f_name]) return out.count("-------------") - elif program == "aspell": + elif program == "diction": out = call(["diction","--suggest",f_name]) r = re.search("(\S*) phrases? in (\S*) sentences? found.",out) if r: @@ -43,7 +43,7 @@ def getNumSuggestions(program,f_name): return 0 else: return int(r.group(1)) - elif program == "diction": + elif program == "aspell": out = call(["aspell","list"],in_f=f_name) return len(out.split()) else: