init TfIdfKeyWord.hpp

This commit is contained in:
wyy 2013-12-20 08:57:10 -08:00
parent 670c7e4a13
commit f89cf00552

32
src/TfIdfKeyWord.hpp Normal file
View File

@ -0,0 +1,32 @@
#ifndef CPPJIEBA_TFIDF_H
#define CPPJIEBA_TFIDF_H
#include "MPSegment.hpp"
namespace CppJieba
{
using namespace Limonp;
class TfIdfKeyWord
{
private:
MPSegment _segment;
public:
TfIdfKeyWord(const char* dictFile): _segment(dictFile){};
~TfIdfKeyWord(){};
public:
bool init(){return _segment.init();};
bool dispose(){return _segment.dispose();};
public:
bool extract(const string& str, vector<string>& words, uint topN)
{
return _segment.cut(words);
return true;
}
};
}
#endif