Comments (4)
Thanks Tyler for the explanation.
On Nov 21, 2016, at 16:29, Tyler Rinker [email protected] wrote:
I think this may be an artifact of me trying to explain the process in symbol notation rather than as an algorithm as pseudo-code. Anyway here's how it gets calculated.
There are two chunks with n=2 before and after sentiment words. The comma stops a window around the sentiment word so we have:
chunk1 = "you're crazy"
chunk2 = "but I love you"
Now we calculate A for each which is amplification. chunk one has no amplifiers so it is not amplified. The but contractions are treated as amplifiers and so A for chunk2 is:A = ((1 - w_neg) * a)_amp.weight
A = 1_1.9*.8
A = 1.52
Where:
w_neg = neg %% 2
a = 1 + but.weightSo now we can calculate the chunk prime which I give as: c′i, j = ∑((1 + wamp + wdeamp)⋅wi, j, kp(−1)2 + wneg)
so:
chunk1' = 1 * -1 * (-1)^2 = -1
chunk2' = 2.52 * 1 * (-1)^2 = 2.52
now we can do (chunk1' + chunk2')/(n^.5):(-1 + 2.52)/sqrt(6) = .6205374
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #24 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AFeRlKB_90SEJjzMInAYgrs9CC6IPZ3Eks5rAg0cgaJpZM4K4jay.
from sentimentr.
I think this may be an artifact of me trying to explain the process in symbol notation rather than as an algorithm as pseudo-code. Anyway here's how it gets calculated.
There are two chunks with n=2 before and after sentiment words. The comma stops a window around the sentiment word so we have:
chunk1 = "you're crazy"
chunk2 = "but I love you"
Now we calculate A
for each which is amplification. chunk one has no amplifiers so it is not amplified. The but
contractions are treated as amplifiers and so A
for chunk2 is:
A = ((1 - w_neg) * a)*amp.weight
A = 1*1.9*.8
A = 1.52
Where:
w_neg = neg %% 2
a = 1 + but.weight
So now we can calculate the chunk prime which I give as: c′i, j = ∑((1 + wamp + wdeamp)⋅wi, j, kp(−1)2 + wneg)
so:
chunk1' = 1 * -1 * (-1)^2 = -1
chunk2' = 2.52 * 1 * (-1)^2 = 2.52
now we can do (chunk1' + chunk2')/(n^.5)
:
(-1 + 2.52)/sqrt(6) = .6205374
from sentimentr.
I'm going to close this for now. If you wish to explore this further feel free to re-open.
from sentimentr.
Thanks Tyler
I appreciate your promptness.
Cheers ~ Rick
On Nov 21, 2016, at 20:58, Tyler Rinker [email protected] wrote:
I'm going to close this for now. If you wish to explore this further feel free to re-open.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #24 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AFeRlL-NnbSutPDXiqylTJvp1P5ain4rks5rAkxigaJpZM4K4jay.
from sentimentr.
Related Issues (20)
- Any hint why the two emoji approaches are different and in what circumstance which one is better?! HOT 1
- Amplifiers
- polarity_dt requires words with spaces to work HOT 1
- Sentimentr split words when there is an accented character HOT 5
- Totally different results in Qdap polarity and sentiment r HOT 4
- Changing polarity of words in the dictionary HOT 2
- Question about 'highlight' HOT 1
- how to calculate sum of sentiment? HOT 1
- Question about how the dictionary was built HOT 1
- .mygsub is slow HOT 8
- Transparency for lexicon::hash_sentiment_jockers_rinker HOT 1
- What is the theoretical range for the "sentiment" variable? HOT 1
- I wonder why this sentence is recognized as positive HOT 2
- Polarity categorization? HOT 1
- relabel "black" and "white" as neutral sentiments (black is currently negative; white is labeled positive)
- Overall positive and negative scores given a piece of text
- Positive and Negative Sentiment based on German Language text HOT 1
- how to get pos, neg, neu other than ave_sentiment ?
- plot.sentiment_by ordered fix?
- N-CSR SIC code error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentimentr.