# Sentiment Analysis with respect to subject

I'm familiar with the bag of words/Naive bayes sentiment analysis for text (e.g. http://streamhacker.com/2010/05/10/text-classification-sentiment-analysis-naive-bayes-classifier/)

I was curious to see if anyone here knows anything about computing sentiment of a sentence with respect to a subject. For example, with respect to the word 'Joe', the sentence

"I am happy" is neutral sentiment whereas "Joe is happy" is positive sentiment

Do the traditional bag of words features work for this type of sentiment classification? or is a more sophisticated feature set necessary?

Thanks!