# Fine-Grained Sentiment-Controlled Text Generation Approach Based on Pre-Trained Language Model
## 5 Conclusions and Future Work  
In this paper, we propose a fine-grained sentiment-controllable text-generation method based on the pre-trained language model and the auxiliary sentiment classifier that utilizes both the labeled and unlabeled dataset to reach the aspect-level sentiment control in text generation. Our proposed query-hint mechanism and fine-grained sentiment control loss function have greatly enhanced the generator in controlling the sentiment during the text-generating process. Experiments on real-world datasets have demonstrated our generator's ability to generate aspect-level sentiment-controllable review statements with high quality and diverse syntax.  
For future work, we will explore the controllable text generation for implicitly expressed fine-grained sentiments (e.g., in this sentence: _\"We had to constantly ask the waiter to top up water glasses.\"_, the reviewer had a negative opinion of the waiter although there is no related opinion phrase in the sentence.), since the query-hint mechanism proposed in this paper is only effective for explicitly expressed fine-grained sentiments.  
Figure 8: Generated samples from the generative models. Red phrases represent the aspect-level sentiment formed by aspect-opinion pairs.  
**Author Contributions:** Conceptualization, L.Z. and Y.X.; methodology, Y.X.; software, Y.X.; validation, Y.X. and Z.Z.; formal analysis, Y.B.; investigation, L.Z. and Y.B.; resources, Y.X. and X.K.; data curation, Y.X. and X.K.; writing--original draft preparation, Y.X. and Y.B.; writing--review and editing, Y.X. and Y.B.; visualization, Y.X. and Z.Z.; supervision, L.Z. and X.K.; project administration, Y.X.; funding acquisition, L.Z. and X.K. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This work was funded by the National Natural Science Foundation of China (No. 62176234, 62072409).  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The source code used to generate the results shown in this paper is available at [[https://github.com/ashooha0/Alsecond](https://github.com/ashooha0/Alsecond)]([https://github.com/ashooha0/Alsecond](https://github.com/ashooha0/Alsecond)), accessed on 1 November 2022. The dataset, attached with pseudo labels by our classifier, is available at: [[https://drive.google.com/file/d/1](https://drive.google.com/file/d/1) HjyTLBBlyAOn_phWC6 VjgWQ2 HPZglAp/view?usp=share_link]([https://drive.google.com/file/d/1](https://drive.google.com/file/d/1) HjyTLBBlyAOn_phWC6 VjgWQ2 HPZglAp/view?usp=share_link), accessed on 15 November 2022. The ASTE-data-V2 dataset is available at [[https://github.com/xuuuluuu/SemEval-Triplet-data](https://github.com/xuuuluuu/SemEval-Triplet-data)]([https://github.com/xuuuluuu/SemEval-Triplet-data](https://github.com/xuuuluuu/SemEval-Triplet-data)), accessed on accessed on 18 May 2022, and the MAMS dataset is available at [[https://github.com/siat-nlp/MAMS-for-ABSA](https://github.com/siat-nlp/MAMS-for-ABSA)]([https://github.com/siat-nlp/MAMS-for-ABSA](https://github.com/siat-nlp/MAMS-for-ABSA)), accessed on accessed on 14 May 2022.  
**Conflicts of Interest:** The authors declare no conflict of interest.  
**Abbreviations**  
The following abbreviations are used in this manuscript:  
LMsLanguageModels  
NLGNaturalLanguageGeneration  
GPTGenerativePre-Training  
PPLMPl