A hypergraph model of social tagging networks