CMiniLexicon::FindMajorSignatures(): use log file routines
[linguistica.git] / CorpusWord.h
blobdcea209778dd06ac9ed25f4d12c5177c6e7a84e1
1 // Analysis and number of occurences for a word in the corpus
2 // Copyright © 2009 The University of Chicago
3 #ifndef CORPUSWORD_H
4 #define CORPUSWORD_H
6 #include <q3ptrvector.h>
8 #include "LParse.h"
10 class CCompound;
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
18 protected:
20 //--------------------------------------------------
21 // Protected member variables
22 //--------------------------------------------------
24 Q3PtrVector<CLParse> m_morphemes;
25 bool m_updated;
28 public:
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 );
39 ~CCorpusWord();
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();
69 protected:
70 virtual void SetLengthOfPieceVector(int i);
73 #endif // CORPUSWORD_H