1 // Prefix list for suffix/signature-based morphology discovery and display
2 // Copyright © 2009 The University of Chicago
3 #ifndef PREFIXCOLLECTION_H
4 #define PREFIXCOLLECTION_H
6 class CPrefixCollection
;
8 // See the CMiniLexicon class in MiniLexicon.h for an overview of
9 // suffix/signature-based discovery of morphology.
11 #include "CollectionTemplate.h"
12 #include "StringSurrogate.h"
13 template<class K
, class V
> class QMap
;
15 namespace linguistica
{ namespace ui
{ class status_user_agent
; } }
17 class CPrefixCollection
: public TCollection
<class CPrefix
> {
18 // XXX. SuffixCollection remembers sum(dl of pointers to members).
22 explicit CPrefixCollection(class CMiniLexicon
* Lex
);
26 // XXX. SuffixCollection has a knob for express_deletees
27 void ListDisplay(class Q3ListView
* widget
,
28 QMap
<QString
, QString
>* filter
,
29 linguistica::ui::status_user_agent
& status_display
);
32 void OutputPrefixes(QString filename
);
33 void ReadPrefixFile(QString FileName
);
35 // XXX. SuffixCollection has SortByIndex(),
36 // Get/CalculateTotalUseCount().
39 CPrefix
* operator<<(CStringSurrogate prefix_text
);
40 CPrefix
* operator<<(class CParse
* prefix_text
);
41 // XXX. SuffixCollection provides operator<<(CParse&)
42 CPrefix
* operator<<(QString prefix_text
);
43 void AddPointer(CPrefix
* prefix
);
44 CPrefix
* AddToCollection(CParse
& prefix_text
);
45 CPrefix
* AddToCollection(CStringSurrogate
& prefix_text
);
52 bool Remove(CPrefix
* prefix
); ///< doesn't delete prefix
53 bool RemoveMember(CPrefix
* prefix
); ///< deletes prefix
54 bool RemoveMember(CStringSurrogate
& prefix_text
); ///< deletes prefix
55 bool RemoveMember(CStringSurrogate
& prefix_text
, bool delete_it
);
56 void DeleteMarkedMembers();
58 // XXX. SuffixCollection has FindCombinations(),
59 // FindFactorableSuffixes().
61 // description length.
62 double GetDL_PhonologicalContent();
63 // XXX. SuffixCollection has CalculatePointersToMySuffixes()
66 #endif // PREFIXCOLLECTION_H