A co-occurrence network turns entities found together in content into a graph. In a hashtag network, each Tag is a node and a connection means two hashtags appeared in the same tweet. Connections can reveal useful tag combinations, topic clusters, and less obvious hashtags beyond the most frequent ones. section 7.0
Figure 7.5 Constructing a co-occurrence network of tags based on whether they co-occur in the same tweet
This construction view makes the projection clear: tweets link to their hashtags first, then hashtags that share a tweet become connected. section 7.0
Build a hashtag co-occurrence network in practical steps:
- Extract hashtags from original tweets, excluding retweets so repeated content does not skew counts. Normalize tags, create Tag nodes, and connect each Tweet to its tags with HAS_TAG relationships. section 7.1
- Match two Tag nodes attached to the same tweet. Keep one ordering of each pair, such as id(h1) < id(h2), to avoid returning the same pair twice. section 7.2
- Use the number of shared tweets as a relationship weight. Treat the conceptual connection as undirected; in GDS, represent it with opposing directed relationships when traversal in both directions is needed. section 7.2
- Alternatively, infer relationships with node similarity. Jaccard similarity compares the tweets associated with two hashtags, while similarityCutoff and topK control which relationships remain. section 7.2.2
Reading a weighted hashtag pair
The pair #ai and #nlp co-occurs in 1,507 tweets in the sample, so its connection can carry a weight of 1,507. High counts identify commonly paired tags, but a similarity-based projection can instead emphasize overlap relative to each tag’s broader tweet set. section 7.2 section 7.2.1
Network density shapes the interpretation. Raising topK gives each hashtag more similar neighbors, while raising similarityCutoff removes weaker links; broader networks can produce broader communities. Analyze the resulting Tag-only network with degree centrality, label propagation, and PageRank to inspect connected tags, communities, and community representatives. section 7.2.2 section 7.4 section 7.5
