|
|
@ -42,7 +42,7 @@ public class OcrRuleTestServiceImpl implements IOcrRuleTestService {
|
|
|
|
List<OcrRuleTest> ocrRuleTestList = iOcrRuleTestDao.findAll();
|
|
|
|
List<OcrRuleTest> ocrRuleTestList = iOcrRuleTestDao.findAll();
|
|
|
|
//判断是否符合某个条件的开始条件
|
|
|
|
//判断是否符合某个条件的开始条件
|
|
|
|
for (OcrRuleTest ocrRuleTest : ocrRuleTestList) {
|
|
|
|
for (OcrRuleTest ocrRuleTest : ocrRuleTestList) {
|
|
|
|
String assortName = ocrRuleTest.getAssortId();
|
|
|
|
String assortName = ocrRuleTest.getAssortName();
|
|
|
|
String assortId = ocrRuleTest.getAssortId();
|
|
|
|
String assortId = ocrRuleTest.getAssortId();
|
|
|
|
double score = ocrRuleTest.getMatchRatio();
|
|
|
|
double score = ocrRuleTest.getMatchRatio();
|
|
|
|
if (Func.isEmpty(ocrRuleTest.getKeyWord())){
|
|
|
|
if (Func.isEmpty(ocrRuleTest.getKeyWord())){
|
|
|
@ -74,7 +74,7 @@ public class OcrRuleTestServiceImpl implements IOcrRuleTestService {
|
|
|
|
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++) {
|
|
|
|
keyWord = keyWordList[i];
|
|
|
|
keyWord = keyWordList[j];
|
|
|
|
if (ocrText.contains(keyWord)) {
|
|
|
|
if (ocrText.contains(keyWord)) {
|
|
|
|
rate = keyWord.length() / (double) ocrText.length() * 100;
|
|
|
|
rate = keyWord.length() / (double) ocrText.length() * 100;
|
|
|
|
//判断是否命中
|
|
|
|
//判断是否命中
|
|
|
|