|
@@ -474,15 +474,21 @@ public class NeoFacade {
|
|
|
} else if (crfMap != null) {
|
|
|
StandConvertCrfDTO standConvertCrfDTO = crfMap.get(s);
|
|
|
if (standConvertCrfDTO != null) {
|
|
|
- String rateStr = standConvertCrfDTO.getStandard_words().get(0).get("rate");
|
|
|
- BigDecimal rate = new BigDecimal(rateStr);
|
|
|
- int flag = rate.compareTo(new BigDecimal(standConvertRate));
|
|
|
- if (flag < 0) {
|
|
|
- redisMap.put(s, s); // rate 小于阈值
|
|
|
+ List<Map<String,String>> list = standConvertCrfDTO.getStandard_words();
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ redisMap.put(s, s);
|
|
|
typeMap.put(s, s);
|
|
|
} else {
|
|
|
- redisMap.put(s, standConvertCrfDTO.getStandard_words().get(0).get("standard_word"));
|
|
|
- typeMap.put(s, standConvertCrfDTO.getStandard_words().get(0).get("standard_word"));
|
|
|
+ String rateStr = standConvertCrfDTO.getStandard_words().get(0).get("rate");
|
|
|
+ BigDecimal rate = new BigDecimal(rateStr);
|
|
|
+ int flag = rate.compareTo(new BigDecimal(standConvertRate));
|
|
|
+ if (flag < 0) {
|
|
|
+ redisMap.put(s, s); // rate 小于阈值
|
|
|
+ typeMap.put(s, s);
|
|
|
+ } else {
|
|
|
+ redisMap.put(s, standConvertCrfDTO.getStandard_words().get(0).get("standard_word"));
|
|
|
+ typeMap.put(s, standConvertCrfDTO.getStandard_words().get(0).get("standard_word"));
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
redisMap.put(s, s); // 找不到就认为是标准词
|