-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSentimentUnit.java
24 lines (20 loc) · 894 Bytes
/
SentimentUnit.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// each opinion extracted from any sentiment analysis system
// is represented by this class
public class SentimentUnit{
// we can add more public attributes, if needed
public String sentenceSpan; // span of the sentence containing this opinion
public String opinSpan; // span of the opinion expression
public String holderSpan; // span of the holder
public String targetSpan; // span of the target
public String polarity; // polarity, pos or neg
public double confidenceScore; // confidence score of the extracted opinion
public SentimentUnit(String sentenceSpan, String opinSpan, String holderSpan,
String targetSpan, String polarity, double confidenceScore){
this.sentenceSpan = sentenceSpan;
this.opinSpan = opinSpan;
this.holderSpan = holderSpan;
this.targetSpan = targetSpan;
this.polarity = polarity;
this.confidenceScore = confidenceScore;
}
}