Incomplete tweets while streaming

twitter4j
java
api

#1

I have created a pipeline for receiving tweets using twitter4j. The tweets are being pushed by using Redis push command. Further for processing of tweets i.e for removing “#”, “@” and finding the sentiment, tweets are popped using pop command.

The problem I am facing is that while tweets are streaming, some of the tweets are left incomplete (the long tweets). For Example:

Original Tweet: “Another Silent revolution of Modi govt - Streets lights being replaced with LED bulbs, saving energy consumption & stopping toxic emissions.”

Tweet Shown : “RT @BJP4India: Another Silent revolution of Modi govt - Streets lights being replaced with LED bulbs, saving energy consumption &…”

Not able to understand why its happening. This becomes a problem during sentiment analysis as it also considers “…” as a word.


#2

Looks like this is in fact a Retweet, so you need to access the child retweet object inside the Tweet to parse out the full text.


#3

What do you mean when you say child retweet object and how to access it? Also as I mentioned the tweets which are not that lengthy are able to come completely irrespective of whether it is a Retweet or not.


#4

The original status of the retweet is contained within the retweeted_status object.

The top level object contains the user information of the retweeter, not the original tweet. The status text in the top level object should probably always be ignored as it can often be truncated in the case of longer tweets


#5

So now what should I do to solve this problem?