struct.h
上传用户:panfucai
上传日期:2022-05-28
资源大小:4678k
文件大小:1k
- // Pre-defined data structures
- # pragma once
- # define MAXCOUNT 100
- # define WORDCOUNT 770000
- typedef struct STRUCTDICTABLE // Sequence table
- {
- TCHAR *pWord;
- int iLen;
- int iCount;
- } *PDICTABLE, DICTABLE;
- typedef struct STRUCTWORDLIST // Link table
- {
- TCHAR *pWord;
- STRUCTWORDLIST *pNext;
- STRUCTWORDLIST *pTail;
- } *PWORDLIST, WORDLIST;
- /*typedef struct STRUCTSENTENCELIST // Link table, for storing different passages
- {
- TCHAR *pSentence;
- STRUCTSENTENCELIST *pNext;
- STRUCTSENTENCELIST *pTail;
- } *PSENTENCELIST, SENTENCELIST;*/
- typedef struct STRUCTHTMLTREE // Tree, for analyzing the html format text
- {
- TCHAR *pstrTagName;
- TCHAR *pstrSubTag;
- TCHAR *pstrContent;
- STRUCTHTMLTREE *pParentNode;
- STRUCTHTMLTREE *pKidNode[MAXCOUNT];
- int iLastKidNode;
- } *PHTMLTREE, HTMLTREE;
- typedef struct STRUCTHTMLNODESTACK // Stack, for analyzing the html format text
- {
- TCHAR *pstrTagName;
- STRUCTHTMLNODESTACK *pHead;
- STRUCTHTMLNODESTACK *pNext;
- STRUCTHTMLNODESTACK *pPrevious;
- } *PNODESTACK, NODESTACK;
- typedef struct STRUCTFILELIST // Link table, for storing documents id sorted by words
- {
- int iDocID;
- int iTimes;
- STRUCTFILELIST *pNext;
- } *PFILELIST, FILELIST;
- typedef struct STRUCTSTRINGTABLE // Sequence table, for storing all the characters and words
- {
- TCHAR *pWord;
- int iLen;
- int iCount;
- int iSequenceCount;
- int iOccuredFiles;
- int iOccuredTimes;
- PFILELIST pFileList;
- } *PSTRTABLE, STRTABLE;