|
@@ -107,7 +107,12 @@ var (
|
|
NullTdReg = regexp.MustCompile("(首选|第[一二三四五1-5])(中标|成交)?(名(称)?|(候选|排序)?(人|单位|供应商))")
|
|
NullTdReg = regexp.MustCompile("(首选|第[一二三四五1-5])(中标|成交)?(名(称)?|(候选|排序)?(人|单位|供应商))")
|
|
NullTxtBid = "成交供应商排名"
|
|
NullTxtBid = "成交供应商排名"
|
|
projectnameReg = regexp.MustCompile("((公开)?招标)*[((第]*[一二三四五六七八九十a-zA-Z0-9]+(标段|包|标|段)[))]*$")
|
|
projectnameReg = regexp.MustCompile("((公开)?招标)*[((第]*[一二三四五六七八九十a-zA-Z0-9]+(标段|包|标|段)[))]*$")
|
|
- MhSpilt = regexp.MustCompile("[::]")
|
|
|
|
|
|
+ MhSpilt = regexp.MustCompile("[::]") //降低冒号权重
|
|
|
|
+ //指定字段且时间格式
|
|
|
|
+ UnTimeSpiltKey = regexp.MustCompile("(招标文件获取截止时间|招标文件获取开始时间|报名截止时间|报名开始时间|投标文件递交开始时间|开工日期|竣工日期)")
|
|
|
|
+ UnTimeSpiltValue = regexp.MustCompile("\\d{1,2}[::]\\d{1,2}")
|
|
|
|
+
|
|
|
|
+
|
|
//识别采购单位联系人、联系电话、代理机构联系人、联系电话 -- 名称有异常
|
|
//识别采购单位联系人、联系电话、代理机构联系人、联系电话 -- 名称有异常
|
|
ContactInfoVagueReg = regexp.MustCompile("邮政编码|邮编|名称|(征求意见|报名审核购买)?((联系人?(及|和)?|办公|单位)?(((联系)?(电话|方式|号码)([//及]传真|及手机)?|手机)(号码)?|邮箱(地址)?|(详细)?(地(址|点)))|(联系|收料)(人(姓名)?|方式)|传真|电子邮件|(主要负责|项目(负责|联系)|经办)人)|采购方代表")
|
|
ContactInfoVagueReg = regexp.MustCompile("邮政编码|邮编|名称|(征求意见|报名审核购买)?((联系人?(及|和)?|办公|单位)?(((联系)?(电话|方式|号码)([//及]传真|及手机)?|手机)(号码)?|邮箱(地址)?|(详细)?(地(址|点)))|(联系|收料)(人(姓名)?|方式)|传真|电子邮件|(主要负责|项目(负责|联系)|经办)人)|采购方代表")
|
|
ContactInfoMustReg = regexp.MustCompile("^(" + ContactInfoVagueReg.String() + ")$")
|
|
ContactInfoMustReg = regexp.MustCompile("^(" + ContactInfoVagueReg.String() + ")$")
|
|
@@ -191,8 +196,8 @@ func CommonDataAnaly(k, tabletag, tabledesc string, v interface{}, isSite bool,
|
|
//当取到标准化值时,放入数组
|
|
//当取到标准化值时,放入数组
|
|
if len(res) > 0 {
|
|
if len(res) > 0 {
|
|
for _, t1 := range res {
|
|
for _, t1 := range res {
|
|
- //降低冒号值的权重
|
|
|
|
- if MhSpilt.MatchString(v1) {
|
|
|
|
|
|
+ //降低冒号值的权重-不适合日期格式的数据
|
|
|
|
+ if MhSpilt.MatchString(v1) && !(UnTimeSpiltKey.MatchString(t1.Value) && UnTimeSpiltValue.MatchString(v1)){
|
|
t1.Weight -= 50
|
|
t1.Weight -= 50
|
|
}
|
|
}
|
|
if winnerOrderAndBidResult.MatchString(tabletag) && t1.Value == "采购单位联系人" { //处理table中项目负责人
|
|
if winnerOrderAndBidResult.MatchString(tabletag) && t1.Value == "采购单位联系人" { //处理table中项目负责人
|
|
@@ -726,7 +731,8 @@ func (table *Table) MergerToTableresult() {
|
|
bp.Budget = v1.Budget
|
|
bp.Budget = v1.Budget
|
|
bp.IsTrueBudget = v1.IsTrueBudget
|
|
bp.IsTrueBudget = v1.IsTrueBudget
|
|
}
|
|
}
|
|
- bp.Text += bp.Text
|
|
|
|
|
|
+ //fmt.Println(utf8.RuneCountInString(bp.Text))
|
|
|
|
+ //bp.Text += bp.Text
|
|
if len(v1.WinnerOrder) > 0 && len(bp.WinnerOrder) == 0 {
|
|
if len(v1.WinnerOrder) > 0 && len(bp.WinnerOrder) == 0 {
|
|
bp.WinnerOrder = v1.WinnerOrder
|
|
bp.WinnerOrder = v1.WinnerOrder
|
|
}
|
|
}
|
|
@@ -1896,9 +1902,9 @@ func (table *Table) FindTdVal(td *TD, direct, vdirect int) (b bool) {
|
|
if key == "名称" && near.StartCol == 0 && near.Rowspan > 0 {
|
|
if key == "名称" && near.StartCol == 0 && near.Rowspan > 0 {
|
|
new_key := ""
|
|
new_key := ""
|
|
tr := table.TRs[:td.TR.RowPos]
|
|
tr := table.TRs[:td.TR.RowPos]
|
|
- if len(tr)>len(tr)-1 {
|
|
|
|
|
|
+ if len(tr)>len(tr)-1 && len(tr)>0 {
|
|
tds := tr[len(tr)-1].TDs
|
|
tds := tr[len(tr)-1].TDs
|
|
- if len(tds)>td.EndCol {
|
|
|
|
|
|
+ if len(tds)>td.EndCol && tds !=nil {
|
|
td1 := tds[td.EndCol]
|
|
td1 := tds[td.EndCol]
|
|
if zbhxrSecondReg.MatchString(td1.Val) {
|
|
if zbhxrSecondReg.MatchString(td1.Val) {
|
|
new_key = td1.Val
|
|
new_key = td1.Val
|
|
@@ -1924,9 +1930,9 @@ func (table *Table) FindTdVal(td *TD, direct, vdirect int) (b bool) {
|
|
} else if zbhxrReg.MatchString(key) && findCandidate2.MatchString(td.Val) {
|
|
} else if zbhxrReg.MatchString(key) && findCandidate2.MatchString(td.Val) {
|
|
new_key := "中标单位"
|
|
new_key := "中标单位"
|
|
tr_top := table.TRs[:td.TR.RowPos]
|
|
tr_top := table.TRs[:td.TR.RowPos]
|
|
- if len(tr_top)>len(tr_top)-1 { //上临查询
|
|
|
|
|
|
+ if len(tr_top)>len(tr_top)-1 && len(tr_top)>0{ //上临查询
|
|
tds := tr_top[len(tr_top)-1].TDs
|
|
tds := tr_top[len(tr_top)-1].TDs
|
|
- if len(tds)>td.EndCol {
|
|
|
|
|
|
+ if len(tds)>td.EndCol && tds !=nil{
|
|
td1 := tds[td.EndCol]
|
|
td1 := tds[td.EndCol]
|
|
if zbhxrSortNameReg.MatchString(td1.Val) {
|
|
if zbhxrSortNameReg.MatchString(td1.Val) {
|
|
new_key = td1.Val
|
|
new_key = td1.Val
|