Example #1
0
        static void Main(string[] args)
        {
            Logger = new StreamWriter("Log.log");
            //全局编码
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            //公司全称简称曾用名字典
            CompanyNameLogic.LoadCompanyName(@"Resources" + Path.DirectorySeparatorChar + "FDDC_announcements_company_name_20180531.json");
            //增减持公告日期的读入
            StockChange.ImportPublishTime();
            //结巴分词的地名修正词典
            PosNS.ImportNS(@"Resources" + Path.DirectorySeparatorChar + "ns.dict");
            CIRecord = new StreamWriter("CI.log");
            //预处理
            Traning(); return;

            Evaluator = new StreamWriter("Evaluator.log");
            Score     = new StreamWriter(@"Result" + Path.DirectorySeparatorChar + "Score" + Path.DirectorySeparatorChar + "score" + System.DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt");
            //new Contract(Program.DocBase + @"\FDDC_announcements_round1_train_20180518\round1_train_20180518\重大合同\html\1008828.html").Extract();return;
            Extract();
            CIRecord.Close();
            Score.Close();
            Evaluator.Close();
            Logger.Close();
        }
Example #2
0
        static void Main(string[] args)
        {
            if (Environment.OSVersion.Platform == System.PlatformID.Unix)
            {
                //静态变量已经定下来了,这里改不来了!
                Console.WriteLine("Switch Doc Path To:" + DocBase);
            }
            //日志
            Logger = new StreamWriter("Log.log");
            //实体属性器日志设定
            EntityProperty.Logger = Logger;
            //全局编码
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            CIRecord = new StreamWriter("CI.log");

            QuickTestArea(); return;

            //PDFToTXT.GetPdf2TxtBatchFile();

            //公司全称简称曾用名字典
            CompanyNameLogic.LoadCompanyName("Resources" + Path.DirectorySeparatorChar + "FDDC_announcements_company_name_20180531.json");
            //结巴分词的地名修正词典
            PosNS.ImportNS("Resources" + Path.DirectorySeparatorChar + "ns.dict");
            //预处理
            Traning();
            Evaluator = new StreamWriter("Evaluator.log");
            Score     = new StreamWriter("Result" + Path.DirectorySeparatorChar + "Score" + Path.DirectorySeparatorChar + "score" + System.DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt");
            Extract();
            CIRecord.Close();
            Score.Close();
            Evaluator.Close();
            Logger.Close();
        }