Downloads · 30 days
0
merrybabyxmas/mindcast-sd-sc-pipeline
mindcast-sd-sc-pipeline is a machine learning model from merrybabyxmas. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
한국어 텍스트를 위한 통합 감정 분석 파이프라인입니다. Sarcasm Detection과 Sentiment Classification을 결합하여 더 정확한 감정 분석을 제공합니다.
Downloads · 30 days
0
Access
Public
Updated Dec 12, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py11.8 KB · 66%
From the Hugging Face model README
한국어 텍스트를 위한 통합 감정 분석 파이프라인입니다. Sarcasm Detection과 Sentiment Classification을 결합하여 더 정확한 감정 분석을 제공합니다.
pip install torch transformers huggingface_hub numpy
from sd_sc_pipeline import load_mindcast_pipeline
# 파이프라인 로드
pipeline = load_mindcast_pipeline()
# 단일 텍스트 분석
text = "아 진짜 최고다~ 완전 망했네"
result = pipeline.predict(text)
print(f"텍스트: {text}")
print(f"Sarcasm: {result['sarcasm']['label']} ({result['sarcasm']['confidence']:.3f})")
print(f"감정: {result['final_emotion']} ({result['sentiment']['confidence']:.3f})")
print(f"사용 모델: {result['sentiment']['model_used']}")
texts = [
"오늘 정말 기분이 좋아요!",
"아 진짜 최고다~ 완전 망했네",
"너무 슬퍼서 눈물이 나요"
]
# 배치 예측
results = pipeline.predict_batch(texts)
# 감정 분포 분석
emotion_dist = pipeline.get_emotion_distribution(texts)
print("감정 분포:", emotion_dist)
# Sarcasm 분포 분석
sarcasm_dist = pipeline.analyze_sarcasm_distribution(texts)
print(f"Sarcastic 비율: {sarcasm_dist['sarcastic_ratio']:.1%}")
from sd_sc_pipeline import quick_predict
emotion = quick_predict("와~ 정말 대단하네요~")
print(emotion) # 출력: "분노" (sarcastic context에서 분석됨)
merrybabyxmas/mindcast-sarcasm-detectormerrybabyxmas/mindcast-emotion-normalmerrybabyxmas/mindcast-emotion-sarcastic| ID | 감정 | 설명 |
|---|---|---|
| 0 | 분노 | 화남, 짜증, 불쾌감 |
| 1 | 슬픔 | 우울, 실망, 좌절감 |
| 2 | 불안 | 걱정, 두려움, 긴장감 |
| 3 | 상처 | 서운함, 배신감, 아픔 |
| 4 | 당황 | 놀람, 혼란, 어리둥절 |
| 5 | 기쁨 | 행복, 만족, 즐거움 |
# GPU 사용
pipeline = load_mindcast_pipeline(device="cuda")
# 특정 GPU 사용
pipeline = load_mindcast_pipeline(device="cuda:0")
# CPU 사용
pipeline = load_mindcast_pipeline(device="cpu")
├── sd_sc_pipeline.py # 메인 파이프라인 클래스
├── __init__.py # 패키지 초기화
├── example.py # 사용 예제
├── pipeline_config.json # 설정 파일
├── requirements.txt # 의존성 목록
└── README.md # 이 문서
텍스트: 아 진짜 최고다~ 완전 망했네
Sarcasm: Sarcastic (0.892)
감정: 분노 (sarcastic model, 0.856)
텍스트: 오늘 정말 기분이 좋아요!
Sarcasm: Non-sarcastic (0.934)
감정: 기쁨 (normal model, 0.912)
이 파이프라인은 연구 및 비상업적 용도로 사용 가능합니다.
버그 리포트나 개선 제안은 Issues에서 환영합니다!
Mindcast Team | 한국어 감정 분석의 새로운 기준