YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
ConceptFrameMet: Metaphor Detection with Frame and Source Domain Prediction
A comprehensive metaphor detection model that predicts semantic frames and source domains
Model Description
ConceptFrameMet is a metaphor detection model which not only detects metaphors but also predicts:
- Metaphor Classification: Whether a target word is used metaphorically or literally
- Semantic Frames: The conceptual frame evoked by the target word
- Source Domains: The source domain of the metaphor (for metaphorical uses)
Please see https://github.com/julia-nixie/ConceptFrameMet and PAPER LINK for details.
Model Architecture
- Base Model: RoBERTa-base
- Architecture: MelBERT with adaptive source domain integration
- Training Data: VUA18 metaphor corpus
- Configuration:
- Source blend mode: replacement
- Source use mode: metaphor_only
- Metaphor threshold: 0.5
Performance
Evaluated on standard metaphor detection benchmarks:
| Dataset | F1 Score | Accuracy |
|---|---|---|
| VUA18 | 0.767 | 0.930 |
| MOH-X | 0.814 | 0.803 |
| TroFi | 0.633 | 0.605 |
Quick Start
Installation
pip install transformers torch
Basic Usage
from transformers import RobertaTokenizer
import torch
# Load model and tokenizer
model_path = "nixie1981/ConceptFrameMet"
tokenizer = RobertaTokenizer.from_pretrained(model_path)
# Example sentence
sentence = "The company is navigating through troubled waters"
target_word = "navigating"
# Predict metaphor with frame and source
result = predict_metaphor(sentence, target_word)
print(f"Is Metaphor: {result['is_metaphor']}")
print(f"Confidence: {result['metaphor_confidence']:.2f}")
print(f"Semantic Frame: {result['frame']}")
print(f"Source Domain: {result['source']}")
Expected Output
Is Metaphor: True
Confidence: 0.92
Semantic Frame: Self_motion
Source Domain: JOURNEY
Use Cases
- Metaphor Detection: Identify metaphorical language in text
- Frame Analysis: Understand conceptual frames in discourse
- Source Mapping: Identify source-target domain mappings
- Literary Analysis: Analyze figurative language patterns
- Education: Teaching metaphor comprehension
Model Inputs
The model expects:
- sentence: The full sentence containing the target word
- target_word: The specific word to analyze for metaphor
Model Outputs
The model returns a dictionary with:
is_metaphor: Boolean indicating if the target is metaphoricalmetaphor_confidence: Confidence score for metaphor prediction (0-1)frame: Predicted semantic frameframe_confidence: Confidence for frame predictionsource: Predicted source domain (for metaphors)source_confidence: Confidence for source prediction
Citation
If you use this model in your research, please cite:
@misc{conceptframemet2026,
title={ConceptFrameMet: Metaphor Detection with Frame and Source Domain Prediction},
author={Your Name},
year={2026},
url={https://huggingface.co/YOUR_USERNAME/ConceptFrameMet}
}
Contact
For questions or issues, please open an issue on the model repository or contact [your email].
- Downloads last month
- 188
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support