Closed christopheradorna closed 6 months ago
@christopheradorna will look it up this weekend, looks like a bug.
@christopheradorna: The following three lines found in the documentation example are wrong:
const wordnet = require('en-wordnet')
const Dictionary = require('./index')
const dictionary = new Dictionary(wordnet['3.0'])
Replace them with these lines instead:
const wordnet = require('en-wordnet').default
const Dictionary = require('en-dictionary').default
const dictionary = new Dictionary(wordnet.get('3.0'))
These changes will fix both of the error messages you were getting.
The library is using ES6 module import/export syntax but it's not declared in package.json
. @sudhanshuraheja might try adding "type": "module"
.
@christopheradorna the documentation has been fixed. (Thanks @lamansky) @rektdeckard this has now been updated.
Using example of:
produces:
So, I tried another way in:
Which produces:
Thoughts?