Add custom sentiments

Use the procedure in this topic to add custom sentiments.

If you want to add a word or phrase to the sentiment dictionary, or modify the sentiment value of an existing word or phrase.

Procedure

  1. On the Project Tree, select the Project Project Tree - Project icon node.

    The properties of the project are displayed, including a link to the location of the project file.

  2. Select the Project path.

    A Windows Explorer window displays the location of your project.

  3. If it does not already exist, create the following folder structure.

    \Custom\SalienceData\<language>\salience\sentiment\

    Where <language> is the two-character code for the language that you are using.

  4. Copy \Program Files (x86)\Common Files\Tungsten\Salience7.0\<language>\salience\sentiment\general.hsd to the path in the previous step.
  5. Edit the general.hsd file as needed by adding the new word or phrase on a new line, in the correct alphabetic order, using the following format.

    Word or Phrase<tab>Value between -1 and 1.

  6. Save the dictionary file.
  7. Select the class in the Project Tree the class to view its Details and then select Stop Engine.

    This stops the NLP engine so the next time it is needed, it starts on-demand and loads your updated general.hsd file.

  8. Test some documents to ensure the resulting sentiment values match your changes.