Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Creates a summary for articles
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.editorconfig
.gitignore
.travis.yml
Gruntfile.js
LICENSE
README.md
package.json

README.md

JsTeaser

Creates a brief four line summary of an article, constructued from sentences within the article. Relies on an algorithm that ranks article body sentences on relation to header, and other sentences.

Build Status

About

A port of the PyTeaser project (https://github.com/xiaoxu193/PyTeaser) to Javascript. PyTeaser was a port of the TextTeaser project (https://github.com/MojoJolo/textteaser) to Python from Scala.

Installation

npm install jsteaser

Example

var JsTeaser = require('jsteaser');

var article = {
  title: 'This is the article title',
  text:  'This is the article body.'

var jsteaser = new JsTeaser(article);
var summary  = jsteaser.summarize();

console.log(summary);

API

Constructor JsTeaser() takes an article object with two fields - title and text. Call method summarize() to get the summarization

Limitations

Needs to be further tweaked to get better results.

License

(The MIT License)

Copyright (c) 2013 Abdulla Faraz abdulla.faraz@gmail.com

Test Case, stop words and algorithm from the PyTeaser Project

(The MIT License)

Copyright (c) 2013 Xiao Xu

Refer to included License file

Something went wrong with that request. Please try again.