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

  • SEARCH
  • Home
  • 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 6033989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:33:51+00:00 2026-05-23T05:33:51+00:00

How can I use the SWI-Prolog Semantic Web Library to make a query into

  • 0

How can I use the SWI-Prolog Semantic Web Library to make a query into the OWL/RDF file and extract some information?

The OWL/RDF file is having information about all the Debian packages so I need to make the query in order to find package dependencies.

For Example:

The OWL file is structured as follows:

package: A

Depends:

package: B

pacakge: C

How can I load a OWL/RDF file into a Prolog script and what is the syntax to make a query within the Prolog script such that I put A as a parameter and the script outputs B and C?

  • 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-05-23T05:33:52+00:00Added an answer on May 23, 2026 at 5:33 am

    This is how you load the semweb library:

    ?- use_module(library(semweb/rdf_db)).
    

    This is how you parse an RDF/XML file and backtrack over all its subject-predicate-object triples:

    ?- rdf_load('file.owl'), rdf(X, Y, Z).
    % Parsed "file.owl" in 0.06 sec; 2,107 triples
    X = 'http://www.co-ode.org/ontologies/pizza/pizza.owl',
    Y = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
    Z = 'http://www.w3.org/2002/07/owl#Ontology' ;
    X = 'http://www.co-ode.org/ontologies/pizza/pizza.owl',
    Y = 'http://www.w3.org/2002/07/owl#versionInfo',
    Z = literal(type('http://www.w3.org/2001/XMLSchema#string', 'version 1.5')) ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can use FlashWindowEx to make a window flash in the taskbar, but what
You can use command lsof to get file descriptors for all running processes, but
I can use File('foo.bar').abspath to get the location of a file, but if I've
We can use standard C library routines in standalone micro-controller programming but we cant
We can use sqlite, nsuserdefaults or ordinary file system for saving gamedata on iPhone.
we can use both the method while passing parameters to sql query ? then
How can i map in swi-prolog true and false to 1's and 0's respectively?
I am looking for example uses (or tutorials) of the record library http://www.cs.fit.edu/~pkc/classes/ai/swi-prolog/Manual/record.html for
I can use Resources res=this.getResources(); arr1=res.getStringArray(R.array.one); to get the array and changed some of
I'm working on my homework for Prolog (SWI) but can't figure out how to

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.