Update TextRankExtractor.hpp

remove unused function which using c++11 keyword `auto`
This commit is contained in:
Yanyi Wu 2016-05-03 19:53:40 +08:00
parent 0f66a923b3
commit 6d105a864d

View File

@ -1,4 +1,4 @@
#ifndef CPPJIEBA_TEXTRANK_EXTRACTOR_H
#ifndef CPPJIEBA_TEXTRANK_EXTRACTOR_H
#define CPPJIEBA_TEXTRANK_EXTRACTOR_H
#include <cmath>
@ -176,13 +176,6 @@ namespace cppjieba {
return false;
}
static void sortMapValue(WordMap &map,vector<Word>& result,size_t topN){
for(auto i=map.begin();i!=map.end();i++){
result.push_back(i->second);
}
partial_sort(result.begin(),result.begin()+topN,result.end(),Compare);
}
static bool Compare(const Word &x,const Word &y){
return x.weight > y.weight;
}