Sentences in active voice (e.g., ” I appreciate your feedback”) are simple, direct, persuasive, and easier to understand. See full article here. You can use the ‘Grammar Check’ feature in MS-Word to identify and eliminate passive voice. To activate the check for passive voice, follow these three steps. Detect if a sentence is in passive voice. Ask Question 2. If yes, then the function will say that the sentence is in passive voice (I do no not know even if this is true). Is there a better approach? I just want to make a simple detector for passive voice, I do not care much for accuracy and efficiency. Here what I ended up with.
A sentence in the passive voice is one where the doer of the action is put at the end, and the recipient of the action is at the beginning, the opposite of a sentence in the active voice. For example,
John caught the ball.
Is in the active voice, but
The ball was caught by John.
Is in the passive voice. This answer on English SE gives 4 necessary conditions for a clause to be passive, which are for a clause to have a transitive verb's past participle, no direct object, and an auxiliary/helping verb (in any form). For my purposes we can ignore the fourth condition, since it would be extremely hard to code this and most sentences fall into this category anyway.
A few more things to note:
A few more things to note:
- Passive sentences very often (but not always) have the prepositional phrase ('by X'), where X is the subject that would be at the beginning of the active version of the sentence.
- Sentences can have several clauses separated by commas or semicolons or the like, and each clause can have its own voice. For example,When the bell was rung (by the schoolmaster), Jimmy exited the class.
![Voice Voice](/uploads/1/2/5/0/125026208/733572513.png)
The first clause from 'When' to the comma is passive, and the second one is active. Additionally, the sentence is just fine without the part in parenthesis, referring to my first point.
Although this is not strictly true, we can consider every group of words with a verb and at least three words separated by some punctuation to be a clause. Consider that you have an array containing every clause in the text (so you don't need to worry about extracting the clauses).
Although this is not strictly true, we can consider every group of words with a verb and at least three words separated by some punctuation to be a clause. Consider that you have an array containing every clause in the text (so you don't need to worry about extracting the clauses).
My question is, then, 'How can we identify passive clauses using JavaScript?' I've thought about this for a while, with several failed attempts, but I couldn't get very far. If it helps, the reason I need at least an approximation of the percentage of passive clauses in a text is because I'm trying to analyze the characteristics of an author of a text using stylometry; passive sentence usage, among other things such as the frequency of certain phrases, is one such characteristic.
Community♦
DaccacheDaccache
closed as too broad by John Dvorak, gnat, Abhitalks, msturdy, Chankey PathakDec 26 '14 at 11:38
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1 Answer
Interesting. Assuming we have an array with all clauses, we would just need to find a way to encode those 4 necessary conditions you referenced. The clause must have:
![Passive voice how to identify Passive voice how to identify](/uploads/1/2/5/0/125026208/307890326.png)
- A form of an auxiliary verb (usually be or get)
- The past participle of a transitive verb
- No direct object
- The subject of the verb phrase is the entity undergoing an action or having its state changed
1) If we had a dictionary of auxiliary verbs, this is a piece of cake. We could also match each clause against a dictionary of verbs & check if there's 2 or more verbs (much more likely one is an auxiliary verb).
2) Again, we would need to find the verbs in the clause and run them through some check. Possibly looking at the ending characters to determine it's passive.
3) Finding if a clause contains a direct object would be somewhat straightforward. Check for nouns and their placement in the cause relative to verbs.
4) Similar to 3; check for nouns, and if there's only one, chances are good that we pass this aspect.
Obviously it's a bit trickier, and there's a ton more we'd have to do. I think the most basic thing we could do (granted it'd have pretty terrible accuracy) is:
- break clause into verbs & nouns
- check amount of nouns & their location relative to verbs
- check if verb ending fits common passive verb endings (i.e. '-ed')
It's an interesting and pretty tough problem, and I'm curious how accurate you'd be able to get with this approach.
Community♦
Keenan Lidral-PorterKeenan Lidral-Porter