This topic describes how to set up and update the two Sentiment Analysis models with new training data.
<lang> is a supported country code: en (UK/US English), fr (French), de (German), it (Italian), or es (Spanish).
The text files should have one sentence per line. You must train your sentiment model against examples of the type of data that you are going to see when you use your model. For example, if you are trying to determine the sentiment of tweets, you will need to obtain examples of tweet review entries. You can either provide your own data or buy it. For a good model, you will need at least several hundred examples, if not thousands.
/<root>/models/sentiment/<language>where <language> is one or more of the above names.
/share/models/sentiment/american /share/models/sentiment/french
The american directory would have the en_pos.txt and en_neg.txt files, while the french directory would have the fr_pos.txt and fr_neg.txt files.
To update the Sentiment Analysis model:
[2015/08/14 15:35:02 -0400] [web2014.example.com] Generating the sentiment model file using new model file...Success! [2015/08/14 15:35:55 -0400] [Admin Server] Publishing the sentiment model file... [2015/08/14 15:36:07 -0400] [Admin Server] Successfully published the model file.
The operation replaces the Sentiment Analysis model's current JAR on the YARN worker nodes with the new one.
./bdd-admin.sh update-model sentiment
This reverts the Sentiment Analysis model to the original, shipped version.