mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
Update TextRankExtractor.hpp
remove unused function which using c++11 keyword `auto`
This commit is contained in:
parent
0f66a923b3
commit
6d105a864d
@ -1,4 +1,4 @@
|
|||||||
#ifndef CPPJIEBA_TEXTRANK_EXTRACTOR_H
|
#ifndef CPPJIEBA_TEXTRANK_EXTRACTOR_H
|
||||||
#define CPPJIEBA_TEXTRANK_EXTRACTOR_H
|
#define CPPJIEBA_TEXTRANK_EXTRACTOR_H
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -176,13 +176,6 @@ namespace cppjieba {
|
|||||||
return false;
|
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){
|
static bool Compare(const Word &x,const Word &y){
|
||||||
return x.weight > y.weight;
|
return x.weight > y.weight;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user