Coder Social home page Coder Social logo

summarization-eval's Introduction

Summarization Evaluation

Elegantly automate text summarization evaluation in reference-free manner with potential hallucination detection.

Demo 1 Demo 2

Features

  • Easy to Use: Simply provide a text file containing the summary to be evaluated, and the script will handle the rest.
  • Custom Metrics: Utilize metrics such as word overlap and Jaccard similarity for in-depth content analysis.
  • Hallucination Detection: Systematically identify hallucinated content in summaries by analyzing semantic discrepancies with the original text, also use new word detection to identify potentially hallucinated summaries.If you came here for this just check detect_hallucinations under src/utils.py.
  • GPT-based Evaluation: Use GPT for nuanced qualitative assessments of summaries which takes care of json enforcement with pydantic, for easier parsing.
  • Adapted ROUGE & BERTScore: Rework traditional metrics for use in a reference-free context, focusing on the intrinsic qualities of summaries, as highlighted in Eugene Yan's writing.
  • Extensible: Easily add new metrics and models to the project to expand its capabilities, open an issue or a PR if you want to add something.

Installation

Clone the repository and install dependencies:

git clone https://github.com/Muhtasham/summarization-eval
cd summarization-eval
pip install -r requirements.txt

Usage

To use the main.py script under src, simply provide a text file containing the text you want to summarize. The script reads the file, generates summary, processes the summary, and outputs the evaluation results in a structured and readable format in the terminal.

Example:

python main.py --file-path "assets/news.txt"

Note: You will need to have an OpenAI API key set up in your environment to run the script.

Contributing

Contributions to enhance and expand this project are welcome. Please see the CONTRIBUTING.md file for guidelines on how to contribute.

License

This project is licensed under the MIT License.

summarization-eval's People

Contributors

muhtasham avatar

Stargazers

Feng Yi avatar  avatar  avatar Chakshu Gautam avatar Arda Andırın avatar Mauro Risonho de Paula Assumpção avatar Sulav Khadka avatar Kartik avatar Onat Kaya avatar  avatar Charaf ZGUIOUAR avatar Oliver Pfaffel avatar  avatar Glavin Wiechert avatar Stephen Lizcano avatar Nischal Mainali avatar  avatar  avatar Markus Rauhalahti avatar  avatar Govind Gnanakumar avatar Leonard avatar Manuel Romero avatar Carolina Camassa avatar Drew Dresser avatar  avatar Felix Rosencrantz avatar  avatar Anubhav avatar  avatar gradetwo avatar  avatar Patrick Arnecke avatar GILLES Annthomy avatar DerekHe avatar Ivan Malopinsky avatar  avatar Othmane Abou Amal avatar stewart hu avatar ab avatar John avatar Praveen Sridhar avatar Yip Yew Mun avatar  avatar Keegan McCallum avatar  avatar Ravi Mandliya avatar  avatar CognitiveTech avatar kyle avatar Chad Boyda avatar Sina Booeshaghi avatar  avatar  avatar Jacob Braswell avatar Jongsu Liam Kim avatar Surya Avala avatar Stefan avatar Kevin Armengol avatar  avatar Shubham Singh avatar Manikandan Sivanesan` avatar Bharath (Jai) Chintagunta avatar Asim Shah avatar Ajay Rajasekharan avatar Umang Bhalla avatar Rodrigo Baron avatar Jeffrey Konowitch avatar Matthew Hendrey avatar  avatar  avatar Juan Pablo Balarini avatar  avatar Yasuhiro Morioka avatar Devansh Amin avatar  avatar Ata Karagoz avatar  avatar Satyam Tiwary avatar Askar Yusupov avatar Martin Elstner avatar Meet Shah  avatar M. Sami Yavuz avatar Daniel Fenton avatar Cem Turan avatar Chronos avatar Marc J. Schmidt avatar Michael Feil avatar Nozir avatar Osman Berke Guney avatar  avatar M. Enes ŞİMŞEK avatar

Watchers

 avatar Ankush Singal avatar Kostas Georgiou avatar zahuang923 avatar

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.