Giter VIP home page Giter VIP logo

extractive-text-summarization-nepali's Introduction

Nepali Extractive Text Summarization using TextRank algorithm

Working of this model follows these steps

  1. Read the text.

  2. Remove useless characters from the text.

  3. Splitting text into sentences and words as array.

  4. Tokenizing individual words present.

  5. Calculating influence factor of each words.

  6. Measuring average influence of the sentence using word influence.

  7. Ranking sentences based on that influences.

  8. Re-sequencing top N influencial sentences sentences with

  9. Displaying summarized text and saving it to the output.txt file.

Installing the dependencies

This model barely uses any complicated libraries, rather it uses numpy. Version I used is given in requirements.txt. But it is more likely latest version of numpy works just fine.

pip install numpy

If you are facing any compatibility issues try:

pip install -r requirements.txt

Inferencing the model

This model can be inferenced by various ways. First step is to clone the repo.

git clone https://github.com/AnjaanKhadka/Extractive-text-summarization-Nepali.git

Then execute following code to get summary from text in sample.txt file

python main.py

This inferencing will give summarized text as:

Sample text

image

Summarized text

image

To use this model on custom text file, execute following code.

python main.py -i <path_to_your_text_file> -o <path_to_your_text_file>

Or you can execute

python main.py -t

Then CLI asks for the text input and you can get summary that way as well.

extractive-text-summarization-nepali's People

Contributors

anjaankhadka avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

noworriiies

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.