From 27e3b1871c8b29489fe6fb84ca53ed6a2f301541 Mon Sep 17 00:00:00 2001 From: gwdwyy Date: Sat, 24 Aug 2013 17:16:12 +0800 Subject: [PATCH] add hmmsegment --- src/HMMSegment.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ src/HMMSegment.h | 19 +++++++++++++++++++ src/globals.h | 5 +++++ 3 files changed, 64 insertions(+) create mode 100644 src/HMMSegment.cpp create mode 100644 src/HMMSegment.h diff --git a/src/HMMSegment.cpp b/src/HMMSegment.cpp new file mode 100644 index 0000000..f6291da --- /dev/null +++ b/src/HMMSegment.cpp @@ -0,0 +1,40 @@ +#include "HMMSegment.h" + +namespace CppJieba +{ + HMMSegment::HMMSegment() + { + } + + HMMSegment::~HMMSegment() + { + } + + bool HMMSegment::init() + { + return true; + } + + bool HMMSegment::dispose() + { + return true; + } + + bool HMMSegment::loadModel() + { + return true; + } +} + + +#ifdef HMMSEGMENT_UT +using namespace CppJieba; + +int main() +{ + HMMSegment hmm; + + return 0; +} + +#endif diff --git a/src/HMMSegment.h b/src/HMMSegment.h new file mode 100644 index 0000000..e5e7749 --- /dev/null +++ b/src/HMMSegment.h @@ -0,0 +1,19 @@ +#ifndef CPPJIBEA_HMMSEGMENT_H +#define CPPJIBEA_HMMSEGMENT_H + +namespace CppJieba +{ + class HMMSegment + { + public: + HMMSegment(); + ~HMMSegment(); + public: + bool init(); + bool dispose(); + public: + bool loadModel(); + }; +} + +#endif diff --git a/src/globals.h b/src/globals.h index c7a899e..1bdd50c 100644 --- a/src/globals.h +++ b/src/globals.h @@ -26,6 +26,11 @@ namespace CppJieba typedef std::vector::const_iterator VUINT16_CONST_ITER; typedef hash_map TrieNodeMap; + namespace HMMDict + { + + } + } #endif