CMiniLexicon::FindMajorSignatures(): use log file routines
[linguistica.git] / CompoundCollection.h
blob901a18fe7ab855bcd55cb56f8597e9c5c0783563
1 // Compound and component lists for compound discovery
2 // Copyright © 2009 The University of Chicago
3 #ifndef COMPOUNDCOLLECTION_H
4 #define COMPOUNDCOLLECTION_H
6 #include "CollectionTemplate.h"
7 #include "Compound.h"
8 #include <QList>
9 class CCompound;
10 class CGrammarRule;
12 typedef QList<CStem*> StemSet;
13 typedef QMap<uint,uint> PtrToPtr;
14 typedef Q3PtrList<CGrammarRule> RuleList;
15 typedef QMap<QString,RuleList> RuleCollection;
16 typedef QMap<QString,StemSet*> ComponentMap;
17 typedef TCollection<CStem> ComponentCollection;
19 class CCompoundCollection : public TCollection<CCompound>
22 protected:
24 double m_ComponentCount;
25 double m_LinkerCount;
26 ComponentMap m_ComponentMap;
27 ComponentCollection m_Components;
29 public:
30 CCompoundCollection( CLexicon* lexicon );
31 CCompoundCollection( CMiniLexicon* lexicon = NULL );
32 virtual ~CCompoundCollection();
34 ComponentMap* GetComponentMap() { return &m_ComponentMap; }
35 ComponentCollection* GetComponents() { return &m_Components;}
36 // void ChooseParseByProbability();
37 void FindMostProbableParse();
38 // void OutputCompounds ( QString );
41 void SetComponentCount( double d ) { m_ComponentCount = d; }
42 void SetLinkerCount( double d ) { m_LinkerCount = d; }
43 double GetComponentCount() { return m_ComponentCount; }
44 double GetLinkerCount() { return m_LinkerCount; }
45 void CheckAndRecount();
48 #endif // COMPOUNDCOLLECTION_H