To detect passive voice in sentences, we can use the spacy module to tag each token in the sentence, then build a classifier to classify it as passive or active based on conventional grammatical rules, e.g.

If a clause has all of the following, then it is in the passive voice:

  • 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

News headlines are written differently. They don't follow conventional grammatical rules. How would one be able to use spacy to detect headlines in passive voice?

For example, if I have this headline, "Church That Defied Coronavirus Restrictions Is Burned to Ground," its part-of-speech tags are ['ROOT', 'dobj', 'compound', 'compound', 'nsubjpass', 'auxpass', 'relcl', 'prep', 'pobj']. We can classify this as passive, based on the fact that it has a nominal subject (passive) and no direct object.

However, if I have this headline, "Rayshard Brooks Fatally Shot By the Atlanta Police," its part-of-speech tags are ['compound', 'ROOT', 'advmod', 'ROOT', 'prep', 'det', 'compound', 'pobj']. We can't use any of the criteria to classify this as passive voice, because the headline has dropped the auxiliary and spacy doesn't detect a nominal subject (passive).


So, your task is to detect the passive voice from sentences. Currently, you have defined some rules to detecting the passive voice and you have noticed that there some exceptions to your defined rules.

Therefore, it would be a good idea to develop a model to predict the probability of a sentence being passive (or active).

You can do this by encoding the sentence as a sequence of words (converted into word embeddings) using a Recurrent Neural Network (RNN) or LSTM. This encode will encode the words into a "hidden representation". This hidden representation can then be decoded using a neural network with a final softmax output layer which then outputs the probability that the sentence is written in the passive voice and the active voice respectively.

As this would be a supervised learning problem, you would need to label examples of passive- and active-voice sentences.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.