adding before create callback for analyze sentiment