Skip to content

Commit 33ef87c

Browse files
committed
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.
1 parent 3cc8b6e commit 33ef87c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python3/rank-writing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ def getNumSuggestions(program,f_name):
3535
if program == "write-good":
3636
out = call(["write-good",f_name])
3737
return out.count("-------------")
38-
elif program == "aspell":
38+
elif program == "diction":
3939
out = call(["diction","--suggest",f_name])
4040
r = re.search("(\S*) phrases? in (\S*) sentences? found.",out)
4141
if r:
4242
if r.group(1) == "No":
4343
return 0
4444
else:
4545
return int(r.group(1))
46-
elif program == "diction":
46+
elif program == "aspell":
4747
out = call(["aspell","list"],in_f=f_name)
4848
return len(out.split())
4949
else:

0 commit comments

Comments
 (0)