3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "Thesaurus.h"
23 #ifdef HAVE_LIBAIKSAURUS
28 Thesaurus::Thesaurus()
33 Thesaurus::~Thesaurus()
39 Thesaurus::Meanings Thesaurus::lookup(string const & text)
43 if (!aik_->find(text.c_str()))
48 int prev_meaning = -1;
52 // correct, returns "" at the end
53 string ret = aik_->next(cur_meaning);
55 while (!ret.empty()) {
56 if (cur_meaning != prev_meaning) {
58 ret = aik_->next(cur_meaning);
59 prev_meaning = cur_meaning;
62 meanings[meaning].push_back(ret);
66 ret = aik_->next(cur_meaning);
69 for (Meanings::iterator it = meanings.begin();
70 it != meanings.end(); ++it) {
71 sort(it->second.begin(), it->second.end());
79 Thesaurus::Thesaurus()
84 Thesaurus::~Thesaurus()
89 Thesaurus::Meanings Thesaurus::lookup(string const &)
94 #endif // HAVE_LIBAIKSAURUS