|
...
|
...
|
@@ -135,9 +135,9 @@ class GeoQuestionRes extends Command |
|
|
|
// 余弦相似度
|
|
|
|
if (FALSE == empty($cosine_result['similarity'])){
|
|
|
|
$cosine = intval($cosine_result['similarity'] * 10000) / 100;
|
|
|
|
if($cosine > 60 && $cosine < 70){
|
|
|
|
$cosine = mt_rand(90 * 100, 90 * 100) / 100;
|
|
|
|
}
|
|
|
|
// if($cosine > 60 && $cosine < 70){
|
|
|
|
// $cosine = mt_rand(90 * 100, 90 * 100) / 100;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
// 语句拆解结果
|
|
...
|
...
|
@@ -151,12 +151,12 @@ class GeoQuestionRes extends Command |
|
|
|
}
|
|
|
|
$keyword_num = json_encode($hit_keyword['keywords_num'] ?? [],true);
|
|
|
|
//todo::药明康德项目单独记录命中的url
|
|
|
|
if($taskInfo['project_id'] == 4533){
|
|
|
|
//查询当前项目的link
|
|
|
|
$linkModel = new GeoLink();
|
|
|
|
$urlArr = $linkModel->selectField(['project_id' => $taskInfo['project_id']],'url');
|
|
|
|
$taskInfo['url'] = array_values(array_unique(array_merge($taskInfo['url'], $urlArr)));
|
|
|
|
}
|
|
|
|
// if($taskInfo['project_id'] == 4533){
|
|
|
|
// //查询当前项目的link
|
|
|
|
// $linkModel = new GeoLink();
|
|
|
|
// $urlArr = $linkModel->selectField(['project_id' => $taskInfo['project_id']],'url');
|
|
|
|
// $taskInfo['url'] = array_values(array_unique(array_merge($taskInfo['url'], $urlArr)));
|
|
|
|
// }
|
|
|
|
$hit_url = $this->getUrl($taskInfo['url'],$hit_data);
|
|
|
|
if (!empty($hit_url['url'])) {
|
|
|
|
$hit++;
|
...
|
...
|
|