International Core Journal of Engineering 2020-26 | Page 200
notation.
and fear.
Not only by emotional keywords, emotional state is also
affected by some modifiers in sentences, such as “very,
therefore, too much, no” and so on. Usually, emotional
keywords represent the main emotional responses related to
a topic in a sentence. Modifiers are usually used to enhance
or weaken the mood. For example, I was so angry. The
word “so angry” expresses the key emotional state of the
sentence with great emphasis. The effect of “strong”
emotions can be clearly demonstrated by emphasizing key
emotional words.
The matrix of Word Embedding assigns a fixed-length
vector representation to each word. This length can be set
by itself, such as 300, which is much smaller than the
dictionary length (such as 10,000). Moreover, the angle
between the two-word vectors can be used as a measure of
the relationship between them, as shown in Figure 5.
B. Network Model
To generate words from context for emotion detection,
this paper creates a lexical library of 65620 words. All
words in the vocabulary fall into two broad categories:
content words and EFW. If the word type is an emotion
keyword, it contains six emotional state labels (joy, sadness,
anger, surprise, hatred, and fear) and corresponding weights.
For modifiers and metaphors, they have more to do with
exaggerated emotion or introverted expression. The entire
dictionary is shown in Figure 6.
Figure 5. WordEmbedding Number Method.
Through the cosine function, you can calculate the
correlation between two words, simple and efficient:
similarity
cos( T )
A B
(1)
|| A || 2 || B || 2
Because WordEmbedding saves space and is easy to
calculate, it is widely used in the NLP field.
III. R ECOGNITION ALGORITHM
A. Emotion functional words
There are two ways to generate emotions. First, from the
perspective of semantic information, people like to express
emotions according to what they want to say. The other is
from an environmental and psychological perspective. If
there is a strong emotional expression in different situations,
the content is not very important. In order to extract the
appropriate emotional state from the context information,
each input sentence can be regarded as a combination of
content words and emotion functional words (EFWs). EFW
is a sort of words that can be associated with or influence on
a particular emotional state.
The most important word in EFWs is the emotional
keyword, which provides the basic emotional value of the
input sentence. Usually, it is difficult for people to divide
vocabulary into different emotional states. Emotions are
hidden in human experience before language history. There
are many ambiguities, most of which occur in anger and
sadness. For example, depending on different personality
and circumstances, the word “unhappy” can mean “anger”
or “sadness”.
In order to obtain a more accurate description, weights
are assigned to each variable that expresses strong emotions.
For example, assigning a weight of 0.5 (for anger) and 0.5
(for sadness) means “unhappy”. It means that “unhappy”
has the equal possibility of emotional state of anger and
sorrow. The result is the combination and spread of these
values. In Chinese, there are 462 emotional keywords,
mostly nouns, verbs and adjectives. In order to reduce the
complexity, only six basic emotional state markers were
selected, namely happiness, sadness, anger, surprise, hatred
Figure 6. Dictionary Structure.
澔
Figure 7. Text Emotional Recognition Model.
In order to make full use of the word feature and
178