I am trying to assign different values for each sentences based on information about the presence of hashtags, upper case letters/words (e.g. HATE) and some others.
I created a data frame which includes some binary values (1 or 0):
Sentence Upper case Hashtags I HATE migrants 1 0 I like cooking 0 0 #trump said he is ok 0 1 #blacklives SUPPORT 1 1
I would like to assign a value based on the binary values above, if they are satisfied or not, for example:
- if Upper case = 1 and Hashtags = 1 then assign -10; - if Upper case = 1 and Hashtags = 0 then assign -5; - if Upper case = 0 and Hashtags = 1 then assign -5; - if Upper case = 0 and Hashtags = 0 then assign 0;
This would be ok for a small number of requests and combinations, but with three variables to check, it would be a greater number of combination to consider manually!
Do you know if there is a way to take into account all these in an easy (and feasible) way?
Someone told me about using regression, but I have never used it before for similar task. The context is about fake tweets.