Skip to main content

A metric to evaluate empathy in dialogue systems

Project description

EASE Metric

easekit is a composite metric to evaluate empathy in dialogue systems. It incorporates:

  • Semantic Relevance
  • Sentiment Alignment
  • Contextual Word Overlap

Installation

pip install easekit

To use the metric:

from transformers import AutoTokenizer, AutoModel
from easekit import compute_empathy_score

context = "I am very upset"
response = "Why? Is everything alright?"
reference = "Why? What happened?"

model_name = "sentence-transformers/paraphrase-MiniLM-L6-v2"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModel.from_pretrained(model_name)

result = compute_empathy_score(context, response, reference, model, tokenizer)
print(result)

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

easekit-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

easekit-1.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file easekit-1.0.0.tar.gz.

File metadata

  • Download URL: easekit-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for easekit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0bea54eab24c69adae35deaf21998806323fd834359331e8b959d73004fbc776
MD5 467c71669b66f7378a80d676174e3664
BLAKE2b-256 2a0f1a6532c5a4e2af401c3045753a1888b91cd0d43df25a44a036e519e88cc9

See more details on using hashes here.

File details

Details for the file easekit-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: easekit-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for easekit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8318ea6daf7e83b777ff0b224f8208a18c839ebfb83f7d0650115910265dad1
MD5 fde36d401c0603f9c6d64424ce69af48
BLAKE2b-256 e608aefc3a03f42060e521df01e642c2040e80e38ed3873109e2d068d0cc74ec

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