class1.cs

来自「文本相似度计算(tfidf),可用文本分类以及文本信息处理」· CS 代码 · 共 35 行

CS
35
字号
using System;
using System.Diagnostics;

namespace ServiceRanking
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{			
			StopWordsHandler stopword=new StopWordsHandler() ;
			string[] doc=new string[4] {
										   "test b c c dd d d d d",
										   "a b c c c d dd d d test"
										,   "c d b f y teyr etre tretr gfgd c",
										"r a e e f n l i f f f f x l"
			};

			TFIDFMeasure tf=new TFIDFMeasure(doc) ;
			Trace.WriteLine((double)Math.Log(10000/50) ) ;
			Trace.WriteLine(tf.GetSimilarity(0, 1) ) ;
			string[] _3grams=NGram.GenerateNGrams("TEXT", 3) ;
			//
			// TODO: Add code to start application here
			//
		}
	}
}

⌨️ 快捷键说明

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