Writing Asked by Seanny123 on January 15, 2021
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?
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))
Answered by BND on January 15, 2021
One inelegant way to do this:
lexparser.sh yourtextfile.txt
)Answered by serv-inc on January 15, 2021
It's taking a sledgehammer to a nut, but the natural language toolkit could do it if your Python's decent.
Answered by J.G. on January 15, 2021
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.
Answered by Mark Owen on January 15, 2021
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.
Answered by Kitsune on January 15, 2021
Hemingway - Free web-version, paid download version. Identify clunky sentences, passive voice, unnecessary words. I think tense changes are included in the 'clunky' setting and passive voice is often an indicator of changing tense as well. Exports to HTML, Markdown, and Word.
Answered by zga on January 15, 2021
Grammarly - It is web based, but also has browser and Word plugins. It will check all manner of grammar errors
Answered by NKCampbell on January 15, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP