-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndexTermsInDoc.cpp
More file actions
73 lines (59 loc) · 1.39 KB
/
IndexTermsInDoc.cpp
File metadata and controls
73 lines (59 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// IndexTermsInDoc.cpp: implementation of the CIndexTermsInDoc class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ARS.h"
#include "IR.h"
#include "KeyWord.h"
#include "ARSDocument.h"
#include "IndexTermsInDoc.h"
#include "FilePrepare.h"
#include "DBManpulation.h"
#include "Indexer.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
extern CDBManpulation ARSdb;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIndexTermsInDoc::CIndexTermsInDoc()
{
}
CIndexTermsInDoc::~CIndexTermsInDoc()
{
}
void CIndexTermsInDoc::SetIndexTermInfo(LONG TermNum, LONG DocNum, double Weight, int DFi)
{
m_TermNum = TermNum;
m_DocNum = DocNum ;
m_Weight = Weight ;
m_DFi = DFi ;
}
LONG CIndexTermsInDoc::GetDocNum()
{
return m_DocNum;
}
LONG CIndexTermsInDoc::GetTermNum()
{
return m_TermNum;
}
double CIndexTermsInDoc::GetWeight()
{
return m_Weight;
}
int CIndexTermsInDoc::GetFrequency()
{
return m_DFi;
}
void CIndexTermsInDoc::ConstructTermDocMat(int nCollection, mwArray &TMmat)
{
if( !ARSdb.GetDocTermInfo() )
{
AfxMessageBox("Couldn't access the ARSdb");
::exit(1);
}
ARSdb.FillArray(TMmat);
}