Word sentiment score is a scalar in some sentiment lexicons. In a sentence, we can determine which word is important by its sentiment score in sentiment lexicon. It is same to sentences in document.
We can use softmax() function to compute that attention.
Here is the full tutorial!