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"
20 #ifdef HAVE_LIBAIKSAURUS
25 Thesaurus::Thesaurus()
31 Thesaurus::~Thesaurus()
37 Thesaurus::Meanings Thesaurus::lookup(string const & text)
41 if (!aik_->find(text.c_str()))
46 int prev_meaning = -1;
50 // correct, returns "" at the end
51 string ret = aik_->next(cur_meaning);
53 while (!ret.empty()) {
54 if (cur_meaning != prev_meaning) {
56 ret = aik_->next(cur_meaning);
57 prev_meaning = cur_meaning;
60 meanings[meaning].push_back(ret);
64 ret = aik_->next(cur_meaning);
67 for (Meanings::iterator it = meanings.begin();
68 it != meanings.end(); ++it) {
69 sort(it->second.begin(), it->second.end());
77 Thesaurus::Thesaurus()
82 Thesaurus::~Thesaurus()
87 Thesaurus::Meanings Thesaurus::lookup(string const &)
92 #endif // HAVE_LIBAIKSAURUS