|
@@ -386,8 +386,8 @@ func (e *ExtractTask) ExtractDetail(j *ju.Job) {
|
|
|
if vc.Field == "projectname" {
|
|
|
//if len(j.Result[vc.Field]) < 1 {//如果抽取有结果,不走标题。待验证,暂时标题加入选举逻辑
|
|
|
items := make([]*ju.ScoreItem, 1)
|
|
|
- items[0] = &ju.ScoreItem{Des: "项目名称未能抽取到,标题来凑初始化", ExtFrom: "title", Value: j.Title, Score: 4}
|
|
|
- field := &ju.ExtField{Field: vc.Field, Code: "title", RuleText: "title", Type: "title", MatchType: "title", ExtFrom: vc.ExtFrom, SourceValue: j.Title, Value: j.Title, Score: 4, ScoreItem: items}
|
|
|
+ items[0] = &ju.ScoreItem{Des: "项目名称未能抽取到,标题来凑初始化", ExtFrom: "title", Value: j.Title, Score: TitleScore}
|
|
|
+ field := &ju.ExtField{Field: vc.Field, Code: "title", RuleText: "title", Type: "title", MatchType: "title", ExtFrom: vc.ExtFrom, SourceValue: j.Title, Value: j.Title, Score: TitleScore, ScoreItem: items}
|
|
|
if tmp["blocktag"] != nil {
|
|
|
field.BlockTag = tmp["blocktag"].(map[string]bool)
|
|
|
}
|
|
@@ -623,14 +623,14 @@ func ExtRegCore(extfrom string, doc map[string]interface{}, j *ju.Job, in *RegLu
|
|
|
for _, tmp := range tmps {
|
|
|
field := &ju.ExtField{Field: k, Code: qu.ObjToString(tmp["code"]), RuleText: qu.ObjToString(tmp["ruletext"]), Type: qu.ObjToString(tmp["type"]), MatchType: qu.ObjToString(tmp["matchtype"]), ExtFrom: extfrom, SourceValue: tmp["sourcevalue"], Value: tmp["value"]}
|
|
|
if extfrom == "title" {
|
|
|
- field.Score = 4
|
|
|
+ field.Score = TitleScore
|
|
|
}
|
|
|
if tmp["blocktag"] != nil {
|
|
|
field.BlockTag = tmp["blocktag"].(map[string]bool)
|
|
|
}
|
|
|
item := &ju.ScoreItem{Des: "初始化", Code: qu.ObjToString(tmp["code"]), RuleText: qu.ObjToString(tmp["ruletext"]), Type: qu.ObjToString(tmp["type"]), MatchType: qu.ObjToString(tmp["matchtype"]), ExtFrom: extfrom, Value: tmp["value"]}
|
|
|
if extfrom == "title" {
|
|
|
- item.Score = 4
|
|
|
+ item.Score = TitleScore
|
|
|
}
|
|
|
if tmp["scoreitem"] == nil {
|
|
|
scoreItems := make([]*ju.ScoreItem, 0)
|