SIS-Team-24 / 2023-SIS-Team-24

Using Natural Language Processing, Text Insights examines and provides insights to text.
1 stars 0 forks source link

Fix sentiment API issue when token len > 512 #196

Closed henrygoodman closed 1 year ago

henrygoodman commented 1 year ago

Fixes #193

When input > 512 tokens, sentiment had to perform extractive summary to reduce the input down to a size that the sentiment model can handle. During this function call, getSummary returns a dict with summary key, when sentiment analyser expectes a raw string. Fixed by setting text_to_analyse = getSummary(input)['summary']