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
-
On the
Project Tree, select the
Project
node.
The properties of the project are displayed, including a link to the location of the project file.
-
Select 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.
-
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.
- Test some documents to ensure the resulting sentiment values match your changes.