1 Introduction
Nowadays, Sentiment Analysis is a useful and important discipline in Computer Science, which allows obtaining potentially valuable knowledge about user's perceptions, expectations and attitudes in order to improve the decision-making process regarding products and marketing strategies, among other uses. Sentiment Analysis has not only been applied in business but also in very different areas such as recommender systems [1,2], electoral analysis [3] management of virtual museums [4], multilingual processing [5,6] among others.
In general terms, there are two approaches to perform this type of analysis according to [7]. The first one uses a corpus of tagged texts that allows the construction of a classifier trained to execute this task. This approach uses supervised learning techniques that come from machine learning and statistics [8]. The second approach uses lexical resources, such as dictionaries or lexicons which are defined as a previously tagged set of words [9], i.e., every word is tagged according to its orientation [10]. There are two main lines of work: The identification of both positive and negative opinions, emotions and evaluations, using computing tools to assign a polarity to the content [11].
The estimation of the affective aspect of a text [9] called Affective Analysis, where there is a lexicon containing a set of words classified according to the emotions they represent [12,13]. The emotion expressed in a sentence or text is obtained considering the emotion of all the words contained in that text [14].
The classification process in Sentiment Analysis is simpler than in Affective Analysis.
The first one classifies in two or three categories, either {positive, negative} or {positive, negative or neutral} and the second one can do so in many, depending on the model of emotions used. In addition, a text can express more than one emotion and even two different texts can express the same emotion but with different intensities.
In Affective Analysis based on lexicon approach, the results depend on the quality and completeness of the lexicon used in the process. The affective lexicons include the words grouped by affective category. This fact only allows a words-bag analysis since the words of each affective category do not contain affective intensity information; therefore, it is not possible determining affective profiling of a document. In Sentiment Analysis, there are works having improved the quality of affective lexicons by adding information such as valence, arousal and dominance [15-17]. In the case of affective analysis based on lexicon, studies are mainly aimed at increasing the number of words of an affective lexicon [18].
The objective of this paper is to enrich a lexicon of affects by the analysis of the similarity relationship between words. The hypothesis of this work states that the similarities of the words belonging to an affective category, with respect to any other word, behave in a homogeneous way within each affective category. We found evidences that similarities of the words belonging to an affective category, with respect to any other word, behave in a homogeneous way within each affective class. This finding will allow us to determine intensities for the emotions of an affective category and to improve automatic enrichment process of affective lexicons.
The rest of the article is structured as follows: Chapter 2 presents a background and a brief state of the art about the use of lexicons in affective analysis and similarity measures between two words. Chapter 3 presents the hypothesis and experiments performed to prove it. Chapter 4 presents the results and discusses the word's similarity behavior of the lexicon's affective classes. Finally, conclusions and future work lines are presented in Chapter 5.
2 Background and Related Work
In lexicons commonly used in Affective Analysis, consider different classifications of basic emotions, assuming that all other emotions would depend on these subsets.
For example, author proposed 6 categories in [19]: anger, disgust, fear, joy, sadness and surprise. In [20] was proposed an affective lexicon called WordNet-Affect, which was built based on the WordNet knowledge base, through the selection and tagging of affective concepts. This initial base was extended using sentences and patterns extracted from Open Mind Commonsense [21]. WordNet-Affect classifies words into the six categories of Ekman.
Each word in the lexicon contains lexical and affective information, for example, the role of the word in speech (part-of-speech), classification according to emotion theory or representation, among others. Another affective lexicon was proposed in [22], which considered 8 affective categories: anger, anticipation, disgust, fear, joy, sadness, surprise and trust. This lexicon was generated from a list of affective words extracted from the Thesaurus WordNet-Affect and the most frequent words in Google n-gram Corpus [23].
In the case of Affective Analysis based on lexicon, the studies have as main objective to increase the number of words of an affective lexicon. For example, the authors in [18] present an approach for the Japanese language where a similarity metric was used to expand a small group of emotionally-charged words (containing 503 nouns) into an emotions dictionary (containing 15612 verbs). Other studies have improved the lexical resources through the integration [24] or the creation of lexicons for specific domains [25,26].
One aspect to consider is that a lexicon can be used in different domains. This may imply that one word may represent different affects in different domains [27]. On the other hand, in order to incorporate the concept of semantic similarity among words in Affective Analysis, it is necessary to analyze both, the metrics based on the structure and the metrics based on the Information Content (IC).
The semantics' similarity measures based on structure add variables such as lowest common ancestor (LCA) or least common subsumer (LCS), local specificity of the subtree that contains the concepts, the distance between concepts and the types of relationships involved between them (as shown in Figure 1 and Figure 2).
For example, in [28] the Path measure was proposed, which is based on the shortest path that connects the senses in the "is-a" relationship of WordNet (1). Wu & Palmer measure, proposed in [29] is calculated based on the depth of the LCA and the number of links between concepts and predecessor (2). The measure proposed in [30] is calculated based on the depth of each of the concepts, the LCA depth and the shortest distance between concepts. Another proposal from the same authors [31] also includes local specificity. Finally, in [32] the shortest route between concepts, LCA depth and empiric information are considered.
In addition to the previous ones, the Leacock & Chodorow metric (3) was used in this work, since it determines how similar two senses are, based on the shortest path that connects the senses (as above) and the maximum depth of them:
where Depth1 = min(depth({tree in T1|tree contains LCA}))
and Depth2 = min(depth({tree in T2|tree contains LCA}))
Semantics' similarity measures based on information content consider the IC of the nodes derived from the model and statistical corpus, for example, through measures such as term frequency and inverse document frequency (tf-idf). The more information (IC) they share; the more similar concepts are. Some measures in this category are the ones proposed in [32-34]. In Resnik's metric [32], the IC of the LCA is considered, and Jiang & Conrath's and Lin's proposals [33-34] include improvements to Resnik's measure as shown in (4), where the IC of each of the concepts is added. Lin's measure (5) is based on Jiang & Conrath's proposal (6):
re c1 and c2 are the concepts compared
LCA (c1, c2) is lowest common ancestor beetween c1 y c2
P(c) is the probability of encountering an instance of concept c
IC(LCA) is an information content of LCA
IC(c1) is an information content of c1
IC(c2) is an information content of c2
Recent works incorporate a metric [35] that uses IC and the amount of nodes to try to simplify and improve the calculation of similarity between pairs of words contained in graphs. In sentiment analysis based on lexical approach, there are works having improved the quality of affective lexicons by adding new information such as valence, arousal and dominance [15-17].
The above, basing on pointwise mutual information (PMI), latent semantic analysis (LSA) and the semantic proximity determine by a co-occurrence between the words and the benchmarks to obtain an index of proximity.
3 Method
To prove our hypothesis an experiment was designed using the affective lexicon in English proposed in [20], due to its availability and reputation in affective computing area. Such a lexicon has 1080 words (w1, w2...W1080), grouped into six affective categories (including repetitions). Anger category has 242 words, disgust has 50, fear has 143, joy has 387, sadness has 195 and surprise has 63 words.
From each of the categories the words selected were those with an affective connotation, some 371 in total (34.35%). The concept of affective connotation is used to refer to words that have at least a synset in WordNet, whose hypernyms coincides with at least one of the following concepts emotion, affect, emotionality, feeling and moods, which hereinafter will be called affective ancestor. From the words selected, it was detected that four belong to more than one affective category; these are horror ∈ {fear, disgust}, dismay ∈ {fear, sadness}, suspense ∈ {joy, fear} and admiration ∈ {joy, surprise}. Out of the 371 words selected, 100 belong to the anger category, 6 to disgust, 46 belong to fear, 145 to joy, 66 to sadness and 8 to surprise.
Considering that similarity between two words indicates the closeness between them, this work calculated the similarity between words of an affective category and an antonym.
The experiment was divided into two parts: The first one analyzes the behavior of words of an affective category based on the similarity of these words with an antonym (as shown in Figure 3). Regarding this, it is expected that, within each affective category, the variability of the similarity of words with their antonym is homogeneous. The second one (as shown in Figure 4) analyzes the similarity of words with 3 antonyms of the affective category. For this case, it is expected that the variability of the similarity of words, with each of their antonyms, is homogeneous and low.
The opinion of an expert in English language was used to identify antonyms, who selected the three best antonyms for each affective category.
It is worth mentioning that, although WordNet does not provide an antonym for each affective category, the ones proposed by experts are available in WordNet.
Table 1 shows the three antonyms arranged according to the importance determined by the expert. It was verified that each antonym also had an affective connotation, in the table the antonym is represented including the word itself, the part of the speech and the meaning given by the affective connotation (word#pos#sensenumber).
Class | Ranking | Antonym |
---|---|---|
Anger | 1 | happiness#n#1 |
2 | calmness#n#3 | |
3 | peace#n#3 | |
Disgust | 1 | fondness#n#1 |
2 | admiration#n#1 | |
3 | love#n#1 | |
fear | 1 | fearlessness#n#1 |
2 | bravery#n#2 | |
3 | confidence#n#2 | |
Joy | 1 | sorrow#n#1 |
2 | sadness#n#1 | |
3 | melancholy | |
Sadness | 1 | happiness#n#1 |
2 | joy#n#1 | |
3 | gladness#n#1 | |
Surprise | 1 | expectation#n#3 |
2 | calmness#n#3 | |
3 | coolness#n#2 |
To obtain similarities between the words of each affective category and each antonym, a Java application was developed which uses WS4J1 (WordNet Similarity for Java), API for several Semantic Relatedness/Similarity algorithms.
4 Results and Discussion
The behavior analysis of the similarity between words, and their three antonyms using the six metrics allows observing a homogeneous behavior in each category, this is, the ranges of values in which the similarities move are small. As an example, Figure 5 and Figure 6 show the results of the six-metrics obtained for the words of the anger category considering their three antonyms (calmness#n#3, happiness#n#1, peace#n#3).
In the Resnik's case, the similarity provides modest results for all words. This can be explained by the fact that his calculation is based exclusively in IC of the LCA (4), where the closest common ancestor is determined, which for many words of the category and their antonyms, is the same, and coincides with the words used to differentiate the affective character of a word (as shown in Figure 7).
For example, considering the word gladness#n#1 as antonym of the sadness category and the word w1=dispiritedness#n#1 as part of it, the result of Resnik's metric is SimRes(antonym, w1) = 4.627, a value that repeats for 100% of the sadness category and 98% of all the words of the other affective categories, since most words share the common ancestor feeling#n#1.
The IC calculation proposed in Resnik (5) is based on the frequency words in corpus, for this predecessor's example feeling#n#1 is 4.627.
In general terms, for the metrics based on the IC, a low similarity or a similarity equal to zero could be due to the low frequency of some of the concepts in the vocabulary, even when both concepts are semantically related.
This could explain many of the values equal to zero obtained with the Jiang & Conrath and Lin metrics. In most cases, these values repeat for the same words regarding their three antonyms.
In addition to this, when Lin's metric is undetermined (5), the implementation of the API WS4J results in a zero value.
The same API yields a zero value when the IC of any of the two words is zero. The variabilities between the similarities of the words of each category with their antonyms, this is [Sim(antonym1, w1), Sim(antonym1, w2), Sim(antonym1, wn] are summarized in Table 2.
2 | Antonym | Wu&P | J&C | L&CH | LIN | RES | PATH |
---|---|---|---|---|---|---|---|
Anger | calmness#n#3 | 0.123 | 0.051 | 0.159 | 0.237 | 0.000 | 0.029 |
happiness#n#1 | 0.108 | 0.057 | 0.159 | 0.271 | 0.252 | 0.028 | |
peace#n#3 | 0.093 | 0.049 | 0.117 | 0.234 | 0.000 | 0.017 | |
disgust | admiration#n#1 | 0.015 | 0.037 | 0.067 | 0.180 | 0.000 | 0.011 |
fondness#n#1 | 0.015 | 0.034 | 0.067 | 0.169 | 0.000 | 0.011 | |
love#n#1 | 0.041 | 0.050 | 0.151 | 0.210 | 0.347 | 0.030 | |
fear | bravery#n#2 | 0.037 | 0.039 | 0.160 | 0.185 | 0.000 | 0.031 |
confidence#n#2 | 0.032 | 0.038 | 0.117 | 0.184 | 0.000 | 0.018 | |
fearlessness#n#1 | 0.037 | 0.039 | 0.160 | 0.185 | 0.000 | 0.031 | |
joy | melancholy#n#1 | 0.086 | 0.044 | 0.190 | 0.218 | 0.576 | 0.031 |
sadness#n#1 | 0.096 | 0.053 | 0.225 | 0.238 | 0.576 | 0.044 | |
sorrow#n#1 | 0.086 | 0.045 | 0.190 | 0.220 | 0.576 | 0.031 | |
sadness | gladness#n#1 | 0.081 | 0.000 | 0.145 | 0.000 | 0.000 | 0.026 |
joy#n#1 | 0.080 | 0.054 | 0.139 | 0.244 | 0.159 | 0.025 | |
happiness#n#1 | 0.074 | 0.052 | 0.139 | 0.231 | 0.614 | 0.025 | |
surprise | calmness#n#3 | 0.034 | 0.013 | 0.158 | 0.024 | 0.000 | 0.042 |
coolness#n#2 | 0.018 | 0.004 | 0.058 | 0.005 | 0.000 | 0.006 | |
expectation#n#3 | 0.034 | 0.013 | 0.158 | 0.027 | 0.000 | 0.042 |
The minimum standard deviation value is zero and the maximum value is 0.614. Regarding minimum values, these were obtained in the following cases: for the 3 antonyms of the surprise category, for the 3 antonyms of the fear category, for 2 antonyms of disgust, for 2 antonyms of anger and for 1 antonym of sadness.
These variability values were mainly obtained in Resnik's metric. However, minimum variability was also obtained with Jiang & Conrath and Lin's metric for the antonym gladness#n#1 of the sadness category. On the other hand, the maximum variability value was obtained for the antonym happiness#n#1 of the sadness category with Resnik's metric.
In general terms, as is presented in Table 2, the deviations obtained were low. It is worth mentioning that a certain degree of variability in the results is reasonable since in a same category there are words with different affective intensity.
For example, when calculating similarities of the words grief#n#1and sorrow#n#1, both belonging to the sadness category, with their antonym joy#n#1, SimLin (joy#n#1, grief#n#1) = 0.50 and SimLin (joy#n#1, sorrow#n#1) = 0.52 and the SimWu&P (joy#n#1, grief#n#1) = 0.70 and SimWu&P (joy#n#1, sorrow#n#1) = 0.75 were obtained.
This would show there are variations of similarity between words of a same category, indicating differences in the affective intensity of words. On the other hand, the standard deviation of the similarity of each word with their 3 antonyms was calculated, and since the antonyms were selected by the expert as the best antonyms, it is logical to expect a similar behavior of the words of a same category, regarding similarity, regardless of the antonym chosen.
In general terms, it is expected that the similarity calculation of a same word with the three antonyms yields a low variability. This is ratified in all affective categories; there were even cases with zero deviation.
As shown in Table 3, the similarities calculated between the words of the category and their antonyms, in most of the metrics, have a low variability, which leads us to the verification of the hypothesis. Results shown in Table 4 indicate that the antonym's selection performed by the experts was accurate since antonyms are similar to each other. As shown in Table 3, for each metric there were small differences between minimums and maximums, especially low in the fear category for each of the metrics.
Class | Wu&P | J&C | L&CH | LIN | RES | PATH | |
---|---|---|---|---|---|---|---|
Anger | max | 0.088065632 | 0.014142136 | 0.188561808 | 0.044969125 | 0.4384062 | 0.0377124 |
min | 0.028284271 | 0 | 0.103708995 | 0 | 0 | 0.0094281 | |
maxmin | 0.059781361 | 0.014142136 | 0.084852814 | 0.044969125 | 0.4384062 | 0.0282843 | |
Disgust | max | 0.051854497 | 0.030912062 | 0.188561808 | 0.078740079 | 0.4384062 | 0.0377124 |
min | 0 | 0 | 0 | 0 | 0 | 0 | |
maxmin | 0.051854497 | 0.030912062 | 0.188561808 | 0.078740079 | 0.4384062 | 0.0377124 | |
Fear | max | 0.042426407 | 0.004714045 | 0.188561808 | 0.004714045 | 0 0.0377124 | |
min | 0.032998316 | 0 | 0.11785113 | 0 | 0 | 0.0141421 | |
maxmin | 0.00942809 | 0.004714045 | 0.070710678 | 0.004714045 | 0 | 0.0235702 | |
Joy | max | 0.051854497 | 0.014142136 | 0.136707311 | 0.026246693 | 1.11E-16 | 0.0377124 |
min | 0.004714045 | 0 | 0.032998316 | 0 | 0 | 0 | |
maxmin | 0.047140452 | 0.014142136 | 0.103708995 | 0.026246693 | 1.11E-16 | 0.0377124 | |
Sadness | max | 0.070395707 | 0.098432154 | 0.230362034 | 0.34127213 | 1.5167143 | 0.0449691 |
min | 0.018856181 | 0 | 0.061282588 | 0 | 0 | 0.0094281 | |
maxmin | 0.051539526 | 0.098432154 | 0.169079446 | 0.34127213 | 1.5167143 | 0.035541 | |
Surprise | max | 0.188561808 | 0.035590261 | 0.565685425 | 0.224251843 | 1.8149074 | 0.108423 |
min | 0.164991582 | 0.023570226 | 0.414835978 | 0.193448242 | 1.8149074 | 0.0565685 | |
maxmin | 0.023570226 | 0.012020035 | 0.150849447 | 0.030803601 | 0 | 0.0518545 |
Class Similarity between | Wu&P | J&C | L&CH | LIN | RES | PATH | |
---|---|---|---|---|---|---|---|
Anger | calmness-happiness | 0.75 | 0.9 | 2.07 | 0.474 | 4.62 | 0.2 |
happiness-peace | 0.66 | 0.09 | 1.74 | 0.4664 | 4.62 | 0.14 | |
peace-calmness | 0.87 | 3.14 | 2.59 | 0.9833 | 9.36 | 0.33 | |
σ | 0.02 | 4.98 | 0.36 | 0.1755 | 14.98 | 0.02 | |
disgust | admiration-fondness | 0.87 | 0.25 | 2.59 | 0.806 | 8.15 | 0.33 |
fondness-love | 0.75 | 0.10 | 2.07 | 0.4981 | 4.62 | 0.2 | |
admiration-love | 0.75 | 0.12 | 2.07 | 0.5294 | 4.62 | 0.2 | |
σ | 0.01 | 0.012 | 0.17 | 0.0574 | 8.29 | 0.01 | |
fear | fearlessness-bravery | 1 | 1.3E+07 | 3.68 | 1 | 9.81 | 1 |
confidence-fearlessness | 0.87 | 6.48 | 2.59 | 0.9922 | 9.82 | 0.33 | |
bravery-confidence | 0.87 | 6.48 | 2.59 | 0.9922 | 9.82 | 0.33 | |
σ | 0.01 | 1.1E+14 | 0.80 | 0.00004 | 0.00004 | 0.3 | |
joy | melancholy-sadness | 0.93 | 0.56 | 2.99 | 0.903 | 8.21 | 0.5 |
sadness-sorrow | 0.93 | 0.67 | 2.99 | 0.9175 | 8.21 | 0.5 | |
melancholy-sorrow | 0.87 | 0.30 | 2.59 | 0.8352 | 8.21 | 0.33 | |
σ | 0.002 | 0.071 | 0.10 | 0.0039 | 0 | 0.02 | |
sadness | gladness-joy | 0.75 | 0 | 2.07 | 0 | 4.62 | 0.2 |
happiness-joy | 0.82 | 0.14 | 2.30 | 0.613 | 5.55 | 0.25 | |
gladness-happiness | 0.70 | 0 | 1.89 | 0 | 4.62 | 0.17 | |
σ | 0.007 | 0.013 | 0.08 | 0.2505 | 0.57 | 0 | |
surprise | calmness-coolness | 0.5 | 0.06 | 1.49 | 0.227 | 2.39 | 0.11 |
coolness-expectation | 0.5 | 0.06 | 1.49 | 0.237 | 2.39 | 0.11 | |
calmness-expectation | 0.85 | 0.11 | 2.59 | 0.5189 | 4.62 | 0.33 | |
σ | 0.08 | 0.001 | 0.80 | 0.0549 | 3.31 | 0.03 |
During this work, the use of antonyms to analyze the behavior of the words of each affective category was very useful, since it allowed validating that similarity has a homogeneous behavior and a low variability. It is important to highlight that in order to analyze the similarity values and their relationship with the affective intensity or the diffuse belonging of a word to more than one affective category, it is necessary to use another word as a pivot, not an antonym, just an opposite word. This way, the problem represented in Figure 7 would be eliminated, and more significant values of similarity would be obtained for future analysis as visualized in Figure 8.
5 Conclusions and Future Work
This article evidences that words of a same affective category have a homogeneous similarity, as stated in the hypothesis. This statement is supported by the results, which show a low standard deviation of the similarity of words that make up an affective category.
The results obtained so far show the usefulness of similarity to enrich a lexicon, for example, when identifying words regarding their diffuse classification or when determining the intensity of words that belong to a same affective category. Regarding this, it is possible to add words that do not have affective ancestors to a lexicon tagged with intensities using synonymy relationships. For this, it is important to identify the words that will be used as pivots. Although an antonym was used in this work, we believe that an intensity analysis requires a pivot that provides more meaningful information and that reduces the problem of metric's calculation based on IC, explained in the previous section. A priori, we believe it would be possible to obtain better results if a word with an opposite affective sense is used. For example, using Plutchik's taxonomy (8 emotions), this would require the re-classification of the lexicon based on Ekman's taxonomy (6 emotions).
The existence of mechanisms that improve the treatment of antonym relationships in WordNet, as well as the implementation of other similarity semantic metrics, would allow, with less effort, to improve affective knowledge bases, such as lexicons or dictionaries, considering, for example, the use of relationships of transitivity and of the semantic type for the analysis of knowledge structures.