3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
13 #ifdef HAVE_LIBAIKSAURUS
15 Thesaurus::ThesaurusEntry::ThesaurusEntry(string const & ent, char part)
16 : entry(ent), pos(Thesaurus::NONE)
18 if (part & AikSaurus::Unknown) pos |= OTHER;
19 if (part & AikSaurus::Other) pos |= OTHER;
20 if (part & AikSaurus::Noun) pos |= NOUN;
21 if (part & AikSaurus::Verb) pos |= VERB;
22 if (part & AikSaurus::Adjective) pos |= ADJECTIVE;
23 if (part & AikSaurus::Adverb) pos |= ADVERB;
27 Thesaurus::Thesaurus()
29 aik_ = new AikSaurus();
33 Thesaurus::~Thesaurus()
39 std::vector<Thesaurus::ThesaurusEntry> Thesaurus::lookup(string const & text)
41 std::vector<ThesaurusEntry> entries;
43 if (!aik_->find(text.c_str()))
49 ret = aik_->next(pos);
50 while (!ret.empty()) {
51 entries.push_back(ThesaurusEntry(ret, pos));
52 ret = aik_->next(pos);
60 Thesaurus::ThesaurusEntry::ThesaurusEntry(string const &, char)
65 Thesaurus::Thesaurus()
70 Thesaurus::~Thesaurus()
75 std::vector<Thesaurus::ThesaurusEntry>
76 Thesaurus::lookup(string const & /*text*/)
78 return std::vector<ThesaurusEntry>();
81 #endif // HAVE_LIBAIKSAURUS