Giter Site home page Giter Site logo

unwumbo's Introduction

Unwumbo

Unwumbo

Unwumbo is a Python program that summarizes text.

How it works

The program works in the following way:

  • All the words in the inputted text are put into a list.

  • Common English words such as articles (the, a, an) and prepositions (of, at) are removed from the list.

  • A dictionary is created from the list of words, with each key being a unique word from the list. The value of a key is the number of times that key (word) appears in the list.

  • A second list is created from the inputted text, with each index holding a sentence from the text.

  • The most relevant sentences are determined from the list of sentences by scoring each sentence.

    • A sentence is scored by summing the values of each word in the sentence. The values are obtained from the dictionary.
  • The most relevant sentences (plus the very first sentence) are returned in chronological order.

Demo

Command Line

To use Unwumbo from the command line, open up a terminal and type python3 unwumbo.py -f in the directory where unwumbo.py is located. You will then be prompted to enter the name of the text file you want summarized. Either enter the file's absolute path or its relative path. Finally, enter the number of sentences you would like to read.

Gif 1

GUI

To use Unwumbo via a GUI, open up a terminal and type python3 gui.py in the directory where gui.py is located. A GUI window will pop up and give you the option to summarize a file, or summarize text inputted via the keyboard. Depending on which option you choose, either enter the file name (absolute or relative path), or enter your own text. The GUI option will always output 5 sentences.

Gif 2

unwumbo's People

Contributors

haseebt avatar

Watchers

James Cloos avatar

Forkers

osssp

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.