In this hands-on lecture, we'll discuss about several, Supervised learning based on sentiment classification. The first one is Stanford CoreNLP recursive neural network. Stanford CoreNLP sentiment classification is based on, as I said, some kind of deep learning algorithm, neural network algorithm. Of course, it also has maximum entropy based classification. But neural net based sentiment classification performs better. So we're going to stick with recursive neural network based sentiment classification. Same as before, we are going to create. A very simple sentiment classification main function, it's called sentiment, Let's see, we are going to use sentiment CoreNLP1 first, so we'll call this SentimentCoreNLPMain. SentimentCoreNLPMain, this simply reads the input data in, and then basically predict each news article's polarity with Stanford CoreNLP's neural network classifier. One thing that I want to note here is we're not going to create new model, okay? You're not going to train new classifier or training data, simply because CoreNLP provides trained model and that's why we do not need to train our own model. However, if you're going to use Stanford CoreNLP's neural network classifier, sentiment classifier, to a very specific domain, such as finance domain, or biomedical domain, you may have to build your own model. So to build your own model, you need to refer to Stanford CoreNLP's neural network-based sentiment classification home page. We are going to provide that information, if that information needed for you. Now we're going to provide it in our Coursera home page. Okay, given that information, this is simpler than the other two which is link pipe based sentiment analysis and Stanford CoreNLP's sentiment analysis because it eliminates the phase of training. Simply once you parse data, in this case ten example of ten sample news articles, once you have that information, basically what you're going to do is per document you're going to predict polarity of input text. Please remember here, though, we're not going to predict document as a whole for polarity detection. But rather we're going to predict polarity of sentence, so this a sentence level polarity detection or sentiment analysis and that is specified and coded into this for loop. Second for loop is the sentence splitting, so you put each sentence, you're going to predict polarity from zero to four, so it's a five scale sentiment analysis. If you recall correctly in the lecture note we have double minus to double plus, so that's five scale of polarity. So let's execute this. We have this SentimentCoreNLPMain.java and select Run As > Java Application. And doing this what you need is when you call. The getSentimentCoreNLP, simply let’s go there, what you do is you call instantiate CoreNLP sentiment analyzer. The CoreNLP sentiment object, you see, what you do is in your pipeline, you call tokenize pipe, sentence split pipe, parse, tree pipe. And then sentiment pipe, so in order for it to do sentiment analysis with CoreNLP, you need to call parse tree pipe beforehand, all right? So as you see, per sentence let's say. The sentence, that's been the frustrating part, and the sentiment of that sentence is one. Remember, the scale is zero to four. One is mild negative and “we're just not driving in any runs”, Collins said. This is also one. The Stanford CoreNLP assigns a one score to this sentence. If you recall, the sentiment analysis of Stanford CoreNLP, two trees and the tree is a parse tree. The left one is positive, the right one is, I mean the left one is negative, the right one is positive. Plus sign is positive, minus sign is negative. So in order to predict the sentiment score by Stanford CoreNLP, at first parse tree, and then tree level which means a sentence level prediction is possible. It takes time, some sentence is hard to parse. If it's a long or if it's not well written sentence, then parsing tree takes time. Sometimes it throws an exception, so depending on the level of difficulties of your sentence, the way it's written, it takes time, more time or less time. Let's close this one here, okay. That's how by end of processing ten articles and n number sentences in it, once it's done then it exit out of for loop.