e9t/nsmc
Updated • 689 • 17
How to use blockenters/finetuned-nsmc-sentiment with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="blockenters/finetuned-nsmc-sentiment") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("blockenters/finetuned-nsmc-sentiment")
model = AutoModelForSequenceClassification.from_pretrained("blockenters/finetuned-nsmc-sentiment")이 모델은 NSMC (Naver Sentiment Movie Corpus) 데이터셋을 사용하여 한국어 감정 분석을 위해 BERT 기반으로 파인튜닝된 모델입니다.
주로 영화 리뷰와 같은 텍스트 데이터를 대상으로 긍정(positive) 또는 부정(negative) 감정을 분류합니다.
이 모델은 NSMC (Naver Sentiment Movie Corpus) 데이터를 사용하여 학습되었습니다.
0: 부정 (Negative)1: 긍정 (Positive)from transformers import pipeline
# 파이프라인 생성
model_name = "blockenters/finetuned-nsmc-sentiment"
sentiment_analyzer = pipeline("sentiment-analysis", model=model_name)
# 테스트 문장
test_sentence = "정말 최고의 영화였어요!"
result = sentiment_analyzer(test_sentence)
print(result)
# 예: [{'label': 'POSITIVE', 'score': 0.9876}]
Base model
google-bert/bert-base-multilingual-cased