3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
11 #include "Thesaurus.h"
13 #ifdef HAVE_LIBAIKSAURUS
19 Thesaurus::Thesaurus()
25 Thesaurus::~Thesaurus()
31 Thesaurus::Meanings Thesaurus::lookup(string const & text)
35 if (!aik_->find(text.c_str()))
40 int prev_meaning = -1;
44 // correct, returns "" at the end
45 string ret = aik_->next(cur_meaning);
47 while (!ret.empty()) {
48 if (cur_meaning != prev_meaning) {
50 ret = aik_->next(cur_meaning);
51 prev_meaning = cur_meaning;
54 meanings[meaning].push_back(ret);
58 ret = aik_->next(cur_meaning);
61 for (Meanings::iterator it = meanings.begin();
62 it != meanings.end(); ++it) {
63 sort(it->second.begin(), it->second.end());
71 Thesaurus::Thesaurus()
76 Thesaurus::~Thesaurus()
81 Thesaurus::Meanings Thesaurus::lookup(string const &)
86 #endif // HAVE_LIBAIKSAURUS