The Sentiment Model Builder provides you the ability to train sentiment models with their content for use in adjusting the out-of-the-box model-based sentiment calculation.
SentimentModelBuilder operates in one of two modes which determines the content of the "recipe" file that is passed in as an argument. For both modes, each recipe file has a line stating the mode, outputfile location, and datadirectory path to use for building the model. The difference is in specifying the training content; CSV-based training data is specified with the single inputfile instruction whereas directory-based training data is specified by paths to positive, negative, and neutral content.
Click the links below for examples of recipe files for each mode:
Note: When using CSV-based training data, the input CSV file is actually tab-delimited (not comma-separated) and should be formatted as follows:
where the allowed sentiment values are: 0 = positive 1 = negative 2 = neutral
mode=0 inputfile=path to CSV file containing training data outputfile=complete file path for the output custom model file datadirectory=path to data directory - <Salience-install>/data is used by default if not specified
mode=1 positive=directory path containing positive training data documents negative=directory path containing negative training data documents neutral=directory path containing neutral training data documents outputfile=complete file path for the output custom model file datadirectory=path to data directory - <Salience-install>/data is used by default if not specified
Custom sentiment models created by the SentimentModelBuilder are loaded in the Salience Engine by setting the AddSentimentModel option. Sentiment model result sets are generated for each custom model loaded by the option following the Salience default sentiment model result set.