# Understanding a formula on article

I just read an article "Statistical approach for figurative sentiment analysis on Social Networking Services: a case study on Twitter", which provide an algorithm to analyze tweets, and this article includes 2 formulas which I don't really understand.

I hope maybe someone here can help me.

• The first formula is the (4) formula (Page 5)

• The second formula is the (6) formula (Page 8)

I will be very thankful if someone will help me with this.

Examples will be most welcome! :)

• It appears that these are just definitions. What kind of explanations are you looking for? – Yuval Filmus Mar 25 '17 at 20:22
• @YuvalFilmus ​Hi, Thank you, I know it's definition but I'm not sure about couple of things - 1st - Does the X means multiplication or cartesian product? 2nd - what exactly those the "t" means? The length of the tweet or all of the words? How can I know the probability or the score of the term? – Dvir Naim Mar 26 '17 at 6:57
• @YuvalFilmus עכשיו ראיתי שאתה מהטכניון.. זה חלק מעבודת הסמינריון שלי.. בכ"מ - זה נראה כאילו חסרים שם פרמטרים או הסברים לגבי חלק מהמשתנים.. – Dvir Naim Mar 26 '17 at 7:06
• I suggest discussing this with your supervisor. – Yuval Filmus Mar 26 '17 at 8:08

Each tweet and each cluster is represented as an $m_k$-dimensional vector. The distance between a tweet $t_k$ and a cluster $\delta$ is then $$dis(t_k,\delta) = 1 - \frac{\langle t_k, \delta \rangle}{\|t_k\| \|\delta\|},$$ where $\langle a,b \rangle = \sum_{i=1}^{m_k} a_i b_i$ is the inner product and $\|a\| = \sqrt{\langle a,a \rangle}$ is the norm. This explains equation (4).

The definition of $P(S_t|w)$ is given below (6):

$P(S_t|w)$ is the probability that a term has a score with the given tweet score.

This is the number of tweets containing $w$ which have score $S_t$ divided by the total number of tweets containing $w$.

The rest of the formula is hopefully self-explanatory ($\times$ is just ordinary multiplication).

If you have any more questions, I suggest contacting the authors.

• but "tk" is always <1,1,1,1....1> isn't it? – Dvir Naim Mar 26 '17 at 10:40
• Probably not. There are 1s only for the terms that appear in the tweet. – Yuval Filmus Mar 26 '17 at 10:46