ソースを参照

Merge branch 'dev3.4' of http://192.168.3.207:10080/qmx/jy-data-extract into dev3.4

maxiaoshan 5 年 前
コミット
e65c154ce6
3 ファイル変更6 行追加4 行削除
  1. 2 2
      src/jy/extract/extract.go
  2. 3 1
      src/jy/extract/score_jsondata.go
  3. 1 1
      src/res/fieldscore.json

+ 2 - 2
src/jy/extract/extract.go

@@ -2095,11 +2095,11 @@ func funcAnalysis(j *ju.Job, e *ExtractTask) (*map[string]interface{}, map[strin
 		ju.Sort(val)
 	}
 	if !(len(j.Result) <= 0 || j.Jsondata == nil || len(*j.Jsondata) <= 0) {
+		//jsondata清理
+		clearJd(j.Jsondata, e)
 		marshalbt, _ := json.Marshal(j.Jsondata)
 		tmpjddata := make(map[string]interface{})
 		json.Unmarshal(marshalbt, &tmpjddata)
-		//jsondata清理
-		clearJd(j.Jsondata, e)
 		for _, jdkey := range ju.JsonData {
 			if (*j.Jsondata)[jdkey] != nil && (*j.Jsondata)[jdkey] != "" && len(j.Result[jdkey]) >= 5 {
 				for tmpk, tmpv := range j.Result[jdkey][:5] {

+ 3 - 1
src/jy/extract/score_jsondata.go

@@ -15,7 +15,7 @@ import (
 var htmlclrear = regexp.MustCompile("</?[^>]+>")
 
 //清理括号结尾
-var endOfParenthesesClrear = regexp.MustCompile(`[\(\[(【\{]+[\\u4e00-\\u9fa5\s]*[\))\]】\}]+$`)
+var endOfParenthesesClrear = regexp.MustCompile(`[\\(\\[(【\\{]+[\\u4e00-\\u9fa5\s]*[\\))\\]】\\}]+$`)
 
 //清理标点符合结尾
 var endOfPunctuationClrear = regexp.MustCompile("[,,.。??;;]+$")
@@ -58,6 +58,8 @@ func clearJd(jd *map[string]interface{}, e *ExtractTask) {
 			} else {
 				(*jd)[k] = vstring
 			}
+		}else if k == "Detail"{
+			delete(*jd, k)
 		}
 	}
 }

+ 1 - 1
src/res/fieldscore.json

@@ -182,7 +182,7 @@
             },
             {
                 "describe": "包含负分不再展示",
-                "regstr": "(详见|提出|面向|施工)",
+                "regstr": "(详见|提出|面向|施工|获得|认定)",
                 "score": -50
             },
             {