struct.h
上传用户:panfucai
上传日期:2022-05-28
资源大小:4678k
文件大小:1k
源码类别:

多国语言处理

开发平台:

Visual C++

  1. // Pre-defined data structures
  2. # pragma once
  3. # define MAXCOUNT 100
  4. # define WORDCOUNT 770000
  5. typedef struct STRUCTDICTABLE // Sequence table
  6. {
  7. TCHAR *pWord;
  8. int iLen;
  9. int iCount;
  10. } *PDICTABLE, DICTABLE;
  11. typedef struct STRUCTWORDLIST // Link table
  12. {
  13. TCHAR *pWord;
  14. STRUCTWORDLIST *pNext;
  15. STRUCTWORDLIST *pTail;
  16. } *PWORDLIST, WORDLIST;
  17. /*typedef struct STRUCTSENTENCELIST // Link table, for storing different passages
  18. {
  19. TCHAR *pSentence;
  20. STRUCTSENTENCELIST *pNext;
  21. STRUCTSENTENCELIST *pTail;
  22. } *PSENTENCELIST, SENTENCELIST;*/
  23. typedef struct STRUCTHTMLTREE // Tree, for analyzing the html format text
  24. {
  25. TCHAR *pstrTagName;
  26. TCHAR *pstrSubTag;
  27. TCHAR *pstrContent;
  28. STRUCTHTMLTREE *pParentNode;
  29. STRUCTHTMLTREE *pKidNode[MAXCOUNT];
  30. int iLastKidNode;
  31. } *PHTMLTREE, HTMLTREE;
  32. typedef struct STRUCTHTMLNODESTACK // Stack, for analyzing the html format text
  33. {
  34. TCHAR *pstrTagName;
  35. STRUCTHTMLNODESTACK *pHead;
  36. STRUCTHTMLNODESTACK *pNext;
  37. STRUCTHTMLNODESTACK *pPrevious;
  38. } *PNODESTACK, NODESTACK;
  39. typedef struct STRUCTFILELIST // Link table, for storing documents id sorted by words
  40. {
  41. int iDocID;
  42. int iTimes;
  43. STRUCTFILELIST *pNext;
  44. } *PFILELIST, FILELIST;
  45. typedef struct STRUCTSTRINGTABLE // Sequence table, for storing all the characters and words
  46. {
  47. TCHAR *pWord;
  48. int iLen;
  49. int iCount;
  50. int iSequenceCount;
  51. int iOccuredFiles;
  52. int iOccuredTimes;
  53. PFILELIST pFileList;
  54. } *PSTRTABLE, STRTABLE;