Skip to content

Release 3.1.2

Compare
Choose a tag to compare
@gkellogg gkellogg released this 26 Dec 06:50
· 47 commits to develop since this release

In spite of the minor version update, this is actually a major release introducing a substantial amount of reasoning in the gem.
This version tracks the W3C N3 Community Group Specification which has incompatibilities with the Team Submission version. Notably:

  • The @keywords declaration is removed, and most form of @ keywords (e.g., @is, @has, @true) are no longer supported.
  • Terminals adhere closely to their counterparts in [Turtle][].
  • The modifier <- is introduced as a synonym for is ... of.
  • The SPARQL BASE and PREFIX declarations are supported.
  • Implicit universal variables are defined at the top-level, rather than in the parent formula of the one in which they are defined.

This brings N3 closer to compatibility with Turtle.

Syntax

  • Removes @a, @is expr @of, @has expr, @true, and @false; the non-@ versions remain.
  • Allow whitespace inside IRIREFs per Team Submission.

Models

  • Implements RDF::N3::List to subclass RDF::List for lists as first-class citizens including query support. Uses local storage for list elements, and allows recusive lists. Enumerating statements is recursive.
  • Implements RDF::N3::Repository which allows native lists as terms.
  • Implements RDF::N3::Algebra::Formula and Formula.from_enumerable as a generic method to turn a dataset into a recursive set of formulae (currently excludes list transformation).

Reasoner

Implements most Notation3 builtins:

RDF List vocabulary http://www.w3.org/2000/10/swap/list#

  • list:append (See {RDF::N3::Algebra::List::Append})
  • list:first (See {RDF::N3::Algebra::List::First})
  • list:in (See {RDF::N3::Algebra::List::In})
  • list:last (See {RDF::N3::Algebra::List::Last})
  • list:length (See {RDF::N3::Algebra::List::Length})
  • list:member (See {RDF::N3::Algebra::List::Member})

RDF Log vocabulary http://www.w3.org/2000/10/swap/log#

  • log:conclusion (See {RDF::N3::Algebra::Log::Conclusion})
  • log:conjunction (See {RDF::N3::Algebra::Log::Conjunction})
  • log:content (See {RDF::N3::Algebra::Log::Content})
  • log:equalTo (See {RDF::N3::Algebra::Log::EqualTo})
  • log:implies (See {RDF::N3::Algebra::Log::Implies})
  • log:includes (See {RDF::N3::Algebra::Log::Includes})
  • log:n3String (See {RDF::N3::Algebra::Log::N3String})
  • log:notEqualTo (See {RDF::N3::Algebra::Log::NotEqualTo})
  • log:notIncludes (See {RDF::N3::Algebra::Log::NotIncludes})
  • log:outputString See {RDF::N3::Algebra::Log::OutputString})
  • log:parsedAsN3 (See {RDF::N3::Algebra::Log::ParsedAsN3})
  • log:semantics (See {RDF::N3::Algebra::Log::Semantics})

RDF Math vocabulary http://www.w3.org/2000/10/swap/math#

  • math:absoluteValue (See {RDF::N3::Algebra::Math::AbsoluteValue})
  • math:acos (See {RDF::N3::Algebra::Math::ACos})
  • math:asin (See {RDF::N3::Algebra::Math::ASin})
  • math:atan (See {RDF::N3::Algebra::Math::ATan})
  • math:acosh (See {RDF::N3::Algebra::Math::ACosH})
  • math:asinh (See {RDF::N3::Algebra::Math::ASinH})
  • math:atanh (See {RDF::N3::Algebra::Math::ATanH})
  • math:ceiling (See {RDF::N3::Algebra::Math::Ceiling})
  • math:cosh (See {RDF::N3::Algebra::Math::CosH})
  • math:cos (See {RDF::N3::Algebra::Math::Cos})
  • math:difference (See {RDF::N3::Algebra::Math::Difference})
  • math:equalTo (See {RDF::N3::Algebra::Math::EqualTo})
  • math:exponentiation (See {RDF::N3::Algebra::Math::Exponentiation})
  • math:floor (See {RDF::N3::Algebra::Math::Floor})
  • math:greaterThan (See {RDF::N3::Algebra::Math::GreaterThan})
  • math:lessThan (See {RDF::N3::Algebra::Math::LessThan})
  • math:negation (See {RDF::N3::Algebra::Math::Negation})
  • math:notEqualTo (See {RDF::N3::Algebra::Math::NotEqualTo})
  • math:notGreaterThan (See {RDF::N3::Algebra::Math::NotGreaterThan})
  • math:notLessThan (See {RDF::N3::Algebra::Math::NotLessThan})
  • math:product (See {RDF::N3::Algebra::Math::Product})
  • math:quotient (See {RDF::N3::Algebra::Math::Quotient})
  • math:remainder (See {RDF::N3::Algebra::Math::Remainder})
  • math:rounded (See {RDF::N3::Algebra::Math::Rounded})
  • math:sinh (See {RDF::N3::Algebra::Math::SinH})
  • math:sin (See {RDF::N3::Algebra::Math::Sin})
  • math:sum (See {RDF::N3::Algebra::Math::Sum})
  • math:tanh (See {RDF::N3::Algebra::Math::TanH})
  • math:tan (See {RDF::N3::Algebra::Math::Tan})

RDF String vocabulary http://www.w3.org/2000/10/swap/str#

  • string:concatenation (See {RDF::N3::Algebra::Str::Concatenation})
  • string:contains (See {RDF::N3::Algebra::Str::Contains})
  • string:containsIgnoringCase (See {RDF::N3::Algebra::Str::ContainsIgnoringCase})
  • string:endsWith (See {RDF::N3::Algebra::Str::EndsWith})
  • string:equalIgnoringCase (See {RDF::N3::Algebra::Str::EqualIgnoringCase})
  • string:format (See {RDF::N3::Algebra::Str::Format})
  • string:greaterThan (See {RDF::N3::Algebra::Str::GreaterThan})
  • string:lessThan (See {RDF::N3::Algebra::Str::LessThan})
  • string:matches (See {RDF::N3::Algebra::Str::Matches})
  • string:notEqualIgnoringCase (See {RDF::N3::Algebra::Str::NotEqualIgnoringCase})
  • string:notGreaterThan (See {RDF::N3::Algebra::Str::NotGreaterThan})
  • string:notLessThan (See {RDF::N3::Algebra::Str::NotLessThan})
  • string:notMatches (See {RDF::N3::Algebra::Str::NotMatches})
  • string:replace (See {RDF::N3::Algebra::Str::Replace})
  • string:scrape (See {RDF::N3::Algebra::Str::Scrape})
  • string:startsWith (See {RDF::N3::Algebra::Str::StartsWith})

RDF Time vocabulary <>

  • time:dayOfWeek (See {RDF::N3::Algebra::Time::DayOfWeek})
  • time:day (See {RDF::N3::Algebra::Time::Day})
  • time:gmTime (See {RDF::N3::Algebra::Time::GmTime})
  • time:hour (See {RDF::N3::Algebra::Time::Hour})
  • time:inSeconds (See {RDF::N3::Algebra::Time::InSeconds})
  • time:localTime (See {RDF::N3::Algebra::Time::LocalTime})
  • time:minute (See {RDF::N3::Algebra::Time::Minute})
  • time:month (See {RDF::N3::Algebra::Time::Month})
  • time:second (See {RDF::N3::Algebra::Time::Second})
  • time:timeZone (See {RDF::N3::Algebra::Time::Timezone})
  • time:year (See {RDF::N3::Algebra::Time::Year})