Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MAT 331 Fall 2023 Project

Distinguishing authors

This is a rather open-ended project compared to several of the others and perhaps a little more di伍cult (but also a little more fun):  most of the decisions will be up to you and I am not sure if what I amasking is possible.  However, as long as you report your results with a good explanation, even if they fail, you will get full credit.  Can we use the techniques from class to identity the author of a passage?  I have placed several books by Edgar Allan Poe in iles (narrative.txt, cask.txt, usher.txt) and several by Mark Twain ( sawyer.txt, inn.txt, innocents.txt, roughing.txt).  More books by each author are available from the Project Gutenberg website (they are in several formats, but I have always taken the“Plain Text”version, which gives an ASCII ile). You may use diferent authors than I have suggested (e.g., Charles Dickens,...).  The Project Gutenberg site has many such books; ones where the copyright has expired, so they tend to be older.  You would have to such  a little harder to ind the work of more modern authors.

(1) Can you ind a way to get MATLAB to distinguish Edgar Allan Poe from Mark Twain?  The idea is to use the books listed above to gather statistics about each author, for example, letter frequencies, how often they use certain common words, the average length of sentence, the number of punctuation marks, or whatever else you can think of. Some visualizations in the form of graphs here would be beneicial.

(2) Write a program that takes in a ile and outputs whether it was written by Edgar Allan Poe or Mark Twain by comparing it to the statistics you came up with above. Test the program on passages from each author.  I suggest taking ten passages of around 10,000 characters for each author (choose a random starting points and take the next 10,000 characters).  Test to see how often your code gets the decision correct.  Remember to present your result nicely in an array or table.

(3) Feel free to reine your ideas to get better results.  If you prefer to try diferent authors than the ones I suggest, that would beine, but describe what sources you are using.