CMiniLexicon::FindMajorSignatures(): use log file routines
[linguistica.git] / POS.h
blobc1128fe9caa5f6683d1c45442a16e662b5797daf
1 // Merged signatures, representing a single part of speech (one hopes!)
2 // Copyright © 2009 The University of Chicago
3 #ifndef POS_H
4 #define POS_H
6 #include "Signature.h"
7 #include <q3listview.h>
8 class GUIPOS;
10 class LxPoS : public CLParse
12 CSignature* m_Signature; // owned by another Collection; this is just a pointer.
13 CParse m_SatelliteAffixes;//affixes taken by stems of this POS.
14 double m_Robustness;
15 QList<CStem*> m_Stems;
16 QList<CSignature*> m_Signatures;
19 public:
20 LxPoS (CSignature* , CMiniLexicon* mini);
21 virtual ~LxPoS();
23 int GetSize() { return m_Signature->Size(); }
24 CSignature* GetSignature() { return m_Signature; }
25 CParse* GetSatelliteAffixes() { return &m_SatelliteAffixes; }
26 double GetRobustness() { return m_Robustness; }
27 void AddRobustness(double r) { m_Robustness += r; }
28 void ListDisplay(Q3ListView* m_collectionView,
29 QString );
30 void ListDisplay(Q3ListViewItem* m_collectionView,
31 QString );
32 int GetNumberOfStems() { return m_Stems.count(); }
33 int GetNumberOfSignatures() { return m_Signature->GetMentorList()->count() + 1; }
34 void AddStem (CStem* pStem) { m_Stems.append(pStem); }
35 CStem* GetStem(int stemno) { return m_Stems.at(stemno); }
36 CSignature* GetSignature(int signo) { return m_Signatures.at(signo);}
37 void AppendSignature (CSignature* pSig) { m_Signatures.append(pSig); }
43 //--------------- GUI -----------------------------------------//
45 class GUIPOSListViewItem: public Q3ListViewItem
48 public:
49 //--------------------------------------------------
50 // Constructors/Destructor
51 //--------------------------------------------------
54 GUIPOSListViewItem( Q3ListView* parent = NULL );
55 GUIPOSListViewItem( Q3ListView *parent,
56 QString,
57 LxPoS*);
59 GUIPOSListViewItem( Q3ListViewItem *parent,
60 QString,
61 LxPoS*);
63 virtual QString text ( int ) const;
64 virtual QString key ( int, bool ) const;
65 LxPoS* GetPoS() const { return m_PoS; }
66 void SetPoS( LxPoS* qPoS ) { m_PoS= qPoS; }
67 CParse* GetSatelliteAffixes() { return m_PoS->GetSatelliteAffixes(); }
68 Q3ListView* GetParent() { return m_parentlist; }
69 void PoSListDisplay (Q3ListView*, QString, LxPoS*);
70 void PoSListDisplay (Q3ListViewItem*, QString, LxPoS*);
71 int compare(Q3ListViewItem *item, int col, bool asc) const;
72 //--------------------------------------------------
73 // Protected member variables
74 //--------------------------------------------------
76 protected:
77 LxPoS* m_PoS;
78 QMap<QString, QString>* m_filter;
79 QString m_label;
80 Q3ListView* m_parentlist;
81 int m_mini;
84 #endif // POS_H