Giter Club home page Giter Club logo

Comments (4)

rtw30606 avatar rtw30606 commented on August 18, 2024 1

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.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

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.

trinker avatar trinker commented on August 18, 2024

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.

trinker avatar trinker commented on August 18, 2024

I'm going to close this for now. If you wish to explore this further feel free to re-open.

from sentimentr.

rtw30606 avatar rtw30606 commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.