From 638f56d0b1a99bb92f1530cf343b547e3558c78f Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Fri, 8 Sep 2023 18:41:44 -0400 Subject: [PATCH] Update README.md --- README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5caaaee..94ca224 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,35 @@ owlet ========== -**owlet** is a query expansion preprocessor for SPARQL. It parses embedded OWL class expressions (in [Manchester Syntax]) and uses an OWL reasoner to replace them with FILTER statements containing the URIs of subclasses of the given class expression (or superclasses, equivalent classes, or instances). +**owlet** is a query expansion preprocessor for SPARQL. It parses embedded OWL class expressions (in [Manchester Syntax]) and uses an OWL reasoner to replace them with a VALUES block containing the URIs of subclasses of the given class expression (or superclasses, equivalent classes, or instances). **owlet** is written in Scala but can be used in any Java application. ## Installation -owlet is not yet available from an online Maven repository. To use it in your project you will need to: - -1. Check out the code, e.g. run `git clone https://github.com/phenoscape/owlet.git` on the command line. -2. Run `mvn install` to build the jar and add to your local Maven repository. -3. Add the owlet dependency to your `pom.xml`: +owlet is available from Maven Central. To use it in your project, add the owlet dependency to your `pom.xml`: ```xml org.phenoscape owlet - 1.0-SNAPSHOT + 2.0 ``` -## How does it work +## How it works The OWL class expression to be expanded is a string literal at an appropriate location in a SPARQL query. The query expander recognizes the literal containing the class expression by its datatype, which must be `http://purl.org/phenoscape/owlet/syntax#omn`. [Datatypes of literals in SPARQL] are assigned using the `^^TypeURI` suffix notation (where `TypeURI` is the URI of the datatype; URI prefixes are allowed). -The literal containing the class expression must be in one of the following 3 triple patterns (with `rdf`, `rdfs`, `owl` declared [as in prefix.cc], and `owlet` as ``): +The literal containing the class expression must be in one of the following 5 triple patterns (with `rdf`, `rdfs`, `owl`, `sesame` declared [as in prefix.cc], and `owlet` as ``): 1. Subclass triple: `?x rdfs:subClassOf "owl:Thing"^^owlet:omn` -2. instance-of triple: `?x rdf:type "owl:Thing"^^owlet:omn` -3. equivalent class triple: `?x owl:equivalentClass "owl:Thing"^^owlet:omn` +2. Equivalent class triple: `?x owl:equivalentClass "owl:Thing"^^owlet:omn` +3. Instance of triple: `?x rdf:type "owl:Thing"^^owlet:omn` +4. Direct subclass triple: `?x sesame:directSubClassOf "owl:Thing"^^owlet:omn` +5. Direct instance of triple: `?x sesame:directType "owl:Thing"^^owlet:omn` Each of these triples will be rewritten by the expander in the following pattern: ``` -FILTER(?x IN (,,,...)) +VALUES ?x { ... } ``` where `,,,...` is the list of class or instance identifiers that satisfy the OWL class expression, as determined by the reasoner.