Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SentimentAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CogComp
SentimentAPI
Commits
abf4a7c6
Commit
abf4a7c6
authored
8 years ago
by
snigdha
Browse files
Options
Downloads
Patches
Plain Diff
updated readme
parent
83164867
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.idea/workspace.xml
+6
-6
6 additions, 6 deletions
.idea/workspace.xml
README.md
+17
-8
17 additions, 8 deletions
README.md
with
23 additions
and
14 deletions
.idea/workspace.xml
+
6
−
6
View file @
abf4a7c6
...
@@ -51,8 +51,8 @@
...
@@ -51,8 +51,8 @@
<file
leaf-file-name=
"README.md"
pinned=
"false"
current-in-tab=
"true"
>
<file
leaf-file-name=
"README.md"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
48
0"
>
<state
relative-caret-position=
"
36
0"
>
<caret
line=
"
3
2"
column=
"
63
"
selection-start-line=
"
3
2"
selection-start-column=
"
63
"
selection-end-line=
"
3
2"
selection-end-column=
"
63
"
/>
<caret
line=
"2
4
"
column=
"
0
"
selection-start-line=
"2
4
"
selection-start-column=
"
0
"
selection-end-line=
"2
4
"
selection-end-column=
"
0
"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
...
@@ -489,12 +489,12 @@
...
@@ -489,12 +489,12 @@
<workItem
from=
"1480638593636"
duration=
"502000"
/>
<workItem
from=
"1480638593636"
duration=
"502000"
/>
<workItem
from=
"1480639104215"
duration=
"1864000"
/>
<workItem
from=
"1480639104215"
duration=
"1864000"
/>
<workItem
from=
"1480641007400"
duration=
"133000"
/>
<workItem
from=
"1480641007400"
duration=
"133000"
/>
<workItem
from=
"1480641193493"
duration=
"
238
000"
/>
<workItem
from=
"1480641193493"
duration=
"
435
000"
/>
</task>
</task>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TimeTrackingManager"
>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"3
188
000"
/>
<option
name=
"totallyTimeSpent"
value=
"3
385
000"
/>
</component>
</component>
<component
name=
"ToolWindowManager"
>
<component
name=
"ToolWindowManager"
>
<frame
x=
"0"
y=
"22"
width=
"1906"
height=
"970"
extended-state=
"0"
/>
<frame
x=
"0"
y=
"22"
width=
"1906"
height=
"970"
extended-state=
"0"
/>
...
@@ -688,8 +688,8 @@
...
@@ -688,8 +688,8 @@
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
48
0"
>
<state
relative-caret-position=
"
36
0"
>
<caret
line=
"
3
2"
column=
"
63
"
selection-start-line=
"
3
2"
selection-start-column=
"
63
"
selection-end-line=
"
3
2"
selection-end-column=
"
63
"
/>
<caret
line=
"2
4
"
column=
"
0
"
selection-start-line=
"2
4
"
selection-start-column=
"
0
"
selection-end-line=
"2
4
"
selection-end-column=
"
0
"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
...
...
This diff is collapsed.
Click to expand it.
README.md
+
17
−
8
View file @
abf4a7c6
This class takes a sentence as input and outputs its 'happiness'.
This class takes a sentence as input and outputs its 'happiness'.
Happiness is a categorical variables that takes values:
Happiness is a categorical variables that takes values:
1 when the overall sentiment of the sentence is positive
1 when the overall sentiment of the sentence is positive
-1 when the overall sentiment of the sentence is negative
-1 when the overall sentiment of the sentence is negative
0 when the overall sentiment of the sentence is neutral
0 when the overall sentiment of the sentence is neutral
The code uses two lexicons for sentiment computation:
The code uses two lexicons for sentiment computation:
1) BingLiu's lexicon at http://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html
1) BingLiu's lexicon at http://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html
Please cite one of the following two papers:
Please cite one of the following two papers:
Minqing Hu and Bing Liu. "Mining and Summarizing Customer Reviews."
Minqing Hu and Bing Liu(2004). Mining and Summarizing Customer Reviews. Proceedings of
Proceedings of the ACM SIGKDD International Conference on Knowledge
the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining
Discovery and Data Mining (KDD-2004), Aug 22-25, 2004, Seattle,
(KDD-2004), Aug 22-25, 2004, Seattle, Washington, USA.
Washington, USA,
Bing Liu, Minqing Hu and Junsheng Cheng. "Opinion Observer: Analyzing
Bing Liu, Minqing Hu and Junsheng Cheng (2005). Opinion Observer: Analyzing and Comparing Opinions on the Web.
and Comparing Opinions on the Web." Proceedings of the 14th
Proceedings of the 14th International World Wide Web conference (WWW-2005), May 10-14, 2005, Chiba, Japan.
International World Wide Web conference (WWW-2005), May 10-14,
2005, Chiba, Japan.
2) MPQA lexicon
2) MPQA lexicon
Please cite:
Please cite:
Theresa Wilson, Janyce Wiebe and Paul Hoffmann (2005). Recognizing Contextual
Theresa Wilson, Janyce Wiebe and Paul Hoffmann (2005). Recognizing Contextual
...
@@ -30,11 +33,17 @@ Please cite:
...
@@ -30,11 +33,17 @@ Please cite:
Example of how to use this class
Example of how to use this class
public void demo() throws Exception{
public void demo() throws Exception{
SentimentHandler sentimentHandler = new SentimentHandler();
SentimentHandler sentimentHandler = new SentimentHandler();
String sent = "She thought she was not happy.";
String sent = "She thought she was not happy.";
Pair<Integer, Integer> happ = sentimentHandler.getHappiness(sent);
Pair<Integer, Integer> happ = sentimentHandler.getHappiness(sent);
System.out.println("Happiness according to BingLiu Lexicon: "+happ.getFirst());
System.out.println("Happiness according to BingLiu Lexicon: "+happ.getFirst());
System.out.println("Happiness according to MPQA Lexicon: "+happ.getSecond());
System.out.println("Happiness according to MPQA Lexicon: "+happ.getSecond());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment