Esempio n. 1
0
        private async Task Analyze()
        {
            IsBusy = true;

            var newReviews = await TextAnalyticsService.AnalyzeText(Reviews.ToList());

            if (newReviews != null)
            {
                Reviews = new ObservableCollection <Review>(newReviews.OrderBy(x => x.Id));
            }

            IsBusy = false;
        }
        private async void AnalyzeButton_Clicked(object sender, EventArgs e)
        {
            Loading(true);

            var sentiment = await TextAnalyticsService.AnalyzeText(MessageEntry.Text);

            if (sentiment != null)
            {
                ScoreLabel.Text      = sentiment.score.ToString("N4");
                ScoreLabel.TextColor = SentimentColor.Retrieve(sentiment.score);
            }

            Loading(false);
        }