|
|
@ -88,6 +88,9 @@ public class OcrRuleServiceImpl implements IOcrRuleService {
|
|
|
|
List<OcrRule> ocrRules = iOcrRuleDao.findBy("version",version);
|
|
|
|
List<OcrRule> ocrRules = iOcrRuleDao.findBy("version",version);
|
|
|
|
//判断是否符合某个条件的开始条件
|
|
|
|
//判断是否符合某个条件的开始条件
|
|
|
|
for (OcrRule ocrRule : ocrRules) {
|
|
|
|
for (OcrRule ocrRule : ocrRules) {
|
|
|
|
|
|
|
|
if (Func.isEmpty(ocrRule.getKeyWord())){
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
String assortId = ocrRule.getAssortId();
|
|
|
|
String assortId = ocrRule.getAssortId();
|
|
|
|
double score = ocrRule.getMatchRatio();
|
|
|
|
double score = ocrRule.getMatchRatio();
|
|
|
|
String[] keyWordList = ocrRule.getKeyWord().split("#");
|
|
|
|
String[] keyWordList = ocrRule.getKeyWord().split("#");
|
|
|
@ -109,6 +112,9 @@ public class OcrRuleServiceImpl implements IOcrRuleService {
|
|
|
|
assortId = ruleJson.getAssortId();
|
|
|
|
assortId = ruleJson.getAssortId();
|
|
|
|
List<OcrRuleSecondJson> ocrRuleSecondJsonList = ruleJson.getKeyWordList();
|
|
|
|
List<OcrRuleSecondJson> ocrRuleSecondJsonList = ruleJson.getKeyWordList();
|
|
|
|
for (OcrRuleSecondJson ocrRuleSecondJson:ocrRuleSecondJsonList) {
|
|
|
|
for (OcrRuleSecondJson ocrRuleSecondJson:ocrRuleSecondJsonList) {
|
|
|
|
|
|
|
|
if (Func.isEmpty(ocrRuleSecondJson.getKeyWord())){
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
keyWordList = ocrRuleSecondJson.getKeyWord().split("#");
|
|
|
|
keyWordList = ocrRuleSecondJson.getKeyWord().split("#");
|
|
|
|
score = ocrRuleSecondJson.getMatchRatio();
|
|
|
|
score = ocrRuleSecondJson.getMatchRatio();
|
|
|
|
for (int j = 0; j < keyWordList.length; j++) {
|
|
|
|
for (int j = 0; j < keyWordList.length; j++) {
|
|
|
|