1 // Corpus and lexicon description length bookkeeping type
2 // Copyright © 2009 The University of Chicago
3 #ifndef DESCRIPTIONLENGTH_H
4 #define DESCRIPTIONLENGTH_H
6 #include <Q3ListViewItem>
8 #include "generaldefinitions.h"
12 ///////////////////////////////////////////////////////////////////////
16 ///////////////////////////////////////////////////////////////////////
20 class CDescriptionLength
24 class CMiniLexicon
* m_MyMiniLexicon
;
25 class CLexicon
* m_MyLexicon
;
26 eMDL_STYLE m_MDLStyle
;
30 double m_NumberOfStems
;
31 double m_StemsTotalPhonologicalInformationContent
;
32 double m_SumOfPointersToMyStems_CorpusCount
;
33 double m_SumOfPointersToMyStems_GrammarCount
;
36 int m_NumberOfUnanalyzedWords
;
37 double m_UnanalyzedWordsTotalPhonologicalInformationContent
;
38 double m_SumOfPointersToMyUnanalyzedWords_CorpusCount
;
39 double m_SumOfPointersToMyUnanalyzedWords_GrammarCount
;
42 int m_NumberOfAnalyzedWords
;
45 double m_SuffixesTotalPhonologicalInformationContent
;
47 double m_SumOfPointersToMySuffixes_CorpusCount
;
48 double m_SumOfPointersToMySuffixes_GrammarCount
;
52 double m_SumOfInformationContentOfPointersInMySuffixSignatures
;
53 double m_SumOfPointersToMySuffixSignatures_CorpusCount
;
54 double m_SumOfPointersToMySuffixSignatures_GrammarCount
;
57 double m_CompressedLengthOfCorpus
;
58 double m_CompressedLengthOfUnanalyzedWords
;
61 CDescriptionLength( CMiniLexicon
* );
62 CDescriptionLength( CLexicon
* );
63 ~CDescriptionLength();
71 double GetStemsTotalPhonologicalInformationContent ( );
72 double GetAffixesTotalPhonologicalInformationContent ( );
73 double GetSumOfPointersToMyStems ( eMDL_STYLE Flag
= CorpusCount
);
75 // double GetUnanalyzedWordsTotalPhonologicalContent ( eMDL_STYLE = CorpusCount);
76 // 'eMDL_STYLE' unused parameter
77 double GetUnanalyzedWordsTotalPhonologicalInformationContent ( );
79 double GetSumOfPointersToMyUnanalyzedWords ( eMDL_STYLE Flag
= CorpusCount
);
82 double GetSuffixesTotalPhonologicalInformationContent ( );
83 double GetSumOfPointersToMySuffixes (eMDL_STYLE Flag
= CorpusCount
);
86 double GetSumOfInformationContentOfPointersInMySuffixSignatures ();
87 double GetSumOfPointersToMySuffixSignatures ( eMDL_STYLE Flag
= CorpusCount
);
90 double GetCompressedLengthOfCorpus ();
92 void SetStemsTotalPhonologicalInformationContent ( double c
) { m_StemsTotalPhonologicalInformationContent
= c
; }
93 double CalculateCompressedLengthOfCorpus ();
98 void DescriptionLengthListDisplay(class Q3ListView
* list
);
102 ///////////////////////////////////////////////////////////////////////
104 // Description Length
106 ///////////////////////////////////////////////////////////////////////
109 class CDescriptionLengthListViewItem
: public Q3ListViewItem
112 CDescriptionLengthListViewItem ( class Q3ListView
* parent
= NULL
);
113 CDescriptionLengthListViewItem ( class Q3ListView
*parent
,
115 QString
= QString::null
,
116 CDescriptionLength
* = NULL
,
118 CDescriptionLengthListViewItem ( Q3ListViewItem
*parent
,
120 QString
= QString::null
,
121 CDescriptionLength
* = NULL
,
124 virtual QString
text ( int ) const;
125 virtual QString
key(int column
, bool ascending
) const;
126 QString
GetSubstance () const;
127 eDocumentType
GetSpellOutType () const { return m_SpellOutType
;}
128 QString
SpellOutType () const;
129 QString
GetLengthOfPointersToMe () const;
130 CDescriptionLength
* GetDL () const {return m_DL
; }
131 QString
GetLengthOfInternalPointers () const;
134 eDocumentType m_SpellOutType
;
135 CDescriptionLength
* m_DL
;
139 #endif // DESCRIPTIONLENGTH_H