mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
rm globals.h
This commit is contained in:
parent
ccaeeb5bb0
commit
e8116cd07a
@ -9,7 +9,7 @@ LINK_DIRECTORIES(Husky)
|
||||
|
||||
INSTALL(TARGETS cjsegment RUNTIME DESTINATION bin)
|
||||
INSTALL(TARGETS cjserver RUNTIME DESTINATION bin)
|
||||
INSTALL(FILES ChineseFilter.hpp HMMSegment.hpp MPSegment.hpp Trie.hpp globals.h ISegment.hpp MixSegment.hpp SegmentBase.hpp TransCode.hpp DESTINATION include/CppJieba)
|
||||
INSTALL(FILES ChineseFilter.hpp HMMSegment.hpp MPSegment.hpp Trie.hpp ISegment.hpp MixSegment.hpp SegmentBase.hpp TransCode.hpp DESTINATION include/CppJieba)
|
||||
|
||||
ADD_SUBDIRECTORY(Husky)
|
||||
ADD_SUBDIRECTORY(Limonp)
|
||||
|
@ -7,8 +7,9 @@
|
||||
namespace CppJieba
|
||||
{
|
||||
|
||||
enum CHAR_TYPE { CHWORD = 0, DIGIT_OR_LETTER = 1, OTHERS = 2};
|
||||
typedef Unicode::const_iterator UniConIter;
|
||||
class ChineseFilter;
|
||||
|
||||
class ChFilterIterator
|
||||
{
|
||||
public:
|
||||
|
@ -14,6 +14,7 @@
|
||||
namespace CppJieba
|
||||
{
|
||||
using namespace Limonp;
|
||||
typedef unordered_map<uint16_t, double> EmitProbMap;
|
||||
class HMMSegment: public SegmentBase
|
||||
{
|
||||
public:
|
||||
|
@ -13,6 +13,7 @@ namespace CppJieba
|
||||
{
|
||||
|
||||
using namespace Limonp;
|
||||
typedef std::vector<uint16_t> Unicode;
|
||||
namespace TransCode
|
||||
{
|
||||
inline bool decode(const string& str, vector<uint16_t>& vec)
|
||||
|
@ -21,6 +21,9 @@
|
||||
namespace CppJieba
|
||||
{
|
||||
using namespace Limonp;
|
||||
const double MIN_DOUBLE = -3.14e+100;
|
||||
const double MAX_DOUBLE = 3.14e+100;
|
||||
typedef unordered_map<uint16_t, struct TrieNode*> TrieNodeMap;
|
||||
struct TrieNode
|
||||
{
|
||||
TrieNodeMap hmap;
|
||||
|
@ -1,36 +0,0 @@
|
||||
/************************************
|
||||
* file enc : ASCII
|
||||
* author : wuyanyi09@gmail.com
|
||||
************************************/
|
||||
#ifndef CPPJIEBA_GLOBALS_H
|
||||
#define CPPJIEBA_GLOBALS_H
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
//#include <hash_map>
|
||||
#include <tr1/unordered_map>
|
||||
//#include <ext/hash_map>
|
||||
|
||||
namespace CppJieba
|
||||
{
|
||||
|
||||
using namespace std;
|
||||
using std::tr1::unordered_map;
|
||||
//using __gnu_cxx::hash_map;
|
||||
//using namespace stdext;
|
||||
//typedefs
|
||||
typedef std::vector<std::string>::iterator VSI;
|
||||
typedef std::vector<uint16_t> Unicode;
|
||||
typedef Unicode::const_iterator UniConIter;
|
||||
typedef unordered_map<uint16_t, struct TrieNode*> TrieNodeMap;
|
||||
typedef unordered_map<uint16_t, double> EmitProbMap;
|
||||
|
||||
const double MIN_DOUBLE = -3.14e+100;
|
||||
const double MAX_DOUBLE = 3.14e+100;
|
||||
enum CHAR_TYPE { CHWORD = 0, DIGIT_OR_LETTER = 1, OTHERS = 2};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user