shuaifan commited on
Commit
0f74f3e
·
1 Parent(s): e66854a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -0
README.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SentiWSP
2
+ ## For paper: Sentiment-Aware Word and Sentence Level Pre-training for Sentiment Analysis
3
+ We propose **SentiWSP**, a novel **Senti**ment-aware pre-trained language model with combined **W**ord-level and **S**entence-level **P**re-training tasks.
4
+ The word level pre-training task detects replaced sentiment words, via a generator-discriminator framework, to enhance the PLM's knowledge about sentiment words.
5
+ The sentence level pre-training task further strengthens the discriminator via a contrastive learning framework, with similar sentences as negative samples, to encode sentiments in a sentence.
6
+
7
+ ## Fine-tunning
8
+ You can also load our model in huggingface ([https://huggingface.co/shuaifan/SentiWSP](https://huggingface.co/shuaifan/SentiWSP-base)) to fine-tunning in sentiment analysis tasks:
9
+ ```python
10
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
11
+ import torch
12
+
13
+ tokenizer = AutoTokenizer.from_pretrained("shuaifan/SentiWSP-base")
14
+ model = AutoModelForSequenceClassification.from_pretrained("shuaifan/SentiWSP-base")