Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. //
  4. // CThaiTrigramTrieIter - contain the header for class CThaiTrigramTrieIter
  5. //
  6. // History:
  7. // created 8/99 aarayas
  8. //
  9. // �1999 Microsoft Corporation
  10. //----------------------------------------------------------------------------
  11. #ifndef _CTHAITRIGRAMTRIEITER_HPP_
  12. #define _CTHAITRIGRAMTRIEITER_HPP_
  13. #include <windows.h>
  14. #include <assert.h>
  15. #include <memory.h>
  16. #include "lexheader.h"
  17. #include "trie.h"
  18. #include "NLGlib.h"
  19. #include "ProofBase.h"
  20. #include "thwbdef.hpp"
  21. #include "CTrie.hpp"
  22. class CThaiTrigramTrieIter : public CTrieIter {
  23. public:
  24. CThaiTrigramTrieIter();
  25. ~CThaiTrigramTrieIter();
  26. DWORD GetProb(WCHAR pos1, WCHAR pos2, WCHAR pos3);
  27. DWORD GetProb(WCHAR* posArray);
  28. void Init(CTrie* ctrie);
  29. void GetNode();
  30. WCHAR pos;
  31. private:
  32. // For optimization quick look up table.
  33. WCHAR pos1Cache;
  34. WCHAR pos2Cache;
  35. TRIESCAN trieScanCache;
  36. TRIESCAN* pTrieScanArray;
  37. bool GetScanFirstChar(WCHAR wc, TRIESCAN* pTrieScan);
  38. };
  39. #endif