Search⌘ K
AI Features

Use the Vocabularies to Build RDF Statements

Explore how to build RDF statements in Elixir by utilizing RDF vocabularies, sigils for IRIs and literals, and property functions with arguments. Learn to serialize RDF descriptions into Turtle format for semantic graph modeling.

Let’s put the vocabularies to use and build some RDF statements in Elixir. We’ll use the book graph as our target, specifically the semantic RDF version.

Here we make use of two RDF.ex features: sigils for RDF terms and variant property function calls that implement a description builder style. To glue it all together, we use the Elixir pipe operator |>.

The book/0 function

Let’s add this book/0 ...