API to return sentiment for texts