static string GetYiFang(HTMLEngine.MyRootHtmlNode root) { var Extractor = new ExtractProperty(); //这些关键字后面 Extractor.LeadingWordList = new string[] { "供应商名称:" }; Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("甲方候补词(关键字):[" + item + "]"); return(item); } //乙方:"有限公司" Extractor = new ExtractProperty(); //这些关键字后面 Extractor.TrailingWordList = new string[] { "有限公司董事会" }; Extractor.Extract(root); Extractor.CandidateWord.Reverse(); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("乙方候补词(关键字):[" + item + "有限公司]"); return(item + "有限公司"); } if (companynamelist.Count > 0) { return(companynamelist[companynamelist.Count - 1].secFullName); } return(""); }
static string getBuyMethod(HTMLEngine.MyRootHtmlNode root) { //是否包含关键字 "现金认购" var Extractor = new ExtractProperty(); var cnt = Extractor.FindWordCnt("现金认购", root); Program.Logger.WriteLine("现金认购(文本):" + cnt); if (cnt > 0) { return("现金"); } return(""); }
public static string GetCompanyFullName(HTMLEngine.MyRootHtmlNode root) { var Extractor = new ExtractProperty(); Extractor.TrailingWordList = new string[] { "公司董事会" }; Extractor.Extract(root); Extractor.CandidateWord.Reverse(); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("全称:[" + item + "公司]"); return(item); } return(""); }
//变动截止日期 static string GetChangeEndDate(HTMLEngine.MyRootHtmlNode root) { var Extractor = new ExtractProperty(); var StartArray = new string[] { "截止", "截至" }; var EndArray = new string[] { "日" }; Extractor.StartEndFeature = Utility.GetStartEndStringArray(StartArray, EndArray); Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("候补变动截止日期:[" + item + "]"); return(Normalizer.NormailizeDate(item + "日")); } return(""); }
static string GetMoney(HTMLEngine.MyRootHtmlNode node) { var Money = ""; var Extractor = new ExtractProperty(); //这些关键字后面 Extractor.LeadingWordList = new string[] { "中标金额", "中标价", "合同金额", "合同总价", "订单总金额" }; Extractor.Extract(node); foreach (var item in Extractor.CandidateWord) { Money = Utility.SeekMoney(item, ""); Program.Logger.WriteLine("金额候补词:[" + Money + "]"); } return(Money); }
static string GetContractName(MyRootHtmlNode root) { var Extractor = new ExtractProperty(); var MarkFeature = new ExtractProperty.struMarkFeature(); MarkFeature.MarkStartWith = "《"; MarkFeature.MarkEndWith = "》"; MarkFeature.InnerEndWith = "合同"; var MarkFeatureConfirm = new ExtractProperty.struMarkFeature(); MarkFeatureConfirm.MarkStartWith = "《"; MarkFeatureConfirm.MarkEndWith = "》"; MarkFeatureConfirm.InnerEndWith = "确认书"; Extractor.MarkFeature = new ExtractProperty.struMarkFeature[] { MarkFeature, MarkFeatureConfirm }; Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("合同名称候补词(《XXX》):[" + item + "]"); return(item); } Extractor = new ExtractProperty(); //这些关键字后面 Extractor.LeadingWordList = new string[] { "合同名称:" }; Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("合同名称候补词(关键字):[" + item + "]"); return(item); } //合同 Extractor = new ExtractProperty(); var StartArray = new string[] { "签署了" }; var EndArray = new string[] { "合同" }; Extractor.StartEndFeature = Utility.GetStartEndStringArray(StartArray, EndArray); Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("合同候补词(合同):[" + item + "]"); return(item.Replace(" ", "")); } return(""); }
//固定搭配 public static string GetCompanyShortName(HTMLEngine.MyRootHtmlNode root) { var companyList = new Dictionary <string, string>(); //从第一行开始找到 有限公司 有限责任公司, 如果有简称的话Value是简称 //股票简称:东方电气 //东方电气股份有限公司董事会 var Extractor = new ExtractProperty(); Extractor.LeadingWordList = new string[] { "股票简称", "证券简称" }; Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { var ShortName = item.Replace(":", "").Replace(":", "").Trim(); if (Utility.GetStringBefore(ShortName, "、") != "") { ShortName = Utility.GetStringBefore(ShortName, "、"); } if (Utility.GetStringBefore(ShortName, ")") != "") { ShortName = Utility.GetStringBefore(ShortName, ")"); } if (Utility.GetStringBefore(ShortName, "公告") != "") { ShortName = Utility.GetStringBefore(ShortName, "公告"); } if (Utility.GetStringBefore(ShortName, "股票") != "") { ShortName = Utility.GetStringBefore(ShortName, "股票"); } if (Utility.GetStringBefore(ShortName, "证券") != "") { ShortName = Utility.GetStringBefore(ShortName, "证券"); } if (Utility.GetStringBefore(ShortName, " ") != "") { ShortName = Utility.GetStringBefore(ShortName, " "); } FDDC.Program.Logger.WriteLine("简称:[" + ShortName + "]"); return(ShortName); } return(""); }
static string GetProjectName(MyRootHtmlNode root) { var Extractor = new ExtractProperty(); //这些关键字后面 Extractor.LeadingWordList = new string[] { "项目名称:" }; Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("项目名称候补词(关键字):[" + item + "]"); return(item.Replace(" ", "")); } var MarkFeature = new ExtractProperty.struMarkFeature(); MarkFeature.MarkStartWith = "“"; MarkFeature.MarkEndWith = "”"; MarkFeature.InnerEndWith = "标段"; var MarkFeatureConfirm = new ExtractProperty.struMarkFeature(); MarkFeatureConfirm.MarkStartWith = "“"; MarkFeatureConfirm.MarkEndWith = "”"; MarkFeatureConfirm.InnerEndWith = "标"; Extractor.MarkFeature = new ExtractProperty.struMarkFeature[] { MarkFeature, MarkFeatureConfirm }; Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("工程名称候补词(《XXX》):[" + item + "]"); return(item); } var list = BussinessLogic.GetProjectName(root); if (list.Count > 0) { return(list[0]); } return(""); }
static string GetJiaFang(MyRootHtmlNode root) { var Extractor = new ExtractProperty(); //这些关键字后面 Extractor.LeadingWordList = new string[] { "发包人:", "招标人:", "业主方:", "业主:", "甲方:", "采购人:", "采购人名称:" }; Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("甲方候补词(关键字):[" + item + "]"); return(item); } //招标 Extractor = new ExtractProperty(); var StartArray = new string[] { "业主", "收到", "接到" }; var EndArray = new string[] { "发来", "发出", "的中标" }; Extractor.StartEndFeature = Utility.GetStartEndStringArray(StartArray, EndArray); Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { var JiaFang = item; JiaFang = JiaFang.Replace("业主", ""); Program.Logger.WriteLine("甲方候补词(招标):[" + item + "]"); return(item); } //合同 Extractor = new ExtractProperty(); StartArray = new string[] { "与", "与业主" }; EndArray = new string[] { "签署", "签订" }; Extractor.StartEndFeature = Utility.GetStartEndStringArray(StartArray, EndArray); Extractor.Extract(root); foreach (var item in Extractor.CandidateWord) { Program.Logger.WriteLine("甲方候补词(合同):[" + item + "]"); return(item); } return(""); }
static string GetHolderFullName(HTMLEngine.MyRootHtmlNode root) { var Extractor = new ExtractProperty(); var StartArray = new string[] { "接到", "收到", "股东" }; var EndArray = new string[] { "的", "通知", "告知函", "减持", "增持", "《" }; Extractor.StartEndFeature = Utility.GetStartEndStringArray(StartArray, EndArray); Extractor.Extract(root); foreach (var word in Extractor.CandidateWord) { if (word.Contains("简称")) { return(word); } Program.Logger.WriteLine("候补股东全称修正:[" + word + "]"); } if (Extractor.CandidateWord.Count > 0) { return(Extractor.CandidateWord[0]); } return(""); }