1.0.5 • Published 5 years ago

word-analyzer v1.0.5

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

word-analyzer

This module morphologically analyze words entered as string.

'programmer' => 'noun'
'you are programming' => {
                            you: 'pronoun', 
                            are: 'verb', 
                            programming: 'noun'
                        }

Usage

It requires the external modules: "request", "request-promise" and "cheerio"

const phrase_analyzer = require('word-analyzer');

Methods

This module has one method:

  • analyze: return a string if the input in a only word o an object if it's a phrase

Example

analyze

Input:

const phrase_analyzer = require('word-analyzer');

const example1 = () => {
    phrase_analyzer.analyze('dance')
    .then(word => {
        console.log('1) ',word);
    })
    .catch()
}

const example2 = () => {
    phrase_analyzer.analyze('everybody want to program')
    .then(word => {
        console.log('2) ',object)
    })
    .catch()
}

example1()

example2()

Output:

1) verb

2) { everybody: 'pronoun',
     want: 'verb',
     to: 'preposition',
     program: 'noun' }
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago