ProsusAI / finBERT

Financial Sentiment Analysis with BERT
Apache License 2.0
1.45k stars 417 forks source link

Could finBERT only give one result (logit / prediction / sentiment_score) for entire article ? #39

Closed rockallorange closed 3 years ago

rockallorange commented 3 years ago

Hi, I'm trying to use predict.py, colud it possible to predict entire artile (maybe 17 lines) to one final result? but not 17 result for every sentence ?

The images show 17 lines in green background, each line get a result, could it just predict the entire article(yellow background) ?

Thanks for your help.

image

doguaraci commented 3 years ago

I'm afraid not. Sentences should have a token length of maximum 64. (Somewhat more is also fine most of the time, only now that the tokenizer is going to truncate part of the text). Averaging the sentiment scores is probably the only solution.