Detect the Passive Voice with Javascript
My “Junior Research Seminar” class read a book called Revising Prose, which instructed writers to avoid use of the “Official Style” in writing. Revising Prose recommended many techniques to improve writing; it advised writers to avoid the passive voice (and linking verbs, where applicable) in most situations. While that might be a useful tip, it takes time to scan writing for the passive voice. To speed up that process whenever I need it, I created a quick bookmarklet which will highlight linking verbs and helping verbs, to provide an at-a-glance indicator of where the passive voice might be used. It won’t catch everything (and I’m sure the word list I used isn’t comprehensive or completely accurate), but I think it will be useful for cursory glances at writing style.
Just drag the link below into your bookmarks folder:
The source for the code is below; feel free to add/remove/copy it to suit your own uses.
(function() {
var re = new RegExp("\\b(am|is|are|was|were|be|been|can|could|shall|should|may|might|must|will|would|seem|became|did|do|does|being)\\b", 'ig');
document.body.innerHTML = document.body.innerHTML.replace(re, '$1');
})()
Update: Thanks to Konrad for a suggestion on how to speed it up.
Add New Comment
Viewing 2 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)