<commit_before># RSP-QL Semantics

## RSP Data model

### Time instants
Time `T` is defined as an ordered and infinite sequence of countable *time instants* `(t_1, t_2, . . .)`, 
where <code>t_i &isin; **T**</code>.  

In practice we could use ```xsd:dateTime``` for the time instants.

### Timestamped graph
A *timestamped graph* is defined as a triple `(g,p,t)`, where `g` is an [RDF graph](http://www.w3.org/TR/rdf11-concepts/#section-rdf-graph), <code>t &isin; T</code> is a time instant, and `p` is a predicate that captures the relationship between the time instant `t` and the graph `g`. 

A single triple can be streamed using a singleton graph where the timestamp is captured on the graph and the data in the triple in the graph.

There can be multiple timestamps associated with an individual graph, e.g. a start time and an end time, or a generated time and a system processing time.

There can be multiple graphs with the same timestamp.

TODO: Identify a vocabulary of terms for the predicate `p`.

### Stream
A stream `S` consists of a sequence of timestamped graphs `(g,p,t)`.

TODO: Define what we mean by sequence or is this a set?

### Window (data)
A window `w_S` is a set of triples from the stream S. Time-based windows are defined by an opening (`o`) and closing (`c`) time instants:

<code>w_S = {d | (d,t) &isin; S and t &isin; (o,c]}</code>


## Operators<commit_msg>Added interpretation for RDF Graph<commit_after># RSP-QL Semantics

## RSP Data model

### Time instants
Time `T` is defined as an ordered and infinite sequence of countable *time instants* `(t_1, t_2, . . .)`, 
where <code>t_i &isin; **T**</code>.  

In practice we could use ```xsd:dateTime``` for the time instants.

### Timestamped graph
A *timestamped graph* is defined as a triple `(g,p,t)`, where `g` is an [RDF graph](http://www.w3.org/TR/rdf11-concepts/#section-rdf-graph) interpreted under the semantics that [each graph defines its own context](http://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225/#each-named-graph-defines-its-own-context), <code>t &isin; T</code> is a time instant, and `p` is a predicate that captures the relationship between the time instant `t` and the graph `g`. 

A single triple can be streamed using a singleton graph where the timestamp is captured on the graph and the data in the triple in the graph.

There can be multiple timestamps associated with a graph g, e.g. a start time and an end time, or a generated time and a system processing time.

There can be multiple graphs with the same timestamp.

TODO: Identify a vocabulary of terms for the predicate `p`.

### Stream
A stream `S` consists of a sequence of timestamped graphs `(g,p,t)`.

TODO: Define what we mean by sequence or is this a set?

### Window (data)
A window `w_S` is a set of triples from the stream S. Time-based windows are defined by an opening (`o`) and closing (`c`) time instants:

<code>w_S = {d | (d,t) &isin; S and t &isin; (o,c]}</code>


## Operators
{'fraction_non_alphanumeric': 0.11156049882035726, 'fraction_numerical': 0.008426019548365353, 'mean_word_length': 4.161739130434783, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1113988', 'n_tokens_mistral': 974, 'n_tokens_neox': 925, 'n_words': 442}