Пример #1
0
        private void button_otherInfoExtract_Click(object sender, EventArgs e)
        {
            if (eventID == -1)
            {
                label_status.Text = "当前状态:抽取其他要素失败";
                MessageBox.Show("请先进行事件生成和时间抽取,否则无法抽取其他要素!", "请先进行事件生成和时间抽取", MessageBoxButtons.OK);
            }
            else
            {
                label_status.Text = "当前状态:正在进行其他要素抽取...";
                TextInfoExtract_BLL textInfoExtract_otherInfoExtract = new TextInfoExtract_BLL();
                EventInfo_DAL       eventInfo_countRatio             = new EventInfo_DAL();
                Event event_other = new Event();

                string segmentedText = @richTextBox_otherInfoExtract.Text.Trim();

                //更新事件分词文本
                event_other.eventID       = eventID;
                event_other.segmentedText = segmentedText;
                eventInfo_countRatio.updateEventByID(event_other);

                //开始抽取
                textInfoExtract_otherInfoExtract.otherExtract(segmentedText, eventID);
                label_status.Text = "当前状态:其他要素抽取完毕";

                //countRatio计算
                label_status.Text = "当前状态:正在进行countRatio计算...";
                eventInfo_countRatio.updateEventCountRatio(eventID);
                label_status.Text = "当前状态:countRatio计算完毕";

                MessageBox.Show("本次事件文本信息抽取完毕,窗口即将关闭。", "窗口将关闭", MessageBoxButtons.OK);
                this.Close();
            }
        }