natural
natural copied to clipboard
wordnet.get not working
Hi,
The wordnet.get call - as in the following function - does not work on my mac. It does not reach the console.log(result); statement even though there are values to be processed. Running in debug mode (in Chrome) does not help.
`function lookupWordNet(word, lw_callback) { var retDetails = [];
wordnet.lookup(word, function(details) {
details.forEach(function(detail) {
var wordDetail = {
"definition": detail.def,
"synonyms": detail.synonyms,
"pos": detail.pos,
"ptrs": detail.ptrs
};
detail.ptrs.forEach(function(ptr) {
wordnet.get(ptr.synsetOffset, ptr.pos, function(result) {
console.log(result);
});
}
retDetails.push(wordDetail);
});
lw_callback(null, retDetails);
});
}`
Any help is appreciated.