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, you can do this by following these steps:
-
On the
Project Tree, click on the
Project
node.
The properties of the project are displayed, including a link to the location of the project file.
-
Click on the
Project path.
A Windows Explorer window displays the location of your project.
-
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.
- Copy \Program Files (x86)\Common Files\Tungsten\Salience7.0\<language>\salience\sentiment\general.hsd to the path in the previous step.
-
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.
- Save the dictionary file.
-
Click on the class in the
Project Tree the class to view its
Details and then click
Stop Engine.
This stops the NLP engine so that the next time it is needed, it starts on-demand and loads your updated general.hsd file.
- Test some documents to ensure that the resulting sentiment values match your changes.