|
@@ -32,10 +32,6 @@ public class RankStrategy4RegionMergeModelV562 extends RankStrategy4RegionMergeM
|
|
@ApolloJsonValue("${rank.score.merge.weightv562:}")
|
|
@ApolloJsonValue("${rank.score.merge.weightv562:}")
|
|
private Map<String, Double> mergeWeight;
|
|
private Map<String, Double> mergeWeight;
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private FeatureService featureService;
|
|
private FeatureService featureService;
|
|
|
|
|
|
@@ -241,7 +237,12 @@ public class RankStrategy4RegionMergeModelV562 extends RankStrategy4RegionMergeM
|
|
String tags = c34567Map.getOrDefault(key, "");
|
|
String tags = c34567Map.getOrDefault(key, "");
|
|
if (!tags.isEmpty()) {
|
|
if (!tags.isEmpty()) {
|
|
Future<Pair<String, Double[]>> future = ThreadPoolFactory.defaultPool().submit(() -> {
|
|
Future<Pair<String, Double[]>> future = ThreadPoolFactory.defaultPool().submit(() -> {
|
|
- Double[] doubles = ExtractorUtils.funcC34567ForTags(tags, title);
|
|
|
|
|
|
+ Double[] doubles = null;
|
|
|
|
+ if (param.getAbExpCodes().contains(word2vecExp)) {
|
|
|
|
+ doubles = ExtractorUtils.funcC34567ForTagsNew(tags, title);
|
|
|
|
+ } else {
|
|
|
|
+ doubles = ExtractorUtils.funcC34567ForTags(tags, title);
|
|
|
|
+ }
|
|
return Pair.create(key, doubles);
|
|
return Pair.create(key, doubles);
|
|
});
|
|
});
|
|
futures.add(future);
|
|
futures.add(future);
|
|
@@ -263,7 +264,12 @@ public class RankStrategy4RegionMergeModelV562 extends RankStrategy4RegionMergeM
|
|
for (String key_time : Arrays.asList("tags_1d", "tags_3d", "tags_7d")) {
|
|
for (String key_time : Arrays.asList("tags_1d", "tags_3d", "tags_7d")) {
|
|
String tags = c34567Map.getOrDefault(name + "_" + key_time, "");
|
|
String tags = c34567Map.getOrDefault(name + "_" + key_time, "");
|
|
if (!tags.isEmpty()) {
|
|
if (!tags.isEmpty()) {
|
|
- Double[] doubles = ExtractorUtils.funcC34567ForTags(tags, title);
|
|
|
|
|
|
+ Double[] doubles = null;
|
|
|
|
+ if (param.getAbExpCodes().contains(word2vecExp)) {
|
|
|
|
+ doubles = ExtractorUtils.funcC34567ForTagsNew(tags, title);
|
|
|
|
+ } else {
|
|
|
|
+ doubles = ExtractorUtils.funcC34567ForTags(tags, title);
|
|
|
|
+ }
|
|
featureMap.put(name + "_" + key_time + "_matchnum", doubles[0]);
|
|
featureMap.put(name + "_" + key_time + "_matchnum", doubles[0]);
|
|
featureMap.put(name + "_" + key_time + "_maxscore", doubles[1]);
|
|
featureMap.put(name + "_" + key_time + "_maxscore", doubles[1]);
|
|
featureMap.put(name + "_" + key_time + "_avgscore", doubles[2]);
|
|
featureMap.put(name + "_" + key_time + "_avgscore", doubles[2]);
|