主权项 |
一种基于实体及特征的搜索排序改进算法由以下特征构成://Input(输入) BR—base rank(原有搜索页面排序) SURL—search url(搜索页面的URL) KB—knowledge base(需要进行重新排序的实体及特征知识库)//Output(输出) IR—improved rank(改进后的搜索页面排序) /*getEntities函数,输入为SURL,输出为某URL页面里面的高频名词,并将这些高频名词作为实体*/Entities = getEntities(SURL)/*getFeatures函数,输入为SURL,对应SURL下的Entities,输出为Entities对应的Features*/Features=getFeatures(SURL,Entities)/*existKB函数,输入为KB,entity实体名词,输出为True或者False,判断是否KB中的实体名词*/Exist=existKB(KB,entity)IR=BRFeaturesCount/*数组,记录每一个搜索结果中出现实体特征的个数*/For m=1 to end of BR SURL=getURL(BR) /*找到每一个搜索结果的URL*/ Entities=getEntities(SURL) For entity in Entities If (existKB(KB,entity)) Features=getFeatures(SURL,Entities) breakFeatureCount[m]=length(Features)/*计算Features中实体特征的数量并将其加入对应标号FeatureCount数组*/IR =fastSort(FeatureCount)/*使用快速排序算法对FeatureCount数组进行排序得到的排序就是重新排序后顺序*/ 。 |