1 // Prefix type with corpus count for suffix/signature-based morphology discovery
2 // Copyright © 2009 The University of Chicago
6 // See the CMiniLexicon class in MiniLexicon.h for an overview of
7 // suffix/signature-based discovery of morphology.
13 // XXX. affix_list_view_item<CPrefix> is explicitly instantiated
14 // in Prefix.cpp, so we should avoid instantiating it automatically
15 // in other translation units:
17 //extern template class linguistica::affix_list_view_item<CPrefix>;
19 // but swig cannot handle the "extern template" declaration, so we
20 // skip it. Luckily for us, affix_list_view_item<CPrefix> is not
21 // used in Suffix.cpp, the only other translation unit that
22 // includes affix_list_view_item.tcc, so even without the "extern
23 // template" declaration the methods happen to be instantiated only
26 /// A list view item for prefixes.
28 Contains all the necessary variables needed when displaying a
29 prefix and its data in a list view.
31 typedef linguistica::affix_list_view_item
<CPrefix
> CPrefixListViewItem
;
33 /// A string represention of prefixes.
35 This class is a string representation of prefixes.
38 class CPrefix
: public CAffix
43 //--------------------------------------------------
44 // Constructors/Destructor
45 //--------------------------------------------------
47 CPrefix ( class CMiniLexicon
* mini
= NULL
);
48 // CPrefix (const QString);
49 CPrefix (const CStringSurrogate
&, class CMiniLexicon
* mini
= NULL
);
53 //--------------------------------------------------
54 // Public accessor methods
55 //--------------------------------------------------
57 void ListDisplay(class Q3ListView
*, QMap
<QString
, QString
>* = NULL
, int char_count
= 27 );
58 CParse
& Express( CParse
& Output
, bool DisplayDeletees
= true );
59 void OutputPrefix( class Q3TextStream
& );
60 QString
ExpressPrefix ();
62 //--------------------------------------------------
63 // Public mutator methods
64 //--------------------------------------------------
66 void MergeMeWithMyStems ( class CMiniLexicon
* );
67 virtual double GetLengthOfPointerToMe();