We can use LSTM and Attention to encode a sentence or document for aspect sentiment analysis. We should answer two questions:
1.How to encode a word sequence using LSTM?
We can use LSTM to encode using word embeddings by concatenating aspect embeddings or not.
2.Compute word attention score using self-attention mechanism with aspect embeddings.
Here is the full tutorial!