  People's conduct and reactions are driven by their emotions. Online social
media is becoming a great instrument for expressing emotions in written form.
Paying attention to the context and the entire sentence help us to detect
emotion from texts. However, this perspective inhibits us from noticing some
emotional words or phrases in the text, particularly when the words express an
emotion implicitly rather than explicitly. On the other hand, focusing only on
the words and ignoring the context results in a distorted understanding of the
sentence meaning and feeling. In this paper, we propose a framework that
analyses text at both the sentence and word levels. We name it CEFER (Context
and Emotion embedded Framework for Emotion Recognition). Our four approach
facets are to extracting data by considering the entire sentence and each
individual word simultaneously, as well as implicit and explicit emotions. The
knowledge gained from these data not only mitigates the impact of flaws in the
preceding approaches but also it strengthens the feature vector. We evaluate
several feature spaces using BERT family and design the CEFER based on them.
CEFER combines the emotional vector of each word, including explicit and
implicit emotions, with the feature vector of each word based on context. CEFER
performs better than the BERT family. The experimental results demonstrate that
identifying implicit emotions are more challenging than detecting explicit
emotions. CEFER, improves the accuracy of implicit emotion recognition.
According to the results, CEFER perform 5% better than the BERT family in
recognizing explicit emotions and 3% in implicit.
