1 // CMorphemeCollection class
2 // Copyright © 2009 The University of Chicago
3 #ifndef MORPHEMECOLLECTION_H
4 #define MORPHEMECOLLECTION_H
6 #include "CollectionTemplate.h"
7 #include <q3textstream.h>
10 class CMorphemeCollection
;
11 class CMyCollectionView
;
15 void operator<< (Q3TextStream
& , CMorphemeCollection
&);
17 class CMorphemeCollection
: public TCollection
<CMorpheme
>
19 friend void operator<< (Q3TextStream
& , CMorphemeCollection
&);
24 double m_TotalDLSavings
;
28 CMorphemeCollection();
29 CMorphemeCollection( CMiniLexicon
* );
30 ~CMorphemeCollection();
31 void Display( CMyCollectionView
* );
33 CMorpheme
* operator<< ( CStringSurrogate
);
34 CMorpheme
* operator<< ( CMorpheme
* );
35 void operator<< ( CMorphemeCollection
* );
39 double GetTotalDLSavings() { return m_TotalDLSavings
; };
40 void ViterbiParse ( CWordCollection
* Words
);
42 bool Forward (const char* Word
, double* ForwardProb
);
43 bool Backward (const char* Word
, double* BackwardProb
);
45 bool Forward_Bigrams (const char* Word
, double* ForwardProb
);
46 bool Backward_Bigrams (const char* Word
, double* BackwardProb
);
49 void ClearAllMorphemeCounts();
51 void OutputMorphemes ( QString
& Filename
);
54 #endif // MORPHEMECOLLECTION_H