Views
No views yet

1from transformers import pipeline
2
3# Load the SentimentClassifier model
4sentiment_classifier = pipeline("text-classification", model="Moritz-Pfeifer/CentralBankRoBERTa-sentiment-classifier")
5
6# Perform sentiment analysis
7sentinement_result = sentiment_classifier("The early effects of our policy tightening are also becoming visible, especially in sectors like manufacturing and construction that are more sensitive to interest rate changes.")
8print("Sentiment:", sentinement_result[0]['label'])| Please cite this model as Pfeifer, M. and Marohl, V.P. (2023) "CentralBankRoBERTa: A Fine-Tuned Large Language Model for Central Bank Communications". Journal of Finance and Data Science https://doi.org/10.1016/j.jfds.2023.100114 | |
|
Moritz Pfeifer Institute for Economic Policy, University of Leipzig 04109 Leipzig, Germany pfeifer@wifa.uni-leipzig.de |
Vincent P. Marohl Department of Mathematics, Columbia University New York NY 10027, USA vincent.marohl@columbia.edu |
1@article{Pfeifer2023,
2 title = {CentralBankRoBERTa: A fine-tuned large language model for central bank communications},
3 journal = {The Journal of Finance and Data Science},
4 volume = {9},
5 pages = {100114},
6 year = {2023},
7 issn = {2405-9188},
8 doi = {https://doi.org/10.1016/j.jfds.2023.100114},
9 url = {https://www.sciencedirect.com/science/article/pii/S2405918823000302},
10 author = {Moritz Pfeifer and Vincent P. Marohl},
11}