tutotal = {
return tweets.map(tweet => {
let replyTo = tweet['to_tweetid']
let plus = []
let minus = []
let text = tweet.text
let parts = text.split(' ')
let markers = ['+1', '-1']
let points = new Map()
markers.map(marker => points.set(marker, []))
let current_marker = ''
for (const part of parts) {
if(markers.includes(part)){
current_marker = part
} else {
if(markers.includes(current_marker)){
(points.get(current_marker)).push(part.toLowerCase())
}
}
}
plus = points.get('+1')
minus = points.get('-1')
return { text, replyTo, plus, minus }
})
}