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"
15 #ifdef HAVE_LIBAIKSAURUS
21 Thesaurus::Thesaurus()
27 Thesaurus::~Thesaurus()
33 Thesaurus::Meanings Thesaurus::lookup(string const & text)
37 if (!aik_->find(text.c_str()))
42 int prev_meaning = -1;
46 // correct, returns "" at the end
47 string ret = aik_->next(cur_meaning);
49 while (!ret.empty()) {
50 if (cur_meaning != prev_meaning) {
52 ret = aik_->next(cur_meaning);
53 prev_meaning = cur_meaning;
56 meanings[meaning].push_back(ret);
60 ret = aik_->next(cur_meaning);
63 for (Meanings::iterator it = meanings.begin();
64 it != meanings.end(); ++it) {
65 sort(it->second.begin(), it->second.end());
73 Thesaurus::Thesaurus()
78 Thesaurus::~Thesaurus()
83 Thesaurus::Meanings Thesaurus::lookup(string const &)
88 #endif // HAVE_LIBAIKSAURUS