Question: In this exercise you will develop a classifier for authorship: given a text, the classifier predicts which of two candidate authors wrote the text. Obtain
In this exercise you will develop a classifier for authorship: given a text, the classifier predicts which of two candidate authors wrote the text. Obtain samples of text from two different authors. Separate them into training and test sets. Now train a language model on the training set. You can choose what features to use; n-grams of words or letters are the easiest, but you can add additional features that you think may help. Then compute the probability of the text under each language model and chose the most probable model. Assess the accuracy of this technique. How does accuracy change as you alter the set of features? This subfield of linguistics is called stylometry; its successes include the identification of the author of the disputed Federalist Papers and some disputed works of Shakespeare. (Adapted from Jurafsky and Martin (2000).)
Step by Step Solution
3.48 Rating (164 Votes )
There are 3 Steps involved in it
Code not shown The approach suggested here will wo... View full answer
Get step-by-step solutions from verified subject matter experts
