nunomroliveira / stock_market_lexicon

Stock Market Lexicon
39 stars 21 forks source link

How to use the lexicon #1

Open Clara111 opened 5 years ago

Clara111 commented 5 years ago

Hello, I met some problems when I try to use the lexicon, I don't quite know how to use it. My understanding is that firstly judge the sentence is affirmative or negative, and then add the corresponding score for each word in the sentence. Finally we can get the total score of the sentence. Does it make sense?

Looking forward to your reply.

nunomroliveira commented 5 years ago

Hi.

This lexicon has a score for affirmative and negated segments for each lexical item. Thus, we should identify the affirmative and negated segments to apply the corresponding scores. In the creation of this lexicon, we applied the negation items included in the Christopher Potts' sentiment tutorial (http://sentiment.christopherpotts.net/lingstruc.html). For instance, negated contexts are text segments starting with a negation item and ending with one of the following punctuation marks: ",", ".", ":", ";", "!", "?".". Affirmative contexts are all other segments. The sentiment score of each message corresponds to the sum of the sentiment score of all lexicon items present in the message.

Clara111 commented 5 years ago

Thank you so much for your reply. It's helpful and I will go through the tutorial later. In addition, what are the meanings of the punctuation in the lexicon? For example, 'em, & good, .NUM.NUM, + volume. Can I just ignore the punctuation when I code?

Thanks a lot.

gapetto commented 4 years ago

There are 2-grams and single words in the lexicon. I don't understand how the overall score should be calculated. I can check for 1 and 2-gram occurences and get their score, but then what - should I add those two scores together?

nunomroliveira commented 4 years ago

In those situations, it is preferable to use the score of the 2-gram instead of the single words.