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.Link to the articleI 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! :) 
Understanding a formula on article
algorithms;algorithm analysis
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.