Git Product home page Git Product logo

rake-js's Introduction

RAKE.js

A pure JS implementation of the Rapid Automated Keyword Extraction (RAKE) algorithm. Put in any text corpus, get back a bunch of keyphrases and keywords.

TypeScript Build Status styled with prettier License: LGPL v3

Currently supported languages:

  • english
  • german
  • spanish
  • italian
  • dutch
  • portugese
  • swedish

More languages are fairly easy to add, see the stoplist module for details.

How to use

Without any further options:

  import rake from 'rake-js'

  const myKeywords = rake(someTextContent) // ['keyword1, ...]

When the language is known in advance (faster execution):

  import rake from 'rake-js'

  const myKeywords = rake(someTextContent, { language: 'english' })

When the corpus is divided by something other than whitespace (eg: ;):

  import rake from 'rake-js'

  const myKeywords = rake(someTextContent, { delimiters: [';+'] })

Implementation Details

This algorithm is fast, compared with other approaches like TextRank. The results are surprisingly good for a cross-language algorithm, and the truly relevant keywords / phrases are included in the result in most cases. For more details about the RAKE algorithm, read the original paper.

There are still rough edges in the code, but I tried to translate the abstract algorithm into a solid software package, tested and typesafe. Actually I wrote this thing because I was very disappointed with all the existing solutions on NPM, and I hope this repository is easier to contribute to in the future.

Roadmap:

  • support more languages (only handful are whitelisted for now)
  • duplicate keyword filtering
  • check browser compatibility

LICENSE:

LGPL-3.0.

You can use this package in all your free or commercial products without any issues, but I want bugfixes and improvements to this algorithm to flow back into the public code repository.

rake-js's People

Contributors

anonyfox avatar

Watchers

James Cloos avatar Lin avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.