Skip to main content

Tweet

A generically dependent continuant representing an individual post published on the X (Twitter) platform, identified by a numeric tweet id and bearing text content, language, creation timestamp, and public engagement metrics as exposed by the X v2 API.

ApplicationsClassAlso known asPostX Post
IRI
http://ontology.naas.ai/x/Tweet
Module
x Β· Applications

Hierarchy​

Position of Tweet in the class hierarchy: its ancestors and direct subclasses.

Properties​

Declared on this class​

Properties declared on Tweet
PropertyDomain β†’ RangeDetails
card uridatatypeDomain β†’ RangeTweet to xsd:string
conversation iddatatypeDomain β†’ RangeTweet to xsd:string
edit history tweet iddatatypeDomain β†’ RangeTweet to xsd:string
full textdatatypeDomain β†’ RangeTweet to xsd:string
has attached mediaobjectDomain β†’ RangeTweet to Media
has context annotationobjectDomain β†’ RangeTweet to Context Annotation
has languageobjectDomain β†’ RangeTweet to Tweet Language
has public metricsobjectDomain β†’ RangeTweet to Tweet Public Metrics
has url entityobjectDomain β†’ RangeTweet to Tweet URL
in reply to userobjectDomain β†’ RangeTweet to X User
is authored byobjectDomain β†’ RangeTweet to X User
is contained in search result setobjectDomain β†’ RangeTweet to Search Result Set
is referenced by tweetobjectDomain β†’ RangeTweet to Tweet
mentions userobjectDomain β†’ RangeTweet to X User
paid partnershipdatatypeDomain β†’ RangeTweet to xsd:boolean
possibly sensitivedatatypeDomain β†’ RangeTweet to xsd:boolean
quotes tweetobjectDomain β†’ RangeTweet to Tweet
references tweetobjectDomain β†’ RangeTweet to Tweet
replies to tweetobjectDomain β†’ RangeTweet to Tweet
reply settingsdatatypeDomain β†’ RangeTweet to xsd:string
retweets tweetobjectDomain β†’ RangeTweet to Tweet
tweet created atdatatypeDomain β†’ RangeTweet to xsd:dateTime
tweet iddatatypeDomain β†’ RangeTweet to xsd:string
tweet textdatatypeDomain β†’ RangeTweet to xsd:string
tweeted atobjectDomain β†’ RangeTweet to temporal instant
urldatatypeDomain β†’ RangeTweet, Tweet URL to xsd:string

Inherited properties​

From Generically dependent continuant (7)

Declared on generically dependent continuant.

Properties inherited from generically dependent continuant
PropertyDomain β†’ RangeDetails
has partDomain β†’ Rangegenerically dependent continuant to generically dependent continuant
is aboutDomain β†’ Rangegenerically dependent continuant to any
is created byDomain β†’ Rangegenerically dependent continuant to process
is deleted byDomain β†’ Rangegenerically dependent continuant to process
is part ofDomain β†’ Rangegenerically dependent continuant to generically dependent continuant
is sourced fromDomain β†’ Rangegenerically dependent continuant to Profile Document
is updated byDomain β†’ Rangegenerically dependent continuant to process
From Continuant (6)

Declared on continuant.

Properties inherited from continuant
PropertyDomain β†’ RangeDetails
continuant part ofDomain β†’ Rangecontinuant to continuant
has continuant partDomain β†’ Rangecontinuant to continuant
is affected byDomain β†’ Rangecontinuant to process
is input ofDomain β†’ Rangecontinuant to process
is object ofDomain β†’ Rangecontinuant to process
is output ofDomain β†’ Rangecontinuant to process
From Entity (15)

8 of 15 properties declared on entity, where all of them are listed.

