function handling analysis of sentiment completed