⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.cs

📁 实现文本的特征提取
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;

using Njnu.DAL;
using Njnu.Common;


namespace Njnu.TermSelector
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button btn_createTermLib;
		private System.Windows.Forms.Button btn_Weight;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.ColumnHeader columnHeader1;
		private System.Windows.Forms.ColumnHeader columnHeader2;
		private System.Windows.Forms.ColumnHeader columnHeader3;
		private System.Windows.Forms.Button btn_selectDoc;
		private System.Windows.Forms.Button btn_Serial;
		private System.Windows.Forms.Button btn_countTF;
		private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;

		private string folderPath = null;
		private Njnu.DAL.DocLib docLib = new DocLib();
		private Njnu.DAL.Doc doc_DAL = new Njnu.DAL.Doc();
		private Njnu.DAL.WordLib wordLib = new WordLib();
		private Njnu.Common.Doc doc = null;
		private System.Windows.Forms.Button btn_calculateSimValue;
		private System.Windows.Forms.Button btn_Weight_Test;
		private System.Windows.Forms.Button btn_Serial_Test;
		private System.Windows.Forms.Button btn_countTF_Test;
		private System.Windows.Forms.Panel panel1;
		private System.Windows.Forms.Panel panel2;
		private System.Windows.Forms.Label label1;
		
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form1()
		{			
			InitializeComponent();		
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.btn_createTermLib = new System.Windows.Forms.Button();
			this.btn_Weight = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.listView1 = new System.Windows.Forms.ListView();
			this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
			this.btn_selectDoc = new System.Windows.Forms.Button();
			this.btn_Serial = new System.Windows.Forms.Button();
			this.btn_countTF = new System.Windows.Forms.Button();
			this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
			this.btn_calculateSimValue = new System.Windows.Forms.Button();
			this.btn_Weight_Test = new System.Windows.Forms.Button();
			this.btn_Serial_Test = new System.Windows.Forms.Button();
			this.btn_countTF_Test = new System.Windows.Forms.Button();
			this.panel1 = new System.Windows.Forms.Panel();
			this.panel2 = new System.Windows.Forms.Panel();
			this.label1 = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// btn_createTermLib
			// 
			this.btn_createTermLib.BackColor = System.Drawing.SystemColors.Control;
			this.btn_createTermLib.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_createTermLib.Location = new System.Drawing.Point(432, 312);
			this.btn_createTermLib.Name = "btn_createTermLib";
			this.btn_createTermLib.Size = new System.Drawing.Size(88, 24);
			this.btn_createTermLib.TabIndex = 13;
			this.btn_createTermLib.Text = "归并类特征";
			this.btn_createTermLib.Click += new System.EventHandler(this.btn_createTermLib_Click);
			// 
			// btn_Weight
			// 
			this.btn_Weight.BackColor = System.Drawing.SystemColors.Control;
			this.btn_Weight.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_Weight.Location = new System.Drawing.Point(320, 312);
			this.btn_Weight.Name = "btn_Weight";
			this.btn_Weight.Size = new System.Drawing.Size(88, 24);
			this.btn_Weight.TabIndex = 11;
			this.btn_Weight.Text = "计算权重";
			this.btn_Weight.Click += new System.EventHandler(this.btn_Weight_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.listView1);
			this.groupBox1.Location = new System.Drawing.Point(20, 27);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(512, 264);
			this.groupBox1.TabIndex = 7;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "训练文档管理";
			// 
			// listView1
			// 
			this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
																						this.columnHeader1,
																						this.columnHeader2,
																						this.columnHeader3});
			this.listView1.GridLines = true;
			this.listView1.Location = new System.Drawing.Point(8, 24);
			this.listView1.Name = "listView1";
			this.listView1.Size = new System.Drawing.Size(496, 215);
			this.listView1.TabIndex = 0;
			this.listView1.View = System.Windows.Forms.View.Details;
			// 
			// columnHeader1
			// 
			this.columnHeader1.Text = "类别";
			this.columnHeader1.Width = 164;
			// 
			// columnHeader2
			// 
			this.columnHeader2.Text = "数量";
			this.columnHeader2.Width = 119;
			// 
			// columnHeader3
			// 
			this.columnHeader3.Text = "状态";
			this.columnHeader3.Width = 132;
			// 
			// btn_selectDoc
			// 
			this.btn_selectDoc.BackColor = System.Drawing.SystemColors.Control;
			this.btn_selectDoc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_selectDoc.Location = new System.Drawing.Point(24, 320);
			this.btn_selectDoc.Name = "btn_selectDoc";
			this.btn_selectDoc.Size = new System.Drawing.Size(56, 56);
			this.btn_selectDoc.TabIndex = 10;
			this.btn_selectDoc.Text = "选取训练文档";
			this.btn_selectDoc.Click += new System.EventHandler(this.btn_selectDoc_Click);
			// 
			// btn_Serial
			// 
			this.btn_Serial.BackColor = System.Drawing.SystemColors.Control;
			this.btn_Serial.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_Serial.Location = new System.Drawing.Point(96, 312);
			this.btn_Serial.Name = "btn_Serial";
			this.btn_Serial.Size = new System.Drawing.Size(88, 24);
			this.btn_Serial.TabIndex = 9;
			this.btn_Serial.Text = "文档编号";
			this.btn_Serial.Click += new System.EventHandler(this.btn_Serial_Click);
			// 
			// btn_countTF
			// 
			this.btn_countTF.BackColor = System.Drawing.SystemColors.Control;
			this.btn_countTF.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_countTF.Location = new System.Drawing.Point(208, 312);
			this.btn_countTF.Name = "btn_countTF";
			this.btn_countTF.Size = new System.Drawing.Size(88, 24);
			this.btn_countTF.TabIndex = 8;
			this.btn_countTF.Text = "统计词频";
			this.btn_countTF.Click += new System.EventHandler(this.btn_countTF_Click);
			// 
			// btn_calculateSimValue
			// 
			this.btn_calculateSimValue.BackColor = System.Drawing.SystemColors.Control;
			this.btn_calculateSimValue.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_calculateSimValue.Location = new System.Drawing.Point(432, 360);
			this.btn_calculateSimValue.Name = "btn_calculateSimValue";
			this.btn_calculateSimValue.Size = new System.Drawing.Size(88, 24);
			this.btn_calculateSimValue.TabIndex = 14;
			this.btn_calculateSimValue.Text = "计算相似度";
			this.btn_calculateSimValue.Click += new System.EventHandler(this.btn_calculateSimValue_Click);
			// 
			// btn_Weight_Test
			// 
			this.btn_Weight_Test.BackColor = System.Drawing.SystemColors.Control;
			this.btn_Weight_Test.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_Weight_Test.Location = new System.Drawing.Point(320, 360);
			this.btn_Weight_Test.Name = "btn_Weight_Test";
			this.btn_Weight_Test.Size = new System.Drawing.Size(88, 24);
			this.btn_Weight_Test.TabIndex = 17;
			this.btn_Weight_Test.Text = "计算权重";
			this.btn_Weight_Test.Click += new System.EventHandler(this.btn_Weight_Test_Click);
			// 
			// btn_Serial_Test
			// 
			this.btn_Serial_Test.BackColor = System.Drawing.SystemColors.Control;
			this.btn_Serial_Test.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_Serial_Test.Location = new System.Drawing.Point(96, 360);
			this.btn_Serial_Test.Name = "btn_Serial_Test";
			this.btn_Serial_Test.Size = new System.Drawing.Size(88, 24);
			this.btn_Serial_Test.TabIndex = 16;
			this.btn_Serial_Test.Text = "测试编号";
			this.btn_Serial_Test.Click += new System.EventHandler(this.btn_Serial_Test_Click);
			// 
			// btn_countTF_Test
			// 
			this.btn_countTF_Test.BackColor = System.Drawing.SystemColors.Control;
			this.btn_countTF_Test.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btn_countTF_Test.Location = new System.Drawing.Point(208, 360);
			this.btn_countTF_Test.Name = "btn_countTF_Test";
			this.btn_countTF_Test.Size = new System.Drawing.Size(88, 24);
			this.btn_countTF_Test.TabIndex = 15;
			this.btn_countTF_Test.Text = "统计词频";
			this.btn_countTF_Test.Click += new System.EventHandler(this.btn_countTF_Test_Click);
			// 
			// panel1
			// 
			this.panel1.BackColor = System.Drawing.SystemColors.Control;
			this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.panel1.Location = new System.Drawing.Point(88, 304);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(440, 40);
			this.panel1.TabIndex = 19;
			// 
			// panel2
			// 
			this.panel2.BackColor = System.Drawing.SystemColors.Control;
			this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.panel2.Location = new System.Drawing.Point(88, 352);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(440, 40);
			this.panel2.TabIndex = 20;
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(8, 8);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(536, 296);
			this.label1.TabIndex = 21;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(552, 414);
			this.Controls.Add(this.btn_Weight_Test);
			this.Controls.Add(this.btn_Serial_Test);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -