Skip to main content

No project description provided

Project description

INFUSE

This repository contains the code and data for EACL2024 paper: Fine-Grained Natural Language Inference Based Faithfulness Evaluation for Diverse Summarisation Tasks

INFUSE is a faithfulness evaluation approach that INcrementally reasons over a document so as to arrive at a Faithfulness Estimation of its summary. This repository contains the implementation of INFUSE, as well as Diversumm, a faithfulness evaluation benchmark on long document summarisation with diverse domains and genres and multi-document summarisation.

Should you have any queries please contact me at v1hzha17@ed.ac.uk

Quickstart

git clone https://github.com/HJZnlp/Infuse.git
cd Infuse
pip install -r requirements.txt

Example Use

Direct use

from src.infuse import INFUSE

documents=["document_a","document_b"......]
summaries=["summary_a","summary_b"......]
require_segmentation=1
require_reverse=1

model=INFUSE(YOUR_NLI_MODEL_NAME)

scorer=model.process_document_summary(documents,summaries,require_reverse,require_segmentation)
# scorer will return a nest list of scores for each summary sentence

Bash

doc_path = YOUR_DOCUMENT_PATH
sum_path = YOUR_SUMMARY_PATH
outpath = YOUR_OUTPUT_PATH
python src/infuse.py --input_doc $doc_path --input_sum $sum_path --save_address $outpath

Ensure that the document and summary are preprocessed to meet the following format criteria before running the script:

  1. Segment both the document and summary into individual sentences.
  2. Separate each sentence with a newline character ("\n").
  3. Separate each example (consisting of pairs or groups of sentences) with two newline characters ("\n\n").

Note: Replace YOUR_DOCUMENT_PATH, YOUR_SUMMARY_PATH, and YOUR_OUTPUT_PATH with the actual file paths on your system.

Citation

@inproceedings{zhang-etal-2024-fine,
    title = "Fine-Grained Natural Language Inference Based Faithfulness Evaluation for Diverse Summarisation Tasks",
    author = "Zhang, Huajian  and
      Xu, Yumo  and
      Perez-Beltrachini, Laura",
    booktitle = "Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = mar,
    year = "2024",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.eacl-long.102",
    pages = "1701--1722",
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infuz-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infuz-0.0.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file infuz-0.0.2.tar.gz.

File metadata

  • Download URL: infuz-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for infuz-0.0.2.tar.gz
Algorithm Hash digest
SHA256 633e654f1d94555ea25593773e33f8b634ee851d651938b05f727a4fbd5390da
MD5 f526ffccc1105a443e0ab7c81a296c1c
BLAKE2b-256 61392ea48e01f017fb9facdecd34309d647f51b8cc87a44d1ee61dd4744581a5

See more details on using hashes here.

File details

Details for the file infuz-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: infuz-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for infuz-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 530cb53dff5dc256847e21033e1d13404c6596b566980baaa070de2c0e4fa1bf
MD5 8cdb95e49cfa7360a5697260c9875d31
BLAKE2b-256 414fa128860e2cb3d1747d5c2727944af43ae92cc4edc7d07bf50d7ee734ad88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page