3.4.2 • Published 4 years ago
wordnok v3.4.2
wordnok
This is a wrapper that gets nouns, frequencies, and parts of speech from the Wordnik REST API.
Methods and their callback signatures:
getTopic(done)
: error, random noun.getPartsOfSpeech(word, done)
: error, part of speech string.getPartsOfSpeechForMultipleWords(wordArray, done)
: error, array of parts of speech.getWordFrequency(word, done)
: error, number.getWordFrequencies(wordArray, done)
: error, array of frequencies.
Installation
npm install wordnok
Usage
var createWordnok = require('wordnok');
var wordnok = createWordnok({
apiKey: 'kljhasdfkjahsdlfiq89243rsdhflksjdfhaskjhdf982kjhd'
});
wordnok.getPartsOfSpeechForMultipleWords(
[
'students',
'realize',
'the'
],
function done(error, parts) {
console.log(parts);
}
);
Output:
[
[
'noun'
],
[
'verb-transitive',
'verb-transitive',
'verb-transitive',
'verb-transitive'
],
[
'definite-article',
'definite-article',
'definite-article',
'definite-article'
]
]
Tests
First, create a config.js
file in the root directory that has your Wordnik API like this:
module.exports = {
wordnikAPIKey: 'kljhasdfkjahsdlfiq89243rsdhflksjdfhaskjhdf982kjhd'
};
Then, run tests with make test
.
License
MIT.
3.4.2
4 years ago
3.4.1
5 years ago
3.4.0
5 years ago
3.3.8
5 years ago
3.3.7
5 years ago
3.3.6
5 years ago
3.3.5
6 years ago
3.3.4
6 years ago
3.3.3
6 years ago
3.3.2
6 years ago
3.3.1
7 years ago
3.3.0
7 years ago
3.2.0
8 years ago
3.1.0
8 years ago
3.0.0
8 years ago
2.3.1
9 years ago
2.3.0
9 years ago
2.2.1
9 years ago
2.2.0
9 years ago
2.1.0
9 years ago
2.0.0
9 years ago
1.1.0
9 years ago
1.0.0
9 years ago