]> git.lyx.org Git - lyx.git/blob - src/Thesaurus.h
Andre's mathinset shrink patch ; default .lyx extension when loading files
[lyx.git] / src / Thesaurus.h
1 /**
2  * \file Thesaurus.h
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon
7  */
8
9 #ifndef THESAURUS_H
10 #define THESAURUS_H
11  
12 #include <vector>
13
14 #include <config.h>
15  
16 #include "LString.h"
17 #ifdef HAVE_LIBAIKSAURUS
18 #include "AikSaurus.h"
19 #endif
20  
21 /**
22  * This class provides an interface to whatever thesauri we might support.
23  */
24
25 class Thesaurus {
26 public:
27         ///
28         Thesaurus();
29         ///
30         ~Thesaurus();
31
32         /**
33          * enum of possible part of speech types
34          */
35         enum POS {
36                 NONE = 0x0,
37                 OTHER = 0x01,
38                 NOUN = 0x02,
39                 VERB = 0x04,
40                 ADJECTIVE = 0x08,
41                 ADVERB = 0x10
42         };
43
44         /**
45          * an individual entry from the thesaurus 
46          */
47         struct ThesaurusEntry {
48                 /// 
49                 ThesaurusEntry(const string & ent, char pos); 
50                 /// the actual entry 
51                 string entry;
52                 /// entry's part of speech
53                 int pos;
54         };
55
56         /**
57          * look up some text in the thesaurus
58          */
59         std::vector<ThesaurusEntry> lookup(string const & text);
60
61 private:
62 #ifdef HAVE_LIBAIKSAURUS
63         AikSaurus * aik_;
64 #endif
65 };
66  
67 extern Thesaurus thesaurus;
68  
69 #endif