Collaborative tagging systems are now popular tools for organising and sharing information on the Web. While collaborative tagging offers many advantages over the use of controlled vocabularies, they also suffer from problems such as the existence of polysemous tags. We investigate how the different contexts in which individual tags are used can be revealed automatically without consulting any external resources. We consider several different network representations of tags and documents, and apply a graph clustering algorithm on these networks to obtain groups of tags or documents corresponding to the different meanings of an ambiguous tag. Our experiments show that networks which explicitly take the social context into account are more likely to give a better picture of the semantics of a tag.