wordnet-blast icon indicating copy to clipboard operation
wordnet-blast copied to clipboard

error: ‘pos_t’ is not a class or namespace

Open tejasvi opened this issue 5 years ago • 0 comments

p.cpp

#include "wnb/core/wordnet.hh" #include "wnb/nltk_similarity.hh"

using namespace std; using namespace wnb;

int main() { wordnet wn = wordnet("/usr/bin/", true);

vector synsets1 = wn.get_synsets("cat", 1); vector synsets2 = wn.get_synsets("dog", 1);

nltk_similarity similarity(wn); float d = similarity(synsets1[0], synsets2[0], 6);

}

Output

user@cclab-OptiPlex-5055-Ryzen-CPU:~$ gcc p.cpp In file included from p.cpp:1:0: wnb/core/wordnet.hh:89:74: error: ‘pos_t’ is not a class or namespace std::vector get_synsets(const std::string& word, pos_t pos = pos_t::UNKNOWN); ^ p.cpp: In function ‘int main()’: p.cpp:11:49: error: call to ‘std::vectorwnb::synset wnb::wordnet::get_synsets(const string&, wnb::pos_t)’ uses the default argument for parameter 2, which is not yet defined vector synsets1 = wn.get_synsets("cat"); ^ p.cpp:12:49: error: call to ‘std::vectorwnb::synset wnb::wordnet::get_synsets(const string&, wnb::pos_t)’ uses the default argument for parameter 2, which is not yet defined vector synsets2 = wn.get_synsets("dog"); ^

tejasvi avatar Apr 09 '19 11:04 tejasvi