• 大小: 4.27MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-09-18
  • 语言: Java
  • 标签: 电子商务  CompKey  

资源简介

中南大学电子商务大作业,用Java实现CompKey竞争性关键字推荐算法。

资源截图

代码片段和文件信息

package com.mcy.comkey.template.core.analysis.impl;

import com.mcy.comkey.template.core.analysis.inter.CompetitiveKeywordAnalysis;
import com.mcy.comkey.template.core.model.CompetitiveKeywordNode;
import com.mcy.comkey.template.core.model.MediationKeywordNode;
import org.apache.commons.collections4.CollectionUtils;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 *
 */
public class CompetitiveKeywordAnalysisSimple implements CompetitiveKeywordAnalysis  {
    @Override
    public List computeCompetitiveKeywordNode(List competitiveKeywordNodeList) {
        for(CompetitiveKeywordNode node : competitiveKeywordNodeList){
            if(CollectionUtils.isEmpty(node.getMediationKeywordNodeLists())){
                continue;
            }
            //聚合 计算竞争度
           String word = node.getWord();
           double compK = 0.0d;
           for(MediationKeywordNode node1 : node.getMediationKeywordNodeLists()){
               compK += node1.getWeight()*node1.getCompMap().get(word);
           }
           node.setCompK(compK);
        }
        Collections.sort(competitiveKeywordNodeList);
        return competitiveKeywordNodeList;
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-12-04 12:34  Compkey\
     文件         307  2018-11-06 10:42  Compkey\.gitignore
     目录           0  2018-12-04 12:34  Compkey\.idea\
     文件          20  2018-11-05 19:54  Compkey\.idea\.name
     文件         684  2018-11-06 15:43  Compkey\.idea\compiler.xml
     目录           0  2018-12-04 12:34  Compkey\.idea\dictionaries\
     文件          85  2018-11-05 19:56  Compkey\.idea\dictionaries\asus.xml
     文件         238  2018-11-05 19:54  Compkey\.idea\encodings.xml
     目录           0  2018-12-04 12:34  Compkey\.idea\inspectionProfiles\
     文件        1444  2018-11-05 19:55  Compkey\.idea\inspectionProfiles\Project_Default.xml
     目录           0  2018-12-04 12:34  Compkey\.idea\libraries\
     文件         575  2018-11-05 19:55  Compkey\.idea\libraries\Maven__ch_qos_logback_logback_classic_0_9_28.xml
     文件         554  2018-11-05 19:55  Compkey\.idea\libraries\Maven__ch_qos_logback_logback_core_0_9_28.xml
     文件         511  2018-11-05 19:55  Compkey\.idea\libraries\Maven__com_belerweb_pinyin4j_2_5_0.xml
     文件         499  2018-11-05 19:55  Compkey\.idea\libraries\Maven__com_google_guava_guava_18_0.xml
     文件         455  2018-11-06 15:38  Compkey\.idea\libraries\Maven__junit_junit_4_12.xml
     文件         469  2018-11-05 19:55  Compkey\.idea\libraries\Maven__log4j_log4j_1_2_17.xml
     文件         605  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_commons_commons_collections4_4_2.xml
     文件         556  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_commons_commons_pool2_2_0.xml
     文件         636  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_analyzers_common_5_2_1.xml
     文件         629  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_backward_codecs_5_2_1.xml
     文件         552  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_core_7_4_0.xml
     文件         552  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_misc_5_2_1.xml
     文件         573  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_queries_5_2_1.xml
     文件         601  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_queryparser_5_2_1.xml
     文件         573  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_sandbox_5_2_1.xml
     文件         573  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apache_lucene_lucene_suggest_5_2_1.xml
     文件         465  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_apdplat_word_1_3.xml
     文件         532  2018-11-06 15:38  Compkey\.idea\libraries\Maven__org_hamcrest_hamcrest_core_1_3.xml
     文件         506  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_slf4j_slf4j_api_1_7_2.xml
     文件         534  2018-11-05 19:55  Compkey\.idea\libraries\Maven__org_slf4j_slf4j_log4j12_1_7_2.xml
............此处省略105个文件信息

评论

共有 条评论