规则法-意图识别
2016-08-16 14:48:36 0 举报
AI智能生成
rules
作者其他创作
大纲/内容
Server
init
load tag file
load variable file
load pattern file
do_process
hit tags
query:通联2016年年报
hit tags: company, year, annual_report
hit tags: company, year, annual_report
match variables
match variables:
company, year, annual_report
company, year, annual_report
match patterns
match patterns:
70001, 70002, 70003
70001, 70002, 70003
select patterns
score = sum(variable_weight * length ) * pattern weight
max_score: 70003
max_score: 70003
output
"report":
{
"company":"通联股份",
"category":"财务披露",
"subcategory":"季报",
"season":"三"
},
"news":
{
...
}
{
"company":"通联股份",
"category":"财务披露",
"subcategory":"季报",
"season":"三"
},
"news":
{
...
}
Data
tag.define
annual_report 1001
company 1002
year 1003
company 1002
year 1003
variable.define
$[annual_report] annual_report 100
$[company] company 120
$[company] company 120
pattern.define
GID:70001
PAT:$[company] 50
IF:
true:
THEN:
$[entity] = $[company]
END
GID:70002
PAT:($[company]|)$[*]$[annul_report] 60
IF:
true
THEN:
$[entity] = $[company]
$[category1] = "财务披露"
$[category2] = "年报"
END
GID:70003
PAT:($[company]|)$[year]$[annul_report] 80
IF:
true
THEN:
$[entity] = $[company]
$[category1] = "财务披露"
$[category2] = "年报"
END
PAT:$[company] 50
IF:
true:
THEN:
$[entity] = $[company]
END
GID:70002
PAT:($[company]|)$[*]$[annul_report] 60
IF:
true
THEN:
$[entity] = $[company]
$[category1] = "财务披露"
$[category2] = "年报"
END
GID:70003
PAT:($[company]|)$[year]$[annul_report] 80
IF:
true
THEN:
$[entity] = $[company]
$[category1] = "财务披露"
$[category2] = "年报"
END
entry.define
ENT_CON:($[HIT_PTN 100001] or $[HIT_PTN 100002]) and (true or $[HIT_PTN 100003] or $[HIT_PTN 100004] or $[HIT_PTN 100005] or $[HIT_PTN 100006] or $[HIT_PTN 100010] or $[HIT_PTN 100011] or $[HIT_PTN 100012]
PRI:50 or $[HIT_PTN 100013] or $[HIT_PTN 100014] or $[HIT_PTN 100015]
LCR:30
tag.dict
TAG:annual_report
年报
年度报告
年度财报
TAG:company
通联股份
通联
伊利股份
伊利
...
年报
年度报告
年度财报
TAG:company
通联股份
通联
伊利股份
伊利
...
0 条评论
下一页