|
@@ -23,8 +23,8 @@ var unblTextReg *regexp.Regexp = regexp.MustCompile("(项目业绩案例|类似
|
|
var beforeTextReg *regexp.Regexp = regexp.MustCompile("(招标代理机构|招标单位|招标人)[::].{4,25}\n")
|
|
var beforeTextReg *regexp.Regexp = regexp.MustCompile("(招标代理机构|招标单位|招标人)[::].{4,25}\n")
|
|
|
|
|
|
var preConReg1 = regexp.MustCompile("(第[一二三1-3]中标候选人)\n(业绩奖项)")
|
|
var preConReg1 = regexp.MustCompile("(第[一二三1-3]中标候选人)\n(业绩奖项)")
|
|
-var hisReg = regexp.MustCompile("(开标记录|开标记录及投标报价|类似业绩|历史业绩|填报项目业绩|[得评]+[审打]{0,2}分情况|无效标)[::\n]*.*?[\n]?(</td>)")
|
|
|
|
-var hisReg2 = regexp.MustCompile("(开标记录|[得评]+[审打]{0,2}分情况|无效标)[::\n]*.*?[\n]?(.*原因及其依据.*[::]?)?[\n]?.*?[\n]?(</tr>|</table>|</td>)")
|
|
|
|
|
|
+var hisReg = regexp.MustCompile("([\u4E00-\u9FA5].{0,10})?(开标记录|开标记录及投标报价|类似业绩|历史业绩|填报项目业绩|[得评]+[审打]{0,2}分情况|无效标)[::\n]*(.*)?[\n]?(</td>)")
|
|
|
|
+var hisReg2 = regexp.MustCompile("([\u4E00-\u9FA5].{0,10})?(开标记录|业绩|[得评]+[审打]{0,2}分情况|无效标)[::\n]*(.*)?[\n]?(.*原因及其依据.*[::]?)?[\n]?(.*)?[\n]?(</tr>|</table>|</td>)")
|
|
|
|
|
|
var formattext = regexp.MustCompile("(投标总价)([0-9,.万元]*)")
|
|
var formattext = regexp.MustCompile("(投标总价)([0-9,.万元]*)")
|
|
var formattext2 = regexp.MustCompile("中标单价.*(中标总价.*)")
|
|
var formattext2 = regexp.MustCompile("中标单价.*(中标总价.*)")
|
|
@@ -36,12 +36,13 @@ var formattext4 = regexp.MustCompile("(中标金额[::])设计费用[::][0-9
|
|
//特殊影响分包候选人抽取
|
|
//特殊影响分包候选人抽取
|
|
var formattext5 = regexp.MustCompile("投标报价[::]包件1[::][0-9.万元]+[,,]包件2[::][0-9.万元]+[,,]投标总价([::]+)([0-9.万元]+)")
|
|
var formattext5 = regexp.MustCompile("投标报价[::]包件1[::][0-9.万元]+[,,]包件2[::][0-9.万元]+[,,]投标总价([::]+)([0-9.万元]+)")
|
|
var formattext6 = regexp.MustCompile("(投标报价[::][0-9.]+)\n([万元]+)")
|
|
var formattext6 = regexp.MustCompile("(投标报价[::][0-9.]+)\n([万元]+)")
|
|
-
|
|
|
|
var formattext10 = regexp.MustCompile(".*包号\n.*\n.*供应商名称\n.*\n.*(成交|中标)金额\n(.*单位\n)?" +
|
|
var formattext10 = regexp.MustCompile(".*包号\n.*\n.*供应商名称\n.*\n.*(成交|中标)金额\n(.*单位\n)?" +
|
|
"<td.*>(.*)\n(<td>\n)?.*\n<td.*>[\n]?(.*公司)\n.*\n<td.*>([0-9.,,万元]+)\n")
|
|
"<td.*>(.*)\n(<td>\n)?.*\n<td.*>[\n]?(.*公司)\n.*\n<td.*>([0-9.,,万元]+)\n")
|
|
var formattext11 = regexp.MustCompile("(项目预算)\n(第[一1](包|标段)[::])([0-9.万元人民币]+)\n" +
|
|
var formattext11 = regexp.MustCompile("(项目预算)\n(第[一1](包|标段)[::])([0-9.万元人民币]+)\n" +
|
|
"(第[二2](包|标段)[::])([0-9.万元人民币]+)\n")
|
|
"(第[二2](包|标段)[::])([0-9.万元人民币]+)\n")
|
|
var formattext12 = regexp.MustCompile("((成交|中标)价格|本期预算)\n[((]万元[))]\n([0-9.万元人民币]+)\n")
|
|
var formattext12 = regexp.MustCompile("((成交|中标)价格|本期预算)\n[((]万元[))]\n([0-9.万元人民币]+)\n")
|
|
|
|
+var formattext13 = regexp.MustCompile("中选单位名称[::]标的一[::](.{4,25}公司)[;;]标的二[::](.{4,25}公司)\n中选金额[::]标的一[::]([0-9\\.人民币万元]+)[;;]标的二[::]([0-9\\.人民币万元]+)")
|
|
|
|
+var formattext14 = regexp.MustCompile("包号\n项目名称\n中标单位名称\n中标金额[((]元[))]\n1\n.*\n(.{4,25}公司)\n([0-9\\.]+)\n2\n.*\n(.{4,25}公司)\n([0-9\\.]+)")
|
|
|
|
|
|
//业绩相关~分割
|
|
//业绩相关~分割
|
|
var formattext20 = regexp.MustCompile("(工程业绩|投标文件中填报的单位项目业绩名称)[::][\n]?1[、.].*\n2[、.].*\n(3[、.].*\n)?")
|
|
var formattext20 = regexp.MustCompile("(工程业绩|投标文件中填报的单位项目业绩名称)[::][\n]?1[、.].*\n2[、.].*\n(3[、.].*\n)?")
|
|
@@ -53,19 +54,16 @@ var formattext50 = regexp.MustCompile("主要标的数量[::]([0-9.]+)\n主要
|
|
//特殊文本提取有效
|
|
//特殊文本提取有效
|
|
var formattext100 = regexp.MustCompile("项目编号.*\n项目名称.*\n招标单位.*\n招标代理.*\n中标单位.*\n项目编号.*\n总价[((]万元[))]([0-9.]+)")
|
|
var formattext100 = regexp.MustCompile("项目编号.*\n项目名称.*\n招标单位.*\n招标代理.*\n中标单位.*\n项目编号.*\n总价[((]万元[))]([0-9.]+)")
|
|
|
|
|
|
-/*
|
|
|
|
- 项目编号JG2020-4278-003
|
|
|
|
- 项目名称株洲站改扩建工程(第五批)建管甲供物资(通信、信息专业)招标(ZZXX-02包件 安检仪等 WZ-2020-56)
|
|
|
|
- 招标单位中国铁路广州局集团有限公司长沙工程建设指挥部
|
|
|
|
- 招标代理中铁物总国际招标有限公司
|
|
|
|
- 中标单位广州同视电子设备有限公司
|
|
|
|
- 项目编号JG2020-4278-003
|
|
|
|
- 总价(万元)249.2
|
|
|
|
-*/
|
|
|
|
-
|
|
|
|
//特别处理-表格数据
|
|
//特别处理-表格数据
|
|
var tablePackageWinnerReg = regexp.MustCompile("[\n]?(成交侯选人|第一中标候选人)[::](.{4,15}(公司|厂))")
|
|
var tablePackageWinnerReg = regexp.MustCompile("[\n]?(成交侯选人|第一中标候选人)[::](.{4,15}(公司|厂))")
|
|
|
|
|
|
|
|
+//多供应商文本类
|
|
|
|
+var MultiStartReg = regexp.MustCompile("([二三四][、]中标[((]成交[))]信息)\n")
|
|
|
|
+var MultiEndReg = regexp.MustCompile("([三四五][、]主要标的信息)")
|
|
|
|
+
|
|
|
|
+var SupplyInfoReg1 = regexp.MustCompile("([1-9])[::]供应商名称[\\s ]+(.{4,25}(公司|研究院|研究所)).*中标[((]成交[))]金额[\\s ]+([0-9\\.万元]+)[;;]")
|
|
|
|
+var SupplyInfoReg2 = regexp.MustCompile("()供应商名称[::](.{4,25}(公司|研究院|研究所))\n供应商地址.*\n中标[((]成交[))]金额[::]([0-9\\.]+[((]?[万元]+[))]?)")
|
|
|
|
+
|
|
//特殊-爬虫文本-抽取单价数量-并计算
|
|
//特殊-爬虫文本-抽取单价数量-并计算
|
|
func dealWithSpecStructToSpiderCode(text string) string {
|
|
func dealWithSpecStructToSpiderCode(text string) string {
|
|
text = formattext50.ReplaceAllString(text, "$1&&$2")
|
|
text = formattext50.ReplaceAllString(text, "$1&&$2")
|
|
@@ -122,6 +120,37 @@ func thanWinnerOrderEffective(old_order []map[string]interface{}, new_order []ma
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//多供应商文本构建分包
|
|
|
|
+func dealWithMultiSuppliersText(con string) (bool, string) {
|
|
|
|
+ startIndex := MultiStartReg.FindAllStringIndex(con, 1)
|
|
|
|
+ endIndex := MultiEndReg.FindAllStringIndex(con, 1)
|
|
|
|
+ if len(startIndex) == 1 && len(endIndex) == 1 {
|
|
|
|
+ if len(startIndex[0]) > 1 && len(endIndex[0]) > 1 {
|
|
|
|
+ text := con[startIndex[0][1]:endIndex[0][0]]
|
|
|
|
+ arr1 := SupplyInfoReg1.FindAllStringSubmatch(text, -1)
|
|
|
|
+ if text1 := supplyInfoMethod(arr1, 2, 4); text1 != "" {
|
|
|
|
+ return true, strings.ReplaceAll(con, text, text1)
|
|
|
|
+ }
|
|
|
|
+ arr2 := SupplyInfoReg2.FindAllStringSubmatch(text, -1)
|
|
|
|
+ if text2 := supplyInfoMethod(arr2, 2, 4); text2 != "" {
|
|
|
|
+ return true, strings.ReplaceAll(con, text, text2)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false, ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func supplyInfoMethod(arr [][]string, w_index int, b_index int) string {
|
|
|
|
+ new_text := ""
|
|
|
|
+ if len(arr) > 1 {
|
|
|
|
+ for k, v := range arr {
|
|
|
|
+ key := fmt.Sprintf("包%d", k+1)
|
|
|
|
+ new_text += key + "\n中标单位:" + v[w_index] + "\n中标金额:" + v[b_index] + "\n"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new_text
|
|
|
|
+}
|
|
|
|
+
|
|
//分析方法
|
|
//分析方法
|
|
func AnalyStart(job *util.Job, isSite bool, codeSite string) {
|
|
func AnalyStart(job *util.Job, isSite bool, codeSite string) {
|
|
con := job.Content
|
|
con := job.Content
|
|
@@ -129,8 +158,8 @@ func AnalyStart(job *util.Job, isSite bool, codeSite string) {
|
|
con = RepairCon(con)
|
|
con = RepairCon(con)
|
|
//格式化正文
|
|
//格式化正文
|
|
//con = preConReg1.ReplaceAllString(con, "${1}${2}")
|
|
//con = preConReg1.ReplaceAllString(con, "${1}${2}")
|
|
- con = hisReg.ReplaceAllString(con, "${2}")
|
|
|
|
- con = hisReg2.ReplaceAllString(con, "${4}")
|
|
|
|
|
|
+ con = hisReg.ReplaceAllString(con, "${4}")
|
|
|
|
+ con = hisReg2.ReplaceAllString(con, "${6}")
|
|
|
|
|
|
con = formattext.ReplaceAllString(con, "${1}:${2}")
|
|
con = formattext.ReplaceAllString(con, "${1}:${2}")
|
|
con = formattext2.ReplaceAllString(con, "${1}")
|
|
con = formattext2.ReplaceAllString(con, "${1}")
|
|
@@ -143,6 +172,13 @@ func AnalyStart(job *util.Job, isSite bool, codeSite string) {
|
|
con = formattext10.ReplaceAllString(con, "\n分包$3\n中标单位:$5 中标金额:$6\n")
|
|
con = formattext10.ReplaceAllString(con, "\n分包$3\n中标单位:$5 中标金额:$6\n")
|
|
con = formattext11.ReplaceAllString(con, "${1}\n${2}\n预算金额:${4}\n${5}\n预算金额:${7}\n${8}\n")
|
|
con = formattext11.ReplaceAllString(con, "${1}\n${2}\n预算金额:${4}\n${5}\n预算金额:${7}\n${8}\n")
|
|
con = formattext12.ReplaceAllString(con, "\n${1}:${3}万元\n")
|
|
con = formattext12.ReplaceAllString(con, "\n${1}:${3}万元\n")
|
|
|
|
+ con = formattext13.ReplaceAllString(con, "\n包一\n中标单位:${1}\n中标金额:${3}\n"+"包二\n中标单位:${2}\n中标金额:${4}\n")
|
|
|
|
+ con = formattext14.ReplaceAllString(con, "\n包一\n中标单位:${1}\n中标金额:${2}\n"+"包二\n中标单位:${3}\n中标金额:${4}\n")
|
|
|
|
+
|
|
|
|
+ //多供应商~文本结构~重构
|
|
|
|
+ if m_b, m_c := dealWithMultiSuppliersText(con); m_b {
|
|
|
|
+ con = m_c
|
|
|
|
+ }
|
|
|
|
|
|
//工程业绩描述影响抽取
|
|
//工程业绩描述影响抽取
|
|
con = formattext20.ReplaceAllString(con, "\n")
|
|
con = formattext20.ReplaceAllString(con, "\n")
|