Text style transfer aims at transforming the style of a piece of text while keeping its primary content.
The style of the text is usually defined as a particular writing tone in different categories, such as
formality, politeness, sentiment, and political slant. Recently, most of the work in the area has been
devoted to the problem of sentiment transfer, which tries to transfer an opinionated text into a positive
or negative perspective. It has applications in marketing, political news, chatbots, writing tools, and
many others. On the other hand, emotions as the basic forms of sentiments have brought many
attentions to different tasks, including image style transfer but they are not well expressed in text
style transfer yet. This article presents a text emotion transfer model that transforms the style of a
text to each of the predefined ‘anger’, ‘fear’, ‘joy’, and ‘sadness’ emotions. Relying on masked language
modeling and transfer learning, the proposed model can perform efficiently on limited amounts of
emotion-annotated data. Moreover, the model shows promising experimental results against other
existing models considering style transfer accuracy, content preservation, and fluency in the ISEAR
and TEC emotion corpora.