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 this maven plugin maven-jaxb-plugin to generate Java Classes from XSD file.
We can use solr range query like: http://localhost:8983/solr/select?q=queryStr&fq=x:[10 TO 100] AND y:[20 TO 300]
Why this predicate random_permutation doesn't work? http://www.swi-prolog.org/pldoc/doc_for?object=random_permutation/2 ?- use_module(library(random)). % library(pairs) compiled into pairs
I'm working on my homework for Prolog (SWI) but can't figure out how to
Can i use php to convert video file to .flv or .swf file ...
I can use the Network tab in the Google Chrome Web Inspector to debug
I can use -d option to put files into a database. mongofiles -d test
I can use GD or something to draw user-selected shapes by writing some lines
I can use the below to get the query string. var query_string = request.query;
I can use File('foo.bar').abspath to get the location of a file, but if I've

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.