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.
Using NASA article about black holes.
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.
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.```
The project depends on OpenNLP