|
@@ -228,7 +228,6 @@ public class RankStrategy4RegionMergeModelV565 extends RankStrategy4RegionMergeM
|
|
|
|
|
|
String title = videoInfo.getOrDefault("title", "");
|
|
|
if (!title.isEmpty()) {
|
|
|
-<<<<<<< HEAD
|
|
|
if (similarityConcurrent) {
|
|
|
List<Future<Pair<String, Double[]>>> futures = new ArrayList<>();
|
|
|
for (String name : Arrays.asList("c3_feature", "c4_feature", "c5_feature", "c6_feature", "c7_feature")) {
|
|
@@ -237,7 +236,12 @@ public class RankStrategy4RegionMergeModelV565 extends RankStrategy4RegionMergeM
|
|
|
String tags = c34567Map.getOrDefault(key, "");
|
|
|
if (!tags.isEmpty()) {
|
|
|
Future<Pair<String, Double[]>> future = ThreadPoolFactory.defaultPool().submit(() -> {
|
|
|
- Double[] doubles = ExtractorUtils.funcC34567ForTags(tags, title);
|
|
|
+ Double[] doubles;
|
|
|
+ if (param.getAbExpCodes().contains(word2vecExp)) {
|
|
|
+ doubles = ExtractorUtils.funcC34567ForTagsNew(tags, title);
|
|
|
+ } else {
|
|
|
+ doubles = ExtractorUtils.funcC34567ForTags(tags, title);
|
|
|
+ }
|
|
|
return Pair.create(key, doubles);
|
|
|
});
|
|
|
futures.add(future);
|
|
@@ -259,26 +263,16 @@ public class RankStrategy4RegionMergeModelV565 extends RankStrategy4RegionMergeM
|
|
|
for (String key_time : Arrays.asList("tags_1d", "tags_3d", "tags_7d")) {
|
|
|
String tags = c34567Map.getOrDefault(name + "_" + key_time, "");
|
|
|
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 + "_maxscore", doubles[1]);
|
|
|
featureMap.put(name + "_" + key_time + "_avgscore", doubles[2]);
|
|
|
}
|
|
|
-=======
|
|
|
- for (String name : Arrays.asList("c3_feature", "c4_feature", "c5_feature", "c6_feature", "c7_feature")) {
|
|
|
- for (String key_time : Arrays.asList("tags_1d", "tags_3d", "tags_7d")) {
|
|
|
- String tags = c34567Map.getOrDefault(name + "_" + key_time, "");
|
|
|
- if (!tags.isEmpty()) {
|
|
|
- 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 + "_maxscore", doubles[1]);
|
|
|
- featureMap.put(name + "_" + key_time + "_avgscore", doubles[2]);
|
|
|
->>>>>>> 56fb133 (word2vec)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -467,7 +461,8 @@ public class RankStrategy4RegionMergeModelV565 extends RankStrategy4RegionMergeM
|
|
|
|
|
|
|
|
|
private double calculateScore(List<Double> featureList, List<Double> weightList, RankItem rankItem,
|
|
|
- double vov_thresh, double view_thresh, double h1_ago_view, double level50_vov, double level_95_vov, double beta_vov) {
|
|
|
+ double vov_thresh, double view_thresh, double h1_ago_view, double level50_vov, double level_95_vov,
|
|
|
+ double beta_vov) {
|
|
|
// 检查 h1_ago_view 条件
|
|
|
if (h1_ago_view == -2 || h1_ago_view == -1 || h1_ago_view < view_thresh) {
|
|
|
rankItem.getScoresMap().put("origin_vov_p", 0d);
|