private void firstButton_Click(object sender, RoutedEventArgs e)
        {
            DataSet data = new DataSet();
            data.Get("d://result3.txt");
            if (reviewText.Text == "")
            {
                MessageBox.Show("Введите текст отзыва");
                return;
            }
            Review review = new Review(reviewText.Text);
            Classifier.Classify(review, data);

            if (review.MyTonality)
                tonalityLabel.Content = "положительный";
            else
                tonalityLabel.Content = "отрицательный";
        }
Esempio n. 2
0
        private void firstButton_Click(object sender, RoutedEventArgs e)
        {
            DataSet data = new DataSet();

            data.Get("d://result3.txt");
            if (reviewText.Text == "")
            {
                MessageBox.Show("Введите текст отзыва");
                return;
            }
            Review review = new Review(reviewText.Text);

            Classifier.Classify(review, data);

            if (review.MyTonality)
            {
                tonalityLabel.Content = "положительный";
            }
            else
            {
                tonalityLabel.Content = "отрицательный";
            }
        }
Esempio n. 3
0
        private void secondButton_Click(object sender, RoutedEventArgs e)
        {
            DataSet data = new DataSet();

            data.Get("d://result4.txt");

            statisticValue.Content = "";
            string url = "http://torg.mail.ru/review/shops/?page=";
            int    count;

            try
            {
                count = Convert.ToInt32(countText.Text);
            }
            catch (Exception)
            {
                MessageBox.Show("Введите количество отзывов");
                return;
            }

            Thread t = new Thread((delegate() { Print(data, url, count); }));

            t.Start();
        }
        private void secondButton_Click(object sender, RoutedEventArgs e)
        {
            DataSet data = new DataSet();
            data.Get("d://result4.txt");

            statisticValue.Content = "";
            string url = "http://torg.mail.ru/review/shops/?page=";
            int count;
            try
            {
                count = Convert.ToInt32(countText.Text);
            }
            catch (Exception)
            {
                MessageBox.Show("Введите количество отзывов");
                return;
            }

            Thread t = new Thread((delegate() { Print(data, url, count); }));
            t.Start();
        }