Преглед на файлове

中标单位联系人、电话优化

maxiaoshan преди 5 години
родител
ревизия
a323e85ebe
променени са 8 файла, в които са добавени 123 реда и са изтрити 50 реда
  1. 1 1
      src/config.json
  2. 45 4
      src/jy/extract/extract.go
  3. 8 8
      src/jy/pretreated/analykv.go
  4. 26 17
      src/jy/pretreated/analytable.go
  5. 26 12
      src/jy/pretreated/colonkv.go
  6. 4 3
      src/main_blocktest.go
  7. 2 2
      src/main_test.go
  8. 11 3
      src/res/fieldscore.json

+ 1 - 1
src/config.json

@@ -1,6 +1,6 @@
 {
     "port": "9090",
-    "mgodb": "192.168.3.207:27082",
+    "mgodb": "192.168.3.207:27092",
     "dbsize": 10,
     "dbname": "extract_kf",
     "redis": "buyer=192.168.3.207:1679,winner=192.168.3.207:1679,agency=192.168.3.207:1679",

+ 45 - 4
src/jy/extract/extract.go

@@ -283,7 +283,7 @@ func (e *ExtractTask) PreInfo(doc map[string]interface{}) (j, jf *ju.Job, isSite
 	}
 	toMap := qu.ObjToMap(doc["jsondata"])
 	//log.Debug("toMap", toMap)
-	if toMap != nil {
+	if toMap != nil && len(*toMap) > 0 {
 		if (*toMap)["extweight"] == nil {
 			(*toMap)["extweight"] = ju.Config["jsondata_extweight"]
 		}
@@ -433,6 +433,17 @@ func (e *ExtractTask) ExtractProcess(j, jf *ju.Job, isSite bool) {
 		}
 	}
 
+	//	for _, b := range j.Block {
+	//		for _, vv := range b.ColonKV.Kvs {
+	//			qu.Debug(vv.Key, vv.Value)
+	//		}
+	//		for _, vv := range b.SpaceKV.Kvs {
+	//			qu.Debug(vv.Key, vv.Value)
+	//		}
+	//		//		for _, vv := range b.TableKV.Kvs {
+	//		//			qu.Debug(vv.Key, vv.Value)
+	//		//		}
+	//	}
 	//分析抽取结果并保存
 	AnalysisSaveResult(j, jf, e)
 	<-e.TaskInfo.ProcessPool
@@ -496,7 +507,6 @@ func (e *ExtractTask) ExtractDetail(j *ju.Job, isSite bool, codeSite string) {
 				//抽取-规则
 				ExtRuleCore(tmp, e, vc, j, isSite)
 				// log.Debug("抽取-规则", tmp)
-
 				//抽取-后置规则
 				for _, v := range vc.RuleBacks {
 					ExtRegBack(j, v, e.TaskInfo)
@@ -544,8 +554,10 @@ func (e *ExtractTask) ExtractDetail(j *ju.Job, isSite bool, codeSite string) {
 			}
 		}
 		//函数清理
+
 		for key, val := range j.Result {
 			for _, v := range val {
+				//qu.Debug(key, v.Value)
 				lockclear.Lock()
 				var cfn = []string{}
 				if isSite {
@@ -725,6 +737,9 @@ func ExtRuleCore(doc map[string]interface{}, e *ExtractTask, vc *RuleCore, j *ju
 					for k, v := range []*ju.JobKv{bp.ColonKV, bp.SpaceKV, bp.TableKV} {
 						if k == 0 {
 							tp = "colon"
+							//							for _, vv := range v.Kvs {
+							//								qu.Debug(vv.Key, vv.Value)
+							//							}
 						} else if k == 1 {
 							tp = "space"
 						} else if k == 2 {
@@ -1069,15 +1084,32 @@ func getKvByLuaFields(vc *RuleCore, j *ju.Job, et *ExtractTask) (map[string][]ma
 }
 
 func extractFromKv(field, fieldname string, blocks []*ju.Block, vc *RuleCore, kvmap map[string][]map[string]interface{}) {
+	//qu.Debug("fieldname+++", fieldname)
 	for _, bl := range blocks {
 		tp := ""
 		for k, v := range []*ju.JobKv{bl.ColonKV, bl.SpaceKV, bl.TableKV} {
 			if k == 0 {
 				tp = "colon"
+				//				for _, vv := range v.Kvs {
+				//					qu.Debug("colon-kvs:", vv.Key, vv.Value)
+				//				}
+				//				for kkk, vv := range v.KvTags {
+				//					for _, vvv := range vv {
+				//						qu.Debug("colon-tags", kkk, vvv.Key, vvv.Value)
+				//					}
+				//				}
 			} else if k == 1 {
 				tp = "space"
 			} else if k == 2 {
 				tp = "table"
+				//				for _, vv := range v.Kvs {
+				//					qu.Debug("table-kvs:", vv.Key, vv.Value)
+				//				}
+				//				for kkk, vv := range v.KvTags {
+				//					for _, vvv := range vv {
+				//						qu.Debug("table-tags", kkk, vvv.Key, vvv.Value)
+				//					}
+				//				}
 			}
 			if v == nil || v.KvTags == nil {
 				continue
@@ -1097,7 +1129,9 @@ func extractFromKv(field, fieldname string, blocks []*ju.Block, vc *RuleCore, kv
 						"blocktag":    bl.Classify,
 						"weight":      vv.Weight,
 					})
-					break //暂定取第一个
+					if field != "winnertel" && field != "winnerperson" {
+						break //暂定取第一个
+					}
 				}
 			}
 		}
@@ -1674,6 +1708,13 @@ func AnalysisSaveResult(j, jf *ju.Job, e *ExtractTask) {
 				e.RWMutex.Unlock()
 			}
 		} else { //测试结果
+			//			fmt.Println("=============抽取结果================")
+			//			for k, v := range tmp {
+			//				qu.Debug(k, "---", v)
+			//			}
+			//			for field, _ := range e.Fields {
+			//				qu.Debug(field, "---", tmp[field])
+			//			}
 			delete(tmp, "_id")
 			if len(j.BlockPackage) > 0 { //分包详情
 				bs, _ := json.Marshal(j.BlockPackage)
@@ -1788,7 +1829,7 @@ func funcAnalysis(j *ju.Job, e *ExtractTask) (*map[string]interface{}, map[strin
 	doc := j.Data
 	result := j.Result
 	_id := qu.BsonIdToSId((*doc)["_id"])
-	result = ScoreFields(j, e.Tag)
+	result = ScoreFields(j, e.Tag) //正负面词打分
 
 	//结果排序
 	for _, val := range result {

+ 8 - 8
src/jy/pretreated/analykv.go

@@ -23,7 +23,7 @@ var matchkh = map[string]string{
 	"〖": "〗",
 }
 
-func GetKvFromtxt(con, tag string, from int,isSite bool,codeSite string) ([]*u.Kv, map[string][]*u.Tag) {
+func GetKvFromtxt(con, tag string, from int, isSite bool, codeSite string) ([]*u.Kv, map[string][]*u.Tag) {
 	res := FindKv(TextAfterRemoveTable(con), tag, from)
 	kvs := []*u.Kv{}
 	for _, k := range res.Keys {
@@ -35,7 +35,7 @@ func GetKvFromtxt(con, tag string, from int,isSite bool,codeSite string) ([]*u.K
 			})
 		}
 	}
-	kvTags := GetKvTags(kvs, tag, nil,isSite,codeSite)
+	kvTags := GetKvTags(kvs, tag, nil, isSite, codeSite)
 	return kvs, kvTags
 }
 
@@ -349,7 +349,7 @@ func keydetail(k, v string, m *SortMap, tag string, pos int, strs [][]string, ma
 					bf = true
 					break
 				}
-				if !filter_zbdw_ky.MatchString(k) && filter_zbdw_ky.MatchString(m.Keys[i]) && !IsContactKvHandle(k, matchMap["中标单位"]) {
+				if from == 1 && !ContactType["中标单位"].MatchString(k) && ContactType["中标单位"].MatchString(m.Keys[i]) && !IsContactKvHandle(k, matchMap["中标单位"]) {
 					matchMap["中标单位"][k] = true
 					k = "中标单位" + k
 					bf = true
@@ -409,15 +409,15 @@ func keydetail(k, v string, m *SortMap, tag string, pos int, strs [][]string, ma
 		//u.Debug(k, v)
 		if m.Map[k] == nil {
 			m.AddKey(k, v)
-		}else {
+		} else {
 			vals := []string{}
-			if vvv ,ok := m.Map[k].([]string);ok{
+			if vvv, ok := m.Map[k].([]string); ok {
 				vals = append(vals, vvv...)
-			}else {
-				vals = append(vals,v)
+			} else {
+				vals = append(vals, v)
 			}
 			vals = append(vals, v)
-			m.AddKey(k,vals)
+			m.AddKey(k, vals)
 		}
 	}
 }

+ 26 - 17
src/jy/pretreated/analytable.go

@@ -97,10 +97,11 @@ var (
 	ContactInfoVagueReg = regexp.MustCompile("邮政编码|邮编|(征求意见|报名审核购买)?((联系人?(及|和)?|办公|单位)?(((联系)?(电话|方式)([//]传真|及手机)?|手机)(号码)?|邮箱(地址)?|(详细)?(地(址|点)))|(联系|收料)(人(姓名)?|方式)|传真|电子邮件|(主要负责|项目(负责|联系)|经办)人)|采购方代表")
 	ContactInfoMustReg  = regexp.MustCompile("^(" + ContactInfoVagueReg.String() + ")$")
 	ContactType         = map[string]*regexp.Regexp{
-		"采购单位": regexp.MustCompile("(采购(项目.{2}|服务)?|比选|询价|招标(服务)?|甲|建设|委托|发包|业主|使用|谈判|本招标项目经办|征求意见联系|项目实施)(人|单位|部门|机构|机关|(执行)?方$)|(项目|建(库|设))单位|招标人信息|采购中心地址|业主|收料人|采购部"),
+		"采购单位": regexp.MustCompile("(采购(项目.{2}|服务)?|比选|询价|招标(服务)?|甲|建设|委托|发包|业主|使用|谈判|本招标项目经办|征求意见联系|项目实施)(人|单位|部门|机构|机关|(执行)?方$)|(项目|建(库|设))单位|招标人信息|采购中心(地址)?|业主|收料人|采购部"),
 		"代理机构": regexp.MustCompile("(代理|受托|集中采购).{0,2}(人|方|单位|公司|机构)|招标机构|采购代理"),
-		"中标单位": regexp.MustCompile("拟?(中标|成交|中选|供(货|应))[^候选]{0,2}(人|方|单位|公司|(服务|供应)?商|企业)"),
+		"中标单位": regexp.MustCompile("^(((定)?|预|最终|唯一)?(中标|成交|中选|供(货|应)))[^候选]{0,2}(人|方|单位|公司|(服务|供应)?商|企业)"),
 	}
+	OtherContactType            = regexp.MustCompile("(投诉|质疑|监督|交易中心|公示期(限)?).{0,4}(联系方式)?")
 	ContactBuyerPersonFilterReg = regexp.MustCompile("(管理局)$")
 	MultipleValueSplitReg       = regexp.MustCompile("[,,、\\s\u3000\u2003\u00a0]")
 	BuyerContacts               = []string{"采购单位联系人", "采购单位联系电话", "采购单位联系地址"}
@@ -2609,24 +2610,28 @@ L:
 				tdAscFind = tn.hasIndexMap(thisTdKvs, &indexMap, tdAscFind)
 			}
 			//qutil.Debug(len(thisTdKvs), len(tr.TDs))
-			if len(thisTdKvs) >= 2 && len(tr.TDs) == 1 { //td中包含多个kv值 5d6b2aa2a5cb26b9b73e79d2
-				tmpIndexMap := map[int]string{}
-				start := 0
-				for _, td_kv := range thisTdKvs {
-					//qutil.Debug(td_kv.Key)
-					for _, k := range HasOrderContactType(td_kv.Key) {
-						tmpIndexMap[start] = k
-						start++
-					}
-				}
-				indexMap = tmpIndexMap
-			}
+			//			if len(thisTdKvs) >= 2 && len(tr.TDs) == 1 { //td中包含多个kv值 5d6b2aa2a5cb26b9b73e79d2
+			//				tmpIndexMap := map[int]string{}
+			//				start := 0
+			//				for _, td_kv := range thisTdKvs {
+			//					qutil.Debug(td_kv.Key)
+			//					for _, k := range HasOrderContactType(td_kv.Key) {
+			//						tmpIndexMap[start] = k
+			//						start++
+			//					}
+			//				}
+			//				indexMap = tmpIndexMap
+			//			}
 			prevKey := ""
 			oldIndexMapLength := len(indexMap)
 			thidTdIndex := td_index
 			//notmatchCount := 0
 			kvTitle := ""
-			//qutil.Debug("indexMap++++++++++++++++++", indexMap, oldIndexMapLength)
+			//qutil.Debug("indexMap++++++++++++++++++", indexMap, "len(thisTdKvs)", len(thisTdKvs), oldIndexMapLength)
+			if len(thisTdKvs) >= 2 { //td中有多个kv重置indexMap
+				indexMap = map[int]string{}
+				allAscFind = true
+			}
 			for _, td_kv := range thisTdKvs {
 				iscontinue := false
 				td_v := td_kv.Value
@@ -2641,16 +2646,19 @@ L:
 					//都为正序查询处理
 					matchCount, weightMap, matchMap, thisTrHasMatch, indexMap, iscontinue, reCreate, thidTdIndex = tn.asdFind(td_k, matchCount, weightMap, matchMap, td, thisTrHasMatch, td_kv, indexMap, iscontinue, reCreate, thidTdIndex, isSite, codeSite)
 				}
+				//qutil.Debug("indexMap++++++", indexMap, len(indexMap), "iscontinue+++", iscontinue)
 				if iscontinue {
 					continue
 				}
 				//不在同一块中
+				//qutil.Debug(td_kv.Title, kvTitle, !ContactInfoMustReg.MatchString(td_kv.Key))
 				if td_kv.Title != "" && kvTitle != td_kv.Title && len(indexMap) > 0 && !ContactInfoMustReg.MatchString(td_kv.Key) {
 					thidTdIndex = 0
 					matchMap = map[string]map[string]bool{}
 					indexMap = map[int]string{}
 				}
 				kvTitle = td_kv.Title
+				//qutil.Debug(td_k_length, td_k_length, len(indexMap))
 				if td_k_length < 2 || td_k_length > 10 {
 					continue
 				}
@@ -2689,6 +2697,7 @@ L:
 					//myContactType
 
 					myContactType := indexMap[index]
+					//qutil.Debug(indexMap, index, myContactType)
 					if myContactType == "" && len(indexMap) == 1 {
 						_, onlyContactType := u.FirstKeyValueInMap(indexMap)
 						myContactType, _ = onlyContactType.(string)
@@ -2781,8 +2790,8 @@ func modle(thisTdKvs []*u.Kv, td *TD, myContactType, td_k, td_v string, contactT
 
 //都为正序查询
 func (tn *Table) asdFind(td_k string, matchCount int, weightMap map[string]map[string]interface{}, matchMap map[string]map[string]bool, td *TD, thisTrHasMatch bool, td_kv *u.Kv, indexMap map[int]string, iscontinue bool, reCreate bool, thidTdIndex int, isSite bool, codeSite string) (int, map[string]map[string]interface{}, map[string]map[string]bool, bool, map[int]string, bool, bool, int) {
-	for _, k := range HasOrderContactType(td_k) { //采购单位,代理机构
-		if !ContactType[k].MatchString(td_k) { //没有匹配到采购单位,代理机构
+	for _, k := range HasOrderContactType(td_k) { //采购单位,代理机构,中标单位
+		if !ContactType[k].MatchString(td_k) { //没有匹配到采购单位,代理机构,中标单位
 			continue
 		}
 		matchCount++

+ 26 - 12
src/jy/pretreated/colonkv.go

@@ -296,6 +296,7 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 	//采购人在联系人、电话后面的处理
 	//qutil.Debug("indexMap---", indexMap)
 	//qutil.Debug("ascFind---", ascFind, "ascFindFlag---", ascFindFlag, "isCanAddToIndex---", isCanAddToIndexMap)
+	//qutil.Debug("+++++++++++++++++++++++++++++++++++++++++", title)
 	for _, kv := range *kvs {
 		isCanAddToIndexMap := false
 		k := FilterContactKey(kv.Key) //过滤key
@@ -368,25 +369,32 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 	//qutil.Debug("=========================================================")
 	startIndex := 0
 	prevKey := ""
-	index, tmpindex, notmatchCount, allMatchCount := 0, 0, 0, 0
+	index, tmpindex, notmatchCount, allMatchCount, keyNotMatchContactInfoCount := 0, 0, 0, 0, 0
 	weightMap := map[string]map[string]interface{}{}     //权重
 	mapIndexInKvs := map[string]map[string]interface{}{} //map在数组总的索引位置
 	kvsTemp := make([]*Kv, len(*kvs))
 	copy(kvsTemp, *kvs)
 	//again := 0
 	ishad := false
-	afterWinner := false
 	for kv_index, kv := range *kvs {
 		isBreak := true
 		v := strings.TrimSpace(kv.Value)
 		//根据采购单位分析
 		isContinue := false
 		k := FilterContactKey(kv.Key)
+		//qutil.Debug(kv.Key, k)
 		k_length := len([]rune(k))
 		//3.4新增winnerperson和winnertel抽取
-		if indexMap[1] == "中标单位" && ContactInfoMustReg.MatchString(k) { //中标后是否出现电话、联系人、地址等信息
-			//qutil.Debug("kkkkkk:", k, indexMap)
-			afterWinner = true
+		if len(indexMap) == 1 && indexMap[1] == "中标单位" {
+			if !ContactInfoVagueReg.MatchString(k) { // 5c7f61dea5cb26b9b7d7bbee
+				keyNotMatchContactInfoCount++
+			}
+			//qutil.Debug(k, "==========keyNotMatchContactInfoCount+++", keyNotMatchContactInfoCount)
+			if keyNotMatchContactInfoCount >= 1 {
+				indexMap = map[int]string{}
+				startIndex = 0
+				keyNotMatchContactInfoCount = 0
+			}
 		}
 		//qutil.Debug(kv.Key, "++++++++++", kv.Value, buyers != nil, ascFind, isContinue)
 		if buyers != nil {
@@ -455,6 +463,7 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 				}
 				isAddToMatchMap := false
 				addToMatchMapKey := ""
+				//qutil.Debug("ContactInfoVagueReg.MatchString(k)+++", ContactInfoVagueReg.MatchString(k))
 				if ContactInfoVagueReg.MatchString(k) { //判断是不是电话、地址。。。
 					isAddToMatchMap = true
 					if matchMap[ct_k] == nil {
@@ -488,7 +497,7 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 						}
 					}
 					addToMatchMapKey = k
-					if ct_k == "采购单位" {
+					if ct_k == "采购单位" { // || ct_k == "中标单位"
 						k = ContactType[ct_k].FindString(k)
 					}
 				}
@@ -515,6 +524,7 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 					continue
 				}
 				isBreak = false
+				//qutil.Debug("index+++", index, "notmatchCount+++", notmatchCount)
 				if index != 0 || notmatchCount != 0 {
 					startIndex = 0
 					indexMap = map[int]string{}
@@ -528,12 +538,6 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 				isContinue = true
 			}
 		}
-		//qutil.Debug(len(indexMap), !afterWinner)
-		if len(indexMap) == 2 && !afterWinner { //处理同时出现winner、buyer、agency 5d6b2aa2a5cb26b9b73e79d3
-			//qutil.Debug("+++++++++++++++++++")
-			delete(indexMap, 1)
-			indexMap = map[int]string{1: indexMap[2]}
-		}
 		//qutil.Debug("isContinue+++", isContinue, indexMap)
 		if isContinue {
 			continue
@@ -552,16 +556,25 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 			isBreak = false
 			continue
 		}
+		//qutil.Debug("ContactInfoMustReg.MatchString(k)+++", !ContactInfoMustReg.MatchString(k))
 		if !ContactInfoMustReg.MatchString(k) { //判断是否是电话、邮箱、地址等信息
+			if OtherContactType.MatchString(k) { //匹配到投诉和监督 5bc9683ea5cb26b9b72b2302 5c35f3e8a5cb26b9b72dcdbd
+				startIndex = 0
+				//notmatchCount = 0
+				indexMap = map[int]string{}
+				continue
+			}
 			if mustMatchFirst {
 				mustMatchFirst = false
 				continue
 			}
+			//qutil.Debug("buyers == nil+++", buyers == nil, "len(totalIndexMap)+++", len(totalIndexMap))
 			if buyers == nil && len(totalIndexMap) != 0 {
 				isBreak = false
 			}
 			//允许有这么多个匹配不上的key
 			notmatchCount++
+			//qutil.Debug("notmatchCount+++", notmatchCount, "len(indexMap)*2+++", len(indexMap)*2, "contactFormat+++", contactFormat == nil, "ascFind+++", ascFind)
 			if notmatchCount < len(indexMap)*2 {
 				isBreak = false
 			} else if contactFormat == nil && ascFind {
@@ -655,6 +668,7 @@ func FormatContactKv(kvs *[]*Kv, title string, buyers []string, contactFormat *C
 		kvTemp.Value = v
 		//qutil.Debug(kvTemp.Key, "----------------", kvTemp.Value)
 		(*kvs)[kv_index] = &kvTemp
+		//qutil.Debug("ascFind++", ascFind, "isBreak++", isBreak, "len(indexMap)++", len(indexMap))
 		if ascFind && isBreak && len(indexMap) > 0 {
 			break
 		}

+ 4 - 3
src/main_blocktest.go

@@ -50,8 +50,8 @@ func all() {
 	time.Sleep(time.Hour)
 }
 func one() {
-	m := mongodbutil.MgoFactory(3, 3, 120, "192.168.3.207:27081", "qfw")
-	d, _ := m.FindById("bidding", "5d6b2aa2a5cb26b9b73e79d2", extract.Fields)
+	m := mongodbutil.MgoFactory(3, 3, 120, "192.168.3.207:27092", "extract_kf")
+	d, _ := m.FindById("bidding_winner", "5da1489ca5cb26b9b7bd6d8e", extract.Fields)
 	com(*d)
 }
 func com(doc map[string]interface{}) {
@@ -118,7 +118,6 @@ func com(doc map[string]interface{}) {
 	e.TaskInfo.ProcessPool <- true
 	pretreated.AnalyStart(j, false, "")
 	e.ExtractProcess(j, nil, false)
-
 	log.Println("=============块信息================")
 	for _, v := range j.Block {
 		log.Println("----", v.Title, v.Titles, "----")
@@ -147,6 +146,7 @@ func com(doc map[string]interface{}) {
 		//log.Println("Tag", v.Tag)
 	}
 	log.Println("=============抽取结果================")
+
 	log.Println(e.ResultArr)
 	set := (e.ResultArr[0][1]["$set"]).(map[string]interface{})
 	for k, v := range set {
@@ -222,6 +222,7 @@ func com(doc map[string]interface{}) {
 		}
 	}
 }
+
 func GetDetail(doc map[string]interface{}) (detail string) {
 	detail = ""
 	d1, _ := doc["detail"].(string)

+ 2 - 2
src/main_test.go

@@ -26,9 +26,9 @@ func Test_han(t *testing.T) {
 	os.Exit(0)
 }
 func Test_task(t *testing.T) {
-	Mgo = MgoFactory(1, 3, 120, "192.168.3.207:27082", "extract_kf")
+	Mgo = MgoFactory(1, 3, 120, "192.168.3.207:27092", "extract_kf")
 	//extract.StartExtractTaskId("5b8f804025e29a290415aee1")5c528686698414055c47b115
-	extract.StartExtractTestTask("5cdd3025698414032c8322b1", "5d6b2aa2a5cb26b9b73e79d3", "1", "mxs_v1", "mxs_v1")
+	extract.StartExtractTestTask("5cdd3025698414032c8322b1", "5da43587a5cb26b9b729a7ff", "1", "result_mxs", "result_mxs")
 	//extract.StartExtractTestTask("5c3d75c96984142998eb00e1", "5c2a3d28a5cb26b9b76144dd", "100", "mxs_v3", "mxs_v3")
 	time.Sleep(5 * time.Second)
 }

+ 11 - 3
src/res/fieldscore.json

@@ -352,7 +352,7 @@
         "positivewords": [
             {
                 "describe": "以*结尾",
-                "regstr": ".{2,100}(工|老师|经理|女士|先生|主任|科长)$",
+                "regstr": ".{2,3}(工|老师|经理|女士|先生|主任|科长)$",
                 "score": 3
             }
         ],
@@ -374,14 +374,22 @@
                 "range": [
                     0,
                     1,
-                    -5
+                    -10
+                ]
+            },
+			{
+                "describe": "[gt,∞,score]",
+                "range": [
+                    3,
+                    -1,
+                    -10
                 ]
             },
 			{
                 "describe": "[gt,lte,score]",
                 "range": [
                     1,
-                    4,
+                    3,
                     10
                 ]
             }