# Text analysis: structure and sentiment

I would need to analyse the structure of texts like this:

******VIRUS ALERT****** ******VIRUS ALERT****** ******VIRUS ALERT ******

There is NEW VIRUS rapidly affecting computers on the internet. This new virus is insidious, in that it transmitted as a USENET message. Usenet is the "news group" area on the internet that users can openly discuss and exchange information on a wide variety of topics.

What makes this virus DOUBLY DANGEROUS, is that it is disguised as a common chain letter. Chain letters have been passed across usenet almost since it's beginning. Lately, a common chain letter subject is MAKE MONEY FAST.

The Make Money Fast (MMF) chain is read by thousands of people daily. It is also known as: "Easy Cash", "Make Cash Fast", "Turn 5$$into$$50,000" and many others. They are all basically the same scheme, in which the reader send \$1 to each of the 5 people at the bottom of the list, then moves his name onto the list.

The MMF Virus, as it has been doubed, rides along on these chain letters as a "hidden binary attachment". Since most news reader programs (computer programs used to read USENET messages) will automatically decode and store binary attachments, there is NO SAFE WAY to protect yourself from infection.

The virus attackes your system the next time you run your news reader. Though the virus is transmitted during a normal usenet session, your NEXT usenet session will probably be your last for a while. As a hidden attachment, it is automatically activated with your news reader, and very quickly destroys your partition table. Generally, this is not even noticed until the next time you try to run ANY program.

The next thing the virus does is to place your micro processor into an nth-complexity infinate binary loop, quickly destroying it. This will appear at first as a normal "lock-up" but will quickley wipe out the delicate circuitry in your system.

At this point, your ONLY hope is to NOT DOWNLOAD ANY MESSAGES that have a subject similar to above. Please, FORWARD this message to ANYONE you know that reads usenet news.


In particular, I would be interested in grammar structure of each sentence (subject, verbs, object, and so on); specific pattern at the beginning of the text and at the end; and the sentiment.

Could you please give me any tips on which Python libraries I could use to do so?

Thanks