|
@@ -229,8 +229,8 @@ public class ExtractFeature20250218 {
|
|
|
for (String key : Arrays.asList("c6", "c7")) {
|
|
|
for (String action : Arrays.asList("share", "return")) {
|
|
|
String featureKey = key + "_" + action;
|
|
|
- if (map.containsKey(featureKey)) {
|
|
|
- Map<String, String[]> cfMap = map.get(featureKey);
|
|
|
+ Map<String, String[]> cfMap = map.getOrDefault(featureKey, new HashMap<>());
|
|
|
+ if (cfMap.containsKey(vid)) {
|
|
|
String[] scores = cfMap.get(vid);
|
|
|
featureMap.put(featureKey + "_score", Double.parseDouble(scores[0]));
|
|
|
featureMap.put(featureKey + "_num", Double.parseDouble(scores[1]));
|