When I write fiction, or even technical reports, I have a very difficult time catching myself unintentionally switching verb tenses. Does software exist that highlights verb tense (either by colour-coding them or something) to identify verb tense mistakes?
7 Answers
One inelegant way to do this:
- download https://nlp.stanford.edu/software/lex-parser.shtml
- run on your text (
lexparser.sh yourtextfile.txt) - split by tense. "VBD", "VBN" is past tense, "VBP", "VBZ","VBG" are present tense, "VBC", "VBF" future tense
- 141
- 4
Grammarly - It is web based, but also has browser and Word plugins. It will check all manner of grammar errors
- 293
- 1
- 14
AutoCrit has this feature. I've used Grammarly and it does not, but AutoCrit looks at tense changes and highlights each verb with color codes to make it clear where you change tense. Also point of view. Allows statistical comparisons with other fiction writers in your genre.
- 21
- 1
It's taking a sledgehammer to a nut, but the natural language toolkit could do it if your Python's decent.
- 9,577
- 1
- 25
- 45
This code was useful to me.
from nltk import word_tokenize, pos_tag
def determine_tense_input(sentence):
text = word_tokenize(sentence)
tagged = pos_tag(text)
tense = {}
tense["future"] = len([word for word in tagged if word[1] == "MD"])
tense["present"] = len([word for word in tagged if word[1] in ["VBP", "VBZ","VBG"]])
tense["past"] = len([word for word in tagged if word[1] in ["VBD", "VBN"]])
return(tense)
My final version looks like this:
text = word_tokenize(sentence)
tagged = pos_tag(text)
universal_tag = pos_tag(text, tagset='universal')
presents = [word for word in tagged if word[1] in ["VBP", "VBZ","VBG"]]
for i, x in enumerate(tagged[:]):
if x[1] in ["VBP", "VBZ","VBG"] and universal_tag[i][1] in ["VERB"] and x[0] not in ["etc","[","]"]:
present_verbs.append(universal_tag[i][0])
present_verbs = [" " + x for x in set(present_verbs)]
print(" \n".join(present_verbs))
Pro Writing Aid is great for checking nearly anything in your writing - just pick your analysis type. It's free to run it on up to 1,000 words at a time, so give a try.
Grammarly may work, but it's analysis isn't nearly as in-depth.
- 984
- 4
- 8