Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Sentiment lexicons

Updated on May 17, 2024

A sentiment lexicon is a list of semantic features for words and phrases. Use lexicons for creating machine learning-based sentiment and intent analysis models.

Lexicons determine whether particular word or phrase carries any emotional load, that is, belongs to the SW (sentiment word) category. If so, the lexicon provides the sentiment (polarity) value for that word or phrase. Additionally, the lexicon determines which words are filtered out before processing of text ( IGNORE ) and which words are used in negations ( NEGATIVE ). Applying semantic features on lexicon items that are identified in the training data enhances the model’s prediction accuracy.

Pega Platform provides the default pySentimentLexicon lexicon that supports English, Spanish, Italian, Dutch, German, French, and Portuguese.

A sentiment lexicon contains the following properties:
pyWords
A word or a phrase.
pySentiment
The associated sentiment value. The available values are highly negative, negative, mildly negative, neutral, mildly positive, positive, highly positive, and positive, negative.
pyLanguage
The language of the word or phrase.
pyWordType
The type of word or phrase that, in correlation with the value of the pySentiment property, determines the overall sentiment of the analyzed phrase or document. For example, the number of features whose pyWordType property is NEGATIVE ( for example, no, not, isn't, cannot ) can be indicative of the overall negative sentiment of the document since more negations can be found in negative phrases or documents.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us