Summary.js

JS module for making short summary of some text

View the Project on GitHub kostyll/summary.js

Summary.js

This algorithm was found in the Internet at http://thetokenizer.com/2013/04/28/build-your-own-summary-tool/ As at this moment I try to implement add-on for Firefox, and some function I've needed was to summarize web-content.

So the main Idea of the algorithm is to build matrix of mutual sentences intersection which is calculates by counting the same words in two sections and division this count with avarage sentence length in words.

Than we summarize intersactions for every sentence and with this value choise what sentence should be used in summary.

This algorithm I've implemented in javascript, so the source is at https://github.com/kostyll/summary.js

Functions in the future

My Idea in future:

if there is ability to detect source language (module detects it) the library process text with general algorithm, but before makes preprocessing by removing stop-words from content - in other case - just uses this general algorithm

Demo

Demo is over here: http://kostyll.github.io/summary.js/demo.html