keyword-extract

0.1.6 • Public • Published

keyword-extract

A NodeJS librairy which extract relevant keywords from a string.

A word is treated as relevant when it

Installation

You first need to import the librairy:

var extractor = require('../lib/keyword.js');

Usage

For now, only one function is available, but more will come soon.

extract

extractor.extract(lang, text, callback);
  • lang: the lang accronym of the text (see available languages )
  • text: the text from which the keywords should be extracted
  • callback: the callback function with the array of keywords as parameter.
// Concrete example
extractor.extract('en', 'I like goat from Paris.', function(words) {
    // Use words, the keyword array as you like here
    // It should be equal to ['Paris'] here.
});

languages

From now, the available languages are:

  • fr (french)
  • en (english)

/keyword-extract/

    Package Sidebar

    Install

    npm i keyword-extract

    Weekly Downloads

    4

    Version

    0.1.6

    License

    none

    Last publish

    Collaborators

    • alexisfasquel