Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Latest commit

 

History

History
35 lines (21 loc) · 1.81 KB

README.md

File metadata and controls

35 lines (21 loc) · 1.81 KB

Summarizer

A simple text summarization in java

The summary consists of relevant sentences from each paragraph. After several processes, such as stop word removal, stemming or lemmatization, sentences are compared to each other or to the title to determine the most relevant ones.

Examples

Using NASA article about black holes.

Without title

java Summarizer text-sample.txt

    Don't let the name fool you: a black hole is anything but empty space.Although the term was not coined until 1967 by Princeton physicist John Wheeler, the idea of an object in space so massive and dense that light could not escape it has been around for centuries.Scientists can't directly observe black holes with telescopes that detect x-rays, light, or other forms of electromagnetic radiation.Most black holes form from the remnants of a large star that dies in a supernova explosion.Even bigger black holes can result from stellar collisions.

Sample without title

Using title

java Summarizer text-sample.txt "black holes"

    Don't let the name fool you: a black hole is anything but empty space.If the core's mass is more than about three times the mass of the Sun, the equations showed, the force of gravity overwhelms all other forces and produces a black hole.In this case, the black hole can tear the star apart as it pulls it toward itself.Most black holes form from the remnants of a large star that dies in a supernova explosion.Even bigger black holes can result from stellar collisions.```

Sample using title

Dependencies

The project depends on OpenNLP