1 // Analysis and number of occurences for a word in the corpus
2 // Copyright © 2009 The University of Chicago
6 #include <q3ptrvector.h>
12 // All corpus counts in a Linguistica session should be based on the counts
13 // of these and be retrievable from *CLexicon::m_pCorpusWords.
14 // The cuts in these words should be updated by the mini-lexica.
15 class CCorpusWord
: public CLParse
20 //--------------------------------------------------
21 // Protected member variables
22 //--------------------------------------------------
24 Q3PtrVector
<CLParse
> m_morphemes
;
30 //--------------------------------------------------
31 // Constructors/Destructor
32 //--------------------------------------------------
34 CCorpusWord( CMiniLexicon
* mini
= NULL
);
35 CCorpusWord( const CStringSurrogate
&, CMiniLexicon
* mini
= NULL
);
36 CCorpusWord( CCorpusWord
& );
37 CCorpusWord( const CLParse
& );
38 CCorpusWord( const CParse
&, CMiniLexicon
* mini
= NULL
);
42 //--------------------------------------------------
43 // Overloaded operators
44 //--------------------------------------------------
46 void operator= ( const CCorpusWord
& );
48 void Copy( CCorpusWord
& );
50 //--------------------------------------------------
51 // Public accessor methods
52 //--------------------------------------------------
54 CLParse
* GetMorpheme(int) const;
55 bool IsUpdated() const { return m_updated
; }
57 //--------------------------------------------------
58 // Public mutator methods
59 //--------------------------------------------------
61 void CopyParseStructure( CCompound
* );
62 void CutRightBeforeHere(int);
63 void InsertMorpheme( int, CLParse
* );
64 void MergePieces(int);
65 void SetMorpheme( int, CLParse
* );
66 void SetUpdated( bool b
= TRUE
) { m_updated
= b
; }
67 void SimplifyParseStructure();
70 virtual void SetLengthOfPieceVector(int i
);
73 #endif // CORPUSWORD_H