You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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");
^
The text was updated successfully, but these errors were encountered:
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");
^
The text was updated successfully, but these errors were encountered: