# A Topic Model for Building Fine-grained Domain-specific Emotion Lexicon

[    [    [    [    [
###### Abstract

Emotion lexicons play a crucial role in sentiment analysis and opinion mining. In this paper, we propose a novel Emotion-aware LDA (EaLDA) model to build a domain-specific lexicon for predefined emotions that include anger, disgust, fear, joy, sadness, surprise. The model uses a minimal set of domain-independent seed words as prior knowledge to discover a domain-specific lexicon, learning a fine-grained emotion lexicon much richer and adaptive to a specific domain. By comprehensive experiments, we show that our model can generate a high-quality fine-grained domain-specific emotion lexicon.

\setdefaultlanguage

english

## 1 Introduction

Due to the popularity of opinion-rich resources (e.g., online review sites, forums, blogs and the microblogging websites), automatic extraction of opinions, emotions and sentiments in text is of great significance to obtain useful information for social and security studies. Various opinion mining applications have been proposed by different researchers, such as question answering, opinion mining, sentiment summarization, etc. As the fine-grained annotated data are expensive to get, the unsupervised approaches are preferred and more used in reality. Usually, a high quality emotion lexicon play a significant role when apply the unsupervised approaches for fine-grained emotion classification.

Thus far, most lexicon construction approaches focus on constructing general-purpose emotion lexicons [11, 7, 16, 4]. However, since a specific word can carry various emotions in different domains, a general-purpose emotion lexicon is less accurate and less informative than a domain-specific lexicon [1]. In addition, in previous work, most of the lexicons label the words on coarse-grained dimensions (positive, negative and neutrality). Such lexicons cannot accurately reflect the complexity of human emotions and sentiments. Lastly, previous emotion lexicons are mostly annotated based on many manually constructed resources (e.g., emotion lexicon, parsers, etc.). This limits the applicability of these methods to a broader range of tasks and languages.

To meet the challenges mentioned above, we propose a novel EaLDA model to construct a domain-specific emotion lexicon consisting of six primary emotions (i.e., anger, disgust, fear, joy, sadness and surprise). The proposed EaLDA model extends the standard Latent Dirichlet Allocation (LDA) [3] model by employing a small set of seeds to guide the model generating topics. Hence, the topics consequently group semantically related words into a same emotion category. The lexicon is thus able to best meet the user’s specific needs. Our approach is a weakly supervised approach since only some seeds emotion sentiment words are needed to lanch the process of lexicon construction. In practical applications, asking users to provide some seeds is easy as they usually have a good knowledge what are important in their domains.

Extensive experiments are carried out to evaluate our model both qualitatively and quantitatively using benchmark dataset. The results demonstrate that our EaLDA model improves the quality and the coverage of state-of-the-art fine-grained lexicon.

## 2 Related Work

Emotion lexicon plays an important role in opinion mining and sentiment analysis. In order to build such a lexicon, many researchers have investigated various kinds of approaches. However, these methods could roughly be classified into two categories in terms of the used information. The first kind of approaches is based on thesaurus that utilizes synonyms or glosses to determine the sentiment orientation of a word. The availability of the WordNet [9] database is an important starting point for many thesaurus-based approaches [8, 7, 5]. The second kind of approaches is based on an idea that emotion words co-occurring with each others are likely to convey the same polarity. There are numerous studies in this field [14, 15, 5, 2].

Most of the previous studies for emotion lexicon construction are limited to positive and negative emotions. Recently, to enhance the increasingly emotional data, a few researches have been done to identity the fine-grained emotion of words [12, 6, 10]. For example, Gill et al. (2008) utilize computational linguistic tools to identity the emotions of the words (such as, joy, sadness, acceptance, disgust, fear, anger, surprise and anticipation). While, this approach is mainly for public use in general domains. Rao et al. (2012) propose an method of automatically building the word-emotion mapping dictionary for social emotion detection. However, the emtion lexicon is not outputed explicitly in this paper, and the approach is fully unsupervised which may be difficult to be adjusted to fit the personalized data set.

Our approach relates most closely to the method proposed by Xie and Li (2012) for the construction of lexicon annotated for polarity based on LDA model. Our approach differs from [17] in two important ways: first, we do not address the task of polarity lexicon construction, but instead we focus on building fine-grained emotion lexicon. Second, we don’t assume that every word in documents is subjective, which is impractical in real world corpus.

## 3 Algorithm

In this section, we rigorously define the emotion-aware LDA model and its learning algorithm. We descrige with the model description, a Gibbs sampling algorithm to infer the model parameters, and finally how to generate a emotion lexicon based on the model output.

### 3.1 Model Description

Like the standard LDA model, EaLDA is a generative model. To prevent conceptual confusion, we use a superscript “(e)” to indicate variables related to emotion topics, and use a superscript “(n)” to indicate variables of non-emotion topics. We assume that each document has two classes of topics: $M$ emotion topics (corresponding to $M$ different emotions) and $K$ non-emotion topics (corresponding to topics that are not associated with any emotion). Each topic is represented by a multinomial distribution over words. In addition, we assume that the corpus vocabulary consists of $V$ distinct words indexed by $\{1,\ldots,V\}$.

For emotion topics, the EaLDA model draws the word distribution from a biased Dirichlet prior ${\rm Dir}(\beta_{k}^{(e)})$. The vector $\beta_{k}^{(e)}\in\mathbb{R}^{V}$ is constructed with $\beta_{k}^{(e)}:=\gamma_{0}^{(e)}(1^{V}-\Omega_{k})+\gamma_{1}^{(e)}\Omega_{k}$, for $k\in\{1,\ldots,M\}$. $\Omega_{k,w}=1$ if and only if word $w$ is a seed word for emotion $k$, otherwise $\Omega_{k,w}=0$. The scalars $\gamma_{0}^{(e)}$ and $\gamma_{1}^{(e)}$ are hyperparameters of the model. Intuitively, when $\gamma_{1}^{(e)}>\gamma_{0}^{(e)}$, the biased prior ensures that the seed words are more probably drawn from the associated emotion topic.

The generative process of word distributions for non-emotion topics follows the standard LDA definition with a scalar hyperparameter $\beta^{(n)}$.

For each word in the document, we decide whether its topic is an emotion topic or a non-emotion topic by flipping a coin with head-tail probability $(p^{(e)},p^{(n)})$, where $(p^{(e)},p^{(n)})\sim{\rm Dir}(\alpha)$. The emotion (or non-emotion) topic is sampled according to a multinomial distribution ${\rm Mult}(\theta^{(e)})$ (or ${\rm Mult}(\theta^{(n)})$). Here, both $\theta^{(e)}$ and $\theta^{(n)}$ are document-level latent variables. They are generated from Dirichlet priors ${\rm Dir}(\alpha^{(e)})$ and ${\rm Dir}(\alpha^{(n)})$ with $\alpha^{(s)}$ and $\alpha^{(n)}$ being hyperparameters.

We summarize the generative process of the EaLDA model as below:

1. 1.

for each emotion topic $k\in\{1,\ldots,M\}$, draw $\phi_{k}^{(e)}\sim{\rm Dir}(\beta_{k}^{(e)})$

2. 2.

for each non-emotion topic $k\in\{1,\ldots,K\}$, draw $\phi_{k}^{(n)}\sim{\rm Dir}(\beta^{(n)})$

3. 3.

for each document

1. (a)

draw $\theta^{(e)}\sim{\rm Dir}(\alpha^{(e)})$

2. (b)

draw $\theta^{(n)}\sim{\rm Dir}(\alpha^{(n)})$

3. (c)

draw $(p^{(e)},p^{(n)})\sim Dir(\alpha)$

4. (d)

for each word in document

1. i.

draw topic class indicator $s\sim{\rm Bernoulli}(p_{s})$

2. ii.

if $s=\mbox{emotion topic''}$

1. A.

draw $z^{(e)}\sim{\rm Mult}(\theta^{(e)})$

2. B.

draw $w\sim{\rm Mult}(\phi_{z^{(e)}}^{(e)})$ , emit word $w$

3. iii.

otherwise

1. A.

draw $z^{(n)}\sim{\rm Mult}(\theta^{(n)})$

2. B.

draw $w\sim{\rm Mult}(\phi_{z^{(n)}}^{(n)})$ , emit word $w$

As an alternative representation, the graphical model of the the generative process is shown by Figure 1.