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
Branches containing commit
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 @@
<file
leaf-file-name=
"README.md"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
48
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
"
/>
<state
relative-caret-position=
"
36
0"
>
<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
/>
</state>
</provider>
...
...
@@ -489,12 +489,12 @@
<workItem
from=
"1480638593636"
duration=
"502000"
/>
<workItem
from=
"1480639104215"
duration=
"1864000"
/>
<workItem
from=
"1480641007400"
duration=
"133000"
/>
<workItem
from=
"1480641193493"
duration=
"
238
000"
/>
<workItem
from=
"1480641193493"
duration=
"
435
000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"3
188
000"
/>
<option
name=
"totallyTimeSpent"
value=
"3
385
000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"0"
y=
"22"
width=
"1906"
height=
"970"
extended-state=
"0"
/>
...
...
@@ -688,8 +688,8 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
48
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
"
/>
<state
relative-caret-position=
"
36
0"
>
<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
/>
</state>
</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'.
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 negative
0 when the overall sentiment of the sentence is neutral
The code uses two lexicons for sentiment computation:
1) BingLiu's lexicon at http://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html
Please cite one of the following two papers:
Minqing Hu and Bing Liu. "Mining and Summarizing Customer Reviews."
Proceedings of the ACM SIGKDD International Conference on Knowledge
Discovery and Data Mining (KDD-2004), Aug 22-25, 2004, Seattle,
Washington, USA,
Bing Liu, Minqing Hu and Junsheng Cheng. "Opinion Observer: Analyzing
and Comparing Opinions on the Web." Proceedings of the 14th
International World Wide Web conference (WWW-2005), May 10-14,
2005, Chiba, Japan.
Minqing Hu and Bing Liu(2004). Mining and Summarizing Customer Reviews. Proceedings of
the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining
(KDD-2004), Aug 22-25, 2004, Seattle, Washington, USA.
Bing Liu, Minqing Hu and Junsheng Cheng (2005). Opinion Observer: Analyzing and Comparing Opinions on the Web.
Proceedings of the 14th International World Wide Web conference (WWW-2005), May 10-14, 2005, Chiba, Japan.
2) MPQA lexicon
Please cite:
Theresa Wilson, Janyce Wiebe and Paul Hoffmann (2005). Recognizing Contextual
...
...
@@ -30,11 +33,17 @@ Please cite:
Example of how to use this class
public void demo() throws Exception{
SentimentHandler sentimentHandler = new SentimentHandler();
String sent = "She thought she was not happy.";
Pair<Integer, Integer> happ = sentimentHandler.getHappiness(sent);
System.out.println("Happiness according to BingLiu Lexicon: "+happ.getFirst());
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