Archive for January, 2010

In my last post, I presented some research on the different content types we found in our corpus of 8.9 million Twitter messages. One surprising result we found is that Portuguese is apparently the second most common language on Twitter, beating out both Japanese and Spanish. Given the unreliability of TextCat on short pieces of text, I decided to verify our language statistics by looking at the location field in the user info for the unique set of users in our corpus. This was not a straightforward thing to do, however, because the location is a text field which people can write absolutely anything they want into. For example, the following all occurred more than once in our corpus:

  • “New York”
  • “NYC”
  • “everywhere!!!!”
  • “In ur computers, eating ur RAM”
  • “Earth”
  • “Mars”
  • “Utah :)”
  • “utah :(”

To get around this problem, I normalized the text by converting it to lowercase, removing punctuation, and changing things that looked like addresses to have just the city (so that “123 Fake St., Springfield, USA” becomes just “springfield”). I then looked at the top 500 locations in terms of number of twitterers. These are the most common countries represented in users’ locations:
Twitter User Locations (by Country)
And the top 10 cities are:

  1. New York
  2. São Paulo
  3. Los Angeles
  4. London
  5. Chicago
  6. San Francisco
  7. Rio de Janeiro
  8. Tokyo
  9. Atlanta
  10. Toronto

While the locations are dominated by English-speaking countries, Brazil does come in second in terms of number of users, and two Brazilian cities show up in the top 10, which suggests that our language stats aren’t too far off the mark.

Another question we considered in our study is whether there is any way to distinguish between twitterers who post broadly informative messages from those who post mainly personal messages or spam. Our first thought was that the number of followers a twitterer has would be a good indication of how informative their messages are to a wider audience. But we were quite surprised when we looked at the distribution of the number of followers in our sample:
Histogram of Log Number of Followers on Twitter
The x-axis here is the logarithm base 10 of the number of followers. While most twitterers in our corpus have between 15 to 60 followers (log=1.2 to 1.8), there is a long tail where we can find accounts with more than a thousand, 100,000, or even a million followers. We didn’t realize at first the number of celebrities currently using Twitter, as you can see in this list of the top 100 most-followed Twitter accounts. Of course, it’s a matter of opinion whether the latest funny video that Ashton Kutcher found on YouTube is more important than what Barack Obama has to say about health care, but for our purposes, we’d rather filter out celebrity ramblings from the more serious messages, and that is not easy to do based on the number of followers alone.

A more surprising fact we discovered is that spammer accounts can have relatively high numbers of followers as well, as you can see in the following boxplot:
Number of Followers on Twitter, by Message Type
This data is from the 1,000 tweet sample which was classified by message type that I discussed in my previous post. In this plot, messages about the user’s current status and private conversations are grouped together as “personal” messages, while all other messages (excluding spam) are “info” messages. The boxes show the middle 50% of the distribution for each type, while the whiskers extending from the boxes show where 99% of the data points lie. (There are a few outliers above 5,000 followers which are not shown here, to make the distributions easier to see.) While spam messages only made up a small fraction (4%) of our sample, the plot shows that within the set of spammer accounts there are quite a few which have more than 500-1000 followers, a number which would be pretty high for the other two message types. There is even one spam account in our sample which had over 10,000 followers at the time they posted.

But how could a spammer get so many followers, given that all they post is spam? Given that for nearly all of these accounts, the number of friends (accounts they are following) is greater than the number of followers, I suspect that what’s going on is that spammers go around following other twitterers at random, and at least some of these people are following them back out of courtesy, without realizing that they are actually a spam account. The only way a Twitter spammer could get someone to see their tweets is if they are followed by them, after all. There’s probably a high rate of turnover in a spammer’s followers list, but that wouldn’t matter much, as long as they can find more people to follow who will follow them in return without checking them out first.

All of this means that distinguishing spam from informative tweets will not be easy, even if there isn’t that much of it currently. But some good news for us is that twitterers who post lots of informative content do tend to have more followers than those who post mainly personal messages. This fact, combined with some semantic analysis of Twitter messages, should help us a great deal in mining the Twitter stream for useful content.

The end of 2009 provided the TextWise Quality Assurance team with an opportunity to create some New Year’s resolutions. The end of the year coincided with the conclusion of a testing cycle giving us the chance to review what worked and what needs improvement as we plan for the future. This is not necessarily a year end activity and it is certainly not a once a year activity. Reviewing what worked and what didn’t work should be done at the end of each test cycle. But timing enables us to call this our New Year’s resolutions at least this one time.

Our first resolution is to review and update test cases. No matter how much we want to have our formal test cases completely defined before testing begins, there will inevitably be improvements that can be made to the documentation. Exploratory and ad hoc tests need to be written up as formal test cases. New test cases need to be updated or fleshed out based on what was learned during the test cycle. Bug reports and test reports are a useful resource for identifying gaps in the formal test documentation.

Our second resolution is to review and update our existing processes. These processes include both our internal QA team processes as well as larger organizational processes that intersect with QA work. This is an opportunity to address process issues that were encountered during the test cycle and to add new processes that may be needed. Some of the areas we look at are the processes dealing with requirements, design, release, and bug triage. Because many of these processes cross groups, all stakeholder must be involved in making changes.

Our third resolution is to review the data we collect and report. We review the specific data we are collecting, how we collect that data, and the format in which we present the data. Process improvements may be needed to improve our collection of data. Other groups, and particularly the management team, need to be involved to ensure that we are providing the information they needed to continue to grow our organization.

Our final resolution is to look to the future. All of the previous resolutions are aimed at making improvements for the future but they are based on what has happened in the past. Now is the time to also look forward at the projects that are coming our way and ask what information we need and what planning we need to do. It’s also an opportunity to take the things that we’ve learned from the previous resolutions and apply them to our pending tasks. In this way, we seek to continually improve the QA team and contribute to the growth of the organization.

Happy 2010! It’s time to think about building the next generation of semantic dictionaries, much like rolling out next year’s models of automobiles from Detroit. We are not talking tail fins and rich Corinthian leather here, however. In the Age of the Web, any kind of dictionary will have a strictly limited life span.

Think of Susan Boyle, the Droid, and the Zhu Zhu hamster. You are not going to find any of these in a dictionary compiled just a year ago. And a year-old semantic dictionary would probably have few associations between Barack Obama and White House.

We have been at TextWise have been busy learning how to build new semantic dictionaries in a hurry and to make them better at the same time. With our statistical technology, we can now turn one out in about two weeks, including data collection time. Everyone will want them fresh and hot.

Recently we’ve been looking at how well our Semantic Signatures technology works with messages posted to Twitter. These kinds of messages pose significant challenges for the semantic web in general, because their extremely short length (140 characters or less) means that there will be very little context available for understanding the content of the message. In addition, many of these messages feature “creative” spellings and grammar, and are of a personal nature (e.g. “Having sushi for lunch today”) that would not be of general interest. Extracting any meaningful information from these snippets of random conversation will be quite a difficult task indeed.

To see what exactly we’re up against, we undertook a small study to characterize the different types of messages that can be found on Twitter. Read the rest of this entry »