This integration algorithm can be represented as follows: where p is one of parties mentioned in a message, m is the number of sentences that contains party p in a message, and Valence k (p) is the valence of p in the k th sentence that contains p. Given the example in Figure 2, the Liberal party appears twice in sentence S0 and S1 and its total valence score is +2, whereas the NDP party appears once in sentence S1 and its valence sum is -1.
our algorithm picks liberal as the winning party that the message predicts.