Git Product home page Git Product 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

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.