3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
11 #include "Thesaurus.h"
15 #ifdef HAVE_LIBAIKSAURUS
17 Thesaurus::ThesaurusEntry::ThesaurusEntry(string const & ent, char part)
18 : entry(ent), pos(Thesaurus::NONE)
20 if (part & AikSaurus::Unknown)
22 if (part & AikSaurus::Other)
24 if (part & AikSaurus::Noun)
26 if (part & AikSaurus::Verb)
28 if (part & AikSaurus::Adjective)
30 if (part & AikSaurus::Adverb)
35 Thesaurus::Thesaurus()
41 Thesaurus::~Thesaurus()
47 std::vector<Thesaurus::ThesaurusEntry> Thesaurus::lookup(string const & text)
49 std::vector<ThesaurusEntry> entries;
51 if (!aik_->find(text.c_str()))
56 string ret = aik_->next(pos);
57 while (!ret.empty()) {
58 entries.push_back(ThesaurusEntry(ret, pos));
59 ret = aik_->next(pos);
67 Thesaurus::ThesaurusEntry::ThesaurusEntry(string const &, char)
72 Thesaurus::Thesaurus()
77 Thesaurus::~Thesaurus()
82 std::vector<Thesaurus::ThesaurusEntry>
83 Thesaurus::lookup(string const & /*text*/)
85 return std::vector<ThesaurusEntry>();
88 #endif // HAVE_LIBAIKSAURUS