Properties inherited from entity
PropertyDomain β†’ RangeDetails
condition described byDomain β†’ Rangeentity to Performance Specification
data propertyDomain β†’ Rangeentity to xsd:string
described byDomain β†’ Rangeentity to Descriptive Information Content Entity
designated byDomain β†’ Rangeentity to Designative Information Content Entity
exists atDomain β†’ Rangeentity to temporal region
has backing data sourceDomain β†’ Rangeentity to Data Source
has nebari classDomain β†’ Rangeentity to Nebari Class
is measured byDomain β†’ Rangeentity to Measurement Information Content Entity

Used as the range of​

Logical axioms​

Restrictions​

Every Tweet is a subclass of:

Examples​

  • Tweet 2061859064825446876 by author 1752407607820607488 about Roland Garros
Turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <https://example.org/> .

ex:tweet1 a <http://ontology.naas.ai/x/Tweet> ; # Tweet
rdfs:label "Example Tweet" ;
<http://ontology.naas.ai/x/card_uri> "Example" ; # card uri
<http://ontology.naas.ai/x/conversation_id> "Example" . # conversation id
SPARQL
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

# Instances of Tweet, including instances of its subclasses
SELECT ?item ?label WHERE {
?item a/rdfs:subClassOf* <http://ontology.naas.ai/x/Tweet> .
OPTIONAL { ?item rdfs:label ?label }
}
LIMIT 100

Sibling classes​

And 42 more under generically dependent continuant.

Used in ABI​

Tweet is referenced in 2 files of jupyter-naas/abi (revision 56f86c1): 1 process and 1 query file, across the x module.

In processes​

In SPARQL queries​

  • XSparqlQueries (x): queried by find_language_distribution, find_recent_tweets_for_query, find_top_authors_by_tweet_count, find_top_engaging_tweets, find_top_impression_tweets and 10 more.

Modeling guide​

A Tweet, in the ABI X (Twitter) application ontology, is one post published on X. It is information, a generically dependent continuant: the same post exists in every copy of it. Its data properties mirror the X v2 API fields (tweet id, tweet text, tweet created at, conversation id). Its author is an X user account (is authored by), which can in turn be the account of a person. Engagement counts are not on the tweet itself but on a separate tweet public metrics node (has public metrics), and replies, quotes and retweets are links between tweets (replies to tweet, quotes tweet, retweets tweet).

When to use it​

  • For posts ingested from the X API, one individual per tweet id.
  • Read counts (likes, retweets, replies, impressions) through has public metrics, as the X SPARQL queries do.
  • A tweet kept only as context for another one (the parent of a reply, a quoted or retweeted original) is also typed referenced tweet; the ranking queries exclude those.

Turtle example​

@prefix x: <http://ontology.naas.ai/x/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <https://example.org/> .

ex:tweet1 a x:Tweet ;
x:tweet_id "1790000000000000001" ;
x:tweet_text "Shipping a new release of our ontology today." ;
x:tweet_created_at "2026-05-12T09:30:00Z"^^xsd:dateTime ;
x:isAuthoredBy ex:account ;
x:hasPublicMetrics ex:tweet1Metrics .

ex:account a x:XUser ;
x:author_id "12345" ;
x:username "example_account" .

ex:tweet1Metrics a x:TweetPublicMetrics ;
x:like_count 42 ;
x:retweet_count 7 ;
x:reply_count 3 .

# A reply to it.
ex:tweet2 a x:Tweet ;
x:tweet_id "1790000000000000002" ;
x:repliesToTweet ex:tweet1 .

SPARQL example​

PREFIX x: <http://ontology.naas.ai/x/>

# Most-liked tweets, without the referenced (context-only) ones
# (as in the X module's find_top_liked_tweets query).
SELECT ?tweet ?text ?likes ?username WHERE {
?tweet a x:Tweet ;
x:hasPublicMetrics ?metrics .
FILTER NOT EXISTS { ?tweet a x:ReferencedTweet }
?metrics x:like_count ?likes .
OPTIONAL { ?tweet x:tweet_text ?text }
OPTIONAL { ?tweet x:isAuthoredBy ?author . ?author x:username ?username }
}
ORDER BY DESC(?likes)
LIMIT 10