liveBook · Manning

Tweet

As explained in Graph Algorithms for Data Science

A tweet is a short social-media post represented as an entity with an identifier, creation time, and text.

A tweet is a domain-specific graph entity representing short social-media content. It has a unique identifier, creation time, and text, and connects to its publishing user through PUBLISH. section 2.3.2

Model tweets with relationships that preserve domain-specific behavior:

  • Use a specific Tweet node rather than a generic Post label because platforms produce different attributes and relationships. section 2.3.2
  • Represent retweets either as RETWEET relationships to an original tweet or as separate tweets referencing the original; the latter supports likes, hashtags, and mentions attached to the retweet. section 2.3.3
  • Extract hashtags, links, and mentions from tweet text to add discoverable topics, external content, and conversational references to the graph. section 2.4

A tweet as a graph entry point

A tweet containing #KnowledgeGraph, #NLP, and #DataScience, a Medium article URL, and mentions such as @tb_tomaz can connect content to topics, external resources, and people. section 2.4

(:User)-[:PUBLISH]->(:Tweet)

The core publishing pattern links a User to a Tweet with PUBLISH. section 2.3.2

How Graph Algorithms for Data Science covers it

How deep it goes
Defines tweet properties, publishing relationships, retweet alternatives, and extraction of hashtags, links, and mentions.
Examples
Uses a tweet with knowledge-graph hashtags, a Medium URL, and user mentions as a text-extraction example.
What it assumes
Assumes familiarity with graph modeling basics and an existing User identifier while developing the Tweet model from a specification.
What you can do after
Build it from scratch as a domain-specific graph model with tweet properties, publishing links, retweets, and extracted text features.
How it connects
Connects User, PUBLISH, RETWEET, hashtags, links, mentions, and knowledge graphs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Algorithms for Data Science. The section links point to the parts of the book it draws on.