Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference Rule Engine : addInferenceRule #158

Open
ofilangi opened this issue Jan 29, 2022 · 2 comments
Open

Inference Rule Engine : addInferenceRule #158

ofilangi opened this issue Jan 29, 2022 · 2 comments
Labels
enhancement New feature or request new operation new swdiscovery operatipon

Comments

@ofilangi
Copy link
Collaborator

add inference rule construction

set inference rule example

construct {
  ?x ?p ?z
}
where {
  ?p a owl:TransitiveProperty .
  ?x ?p ?y .
  ?y ?p ?z 
}

behaviours

Should be apply on the current query context

example

supposing property is a owl:TransitiveProperty

<p1> <property> <p4>
<p2> <property> <p4>
<p4> <property> <p6>

query

select ?v where {
<p1> <property> ?v .
}

expected results

<p1> <property> <p4>
<p1> <property> <p6>

owl:TransitiveProperty build new triplet without context

<p1> <property> <p6>
<p2> <property> <p6>

owl:TransitiveProperty build new triplet with context

<p1> <property> <p6>

add library of InferenceRules

  • addOwlTransitivePropertyIR
  • addOwlSymmetricIR
  • addOwlSameAsIR
  • addDefaultInferenceRules()

reference
http://ns.inria.fr/sparql-extension/rule.html#:~:text=Inference%20rules%20are%20construct%20where,XML%20syntax%20as%20shown%20below.

@ofilangi ofilangi added enhancement New feature or request new operation new swdiscovery operatipon labels Jan 29, 2022
@ofilangi
Copy link
Collaborator Author

SWDiscovery(config)
   .rule("owl:transitive")
        .something("p")
           .isA("owl:TransitiveProperty")
        .root()
          .something("x")
            .isSubjectOf("p","y")
               .isSubjectOf("p","z")
            .construct()
              . something("x")
                   .isSubjectOf("p","z")
   .query()
       .something().set("<p1>")
         .isSubjectOf("<property>","v")
          .select("val")

note : add query operation for query part

@ofilangi
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new operation new swdiscovery operatipon
Projects
None yet
Development

No branches or pull requests

1 participant