Skip to content

Commit

Permalink
Update get_label.py
Browse files Browse the repository at this point in the history
  • Loading branch information
4likes4u authored Jun 12, 2020
1 parent d6ec446 commit 7205585
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions process_data/get_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
line = line.strip()
label_set = json.loads(line)
tweetid = label_set['tweetid']
if(label_set.get("responsetype-vs-source", 0)!=0): # deep reply
if(label_set.get("responsetype-vs-source", 0)!=0): #reply
stance = label_set['responsetype-vs-source']
if(stance=="agreed"):
label_map[tweetid] = 0
Expand All @@ -16,16 +16,12 @@
label_map[tweetid] = 2
elif(stance=="comment"):
label_map[tweetid] = 3
# elif(label_set.get("responsetype-vs-source", 0)!=0): #directly reply
# stance = label_set['responsetype-vs-source']
# if(stance=="agreed"):
# label_map[tweetid] = 0
# elif(stance=="disagreed"):
# label_map[tweetid] = 1
# elif(stance=="appeal-for-more-information"):
# label_map[tweetid] = 2
# elif(stance=="comment"):
# label_map[tweetid] = 3
elif(label_set.get("support", 0)!=0): #source tweets
stance = label_set['support']
if(stance=="supporting"):
label_map[tweetid] = 0
else:
label_map[tweetid] = 1 # denying
else: # main tweet
label_map[tweetid] = 4

Expand Down

0 comments on commit 7205585

Please sign in to comment.