Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8478923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:52:56+00:00 2026-06-10T18:52:56+00:00

I am trying to define (in turtle) a symmetric, transitive predicate in Turtle and

  • 0

I am trying to define (in turtle) a symmetric, transitive predicate in Turtle and get inferences from it.

Here is how I defined my predicate:

:similar a owl:SymmetricProperty; a owl:TransitiveProperty .

How I use it (same turtle file):

:a :similar :b .
:b :similar :c .

Then I issue a sparkl query “select ?x where ?x :similar :c” hoping to get a and b.

I have tried to set up the model like this:

OntModel ont = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );      
ont.read("file:./myontology.turtle",null,"TURTLE"); 
InfModel model = ModelFactory.createInfModel(ReasonerRegistry.getOWLReasoner(), ont);

and then using InfModel in my QueryExecutionFactory.create. Does not work.

I have also tried just that:

OntModel model = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF );
model.read("file:./myontology.turtle",null,"TURTLE");

No luck either.
What the right way? What am I missing?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:52:57+00:00Added an answer on June 10, 2026 at 6:52 pm

    Found the answer. The following works just fine:

    OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF);
    model.read("file:./myontology.turtle",null,"TURTLE");
    

    I had some issues with prefixes. Also, I was declaring :similar as a class and was assuming that subclasses would inherit owl:SymmetricProperty and owl:TransitiveProperty. Does not seem to work that way

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to define a predicate where it searches a list of lists for
I'm trying to define a tree structure in GORM. Here is my model: class
I am trying to define a basic function in python but I always get
Im trying to define variable values from values inputted into an input textfield onkeyup.
I'm trying to define attributes from an array like so: [a, b, c].each do
I'm trying to define the inheritance-check predicate is_a/2 in Prolog, but so far all
I'm trying to define a route with an optional list as query parameter GET
I'm trying to define a function that will allow me to get a value
I'm trying to define how to return XML content from my web API. Should
Im trying to define a select tag in my view. My view looks like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.