Open gkellogg opened 1 year ago
I don't quite follow what exactly the problem would be with language maps. Can you provide a small concrete example?
In the call, I discussed my S-Expression representation of, for example, SPARQL. This is essentially the AST that comes from parsing the SPARQL grammar into a form that can be executed. For SPARQL, they're also known as SPARQL S-Expressions (SSE).
For example, the following SPARQL transforms to the subsequence S-Expression.
PREFIX : <http://bigdata.com/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/>
SELECT ?age ?c WHERE {
?bob foaf:name "Bob" {| ex:certainty ?c |}.
}
(prefix (
(: <http://bigdata.com/>)
(foaf: <http://xmlns.com/foaf/0.1/>)
(ex: <http://example.org/>))
(project (?age ?c)
(bgp
(triple ?bob foaf:name "Bob")
(triple (qtriple ?bob foaf:name "Bob") ex:certainty ?c)) ))
For RDF only representations, this would be limited to the prefix
and base
definitions, along with graphs
/triples
or quads
.
While it does provide a nice intermediate representation, in the general case, it does not really support maintaining the original hierarchy from the documents, although we can imagine something that might, if we posit a statement
operator whose components can be literals, IRIs, blank nodes, other statements, or components of statements (e.g., property list or object list). It does not support any kind of map structure.
It's probably too hypothetical and unknown to serve as an effective replacement for our existing (extended) internal representation.
The spec currently downgrades to the standard representation by using strings, numbers, or booleans. In many cases, it should use Value Objects, instead.
Note that in rare events, it could create an unexpected result, such as a language-tagged string being used in a Language Map, which doesn't allow value objects.