Swoogle Home



Login Form

Lost Password?
No account yet? Register

BSQ Sitestats Summary

Site Stats Summary
  Hits Visitors
Today 46626 1
Week 463241 1

Swoogle Manual

How to Search Semantic Web Documents/Ontologies

Swoogle lets user-agents search for Semantic Web Documents, especially Semantic Web Ontologies. There are two relevant queryType available:

  • ontology: search a small collection which consists of only Semantic Web Ontologies, i.e. semantic web documents which have defined at least one class or property.
  • document: search all Semantic Web Documents . The search space is much larger (more than 10 times).

Composing a search string

By default, Swoogle allow users to specify an arbitrary search string to find relevant semantic web documents. In stead of build a full-text index, Swoogle parses a semantic web document and only indexes the part contributing most of the semantics of the document, i.e., the document's URL, the terms being used and/or being defined by the document, explicit description about the the document, and the namespaces used by the document.

food search documents which are relevant to "food"

Advanced Search using field constraints

Swoogle also allow user agents to specify finer constraints over the following fields of a semantic web document D:

  • BASIC Metadata
  • url: the URL of D
  • desc: the description of D, usually obtained from annotations of D (i.e. triples having D's URL as subject and having literal object)
  • def: local names of classes and properties explictly defined in D
  • ref: local names of classes and properties deduced by domain and range definition of RDF/RDFS and OWL predicates occurring in D
  • pop: local names of classes used to create instances in D and properties used as predicates in D
  • ns: the namespaces used by D as prefixes

  • DOCUMENT Metadata
  • hasEncoding:  the charset used to encode the document, e.g. "utf-8", "ISO", "GB2312", "SHIFT_JIS".
  • hasLength:  the size of document in bytes
  • hasMd5sum:  the md5 sum of the document
  • hasFiletype:  the filetype parsed from the document URL,   e.g. "owl", "rdf"
  • hasDateLastmodified:  the date on which the document got modified
  • hasDateCache:  the date on which the latest version of the document found by Swoogle

  • RDF Metadata
  • hasGrammar: the RDF grammar of D, its value could be: (i) rx - RDF/XML;  (ii) n3 - notation 3,  and (iii) nt - NTriples
  • hasCntTriple:  the number of triples
  • hasOntoRatio:  the percent of triples contributing to definition
  • hasCntSwtDef:  the number of classes and properties defined in D
  • hasCntInstance:  the number of instances defined in D

Users can search a term by typing the field name followed by a colon ":" and then the term you are looking for. If the field name is omitted, the term is searched on all fields by default. The term is case-insensitive and has the follwoing syntax:

  • Single Term: a single word such as "person" or "food". For example, def:person
  • Phrase: a group of words surrounded by double quotes such as "hello world". For example, desc:"hello world". Note that the order of words in the phrase is respected.
  • Range Searches: Range Queries allow one to match documents whose field(s) values are between the lower and upper bound specified by the Range Query. For example, hasDateLastmodified:[2007-07-08 TO 2007-07-10]
  • Wildcard Searches: To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol. For example, hasEncoding:SHIFT*
  • Boolean Operators: Boolean operators allow terms to be combined through logic operators. Supportted operators are AND, OR, and NOT (Note: Boolean operators must be ALL CAPS). The AND operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the AND operator is used.

Examples are shown below to explain how to compose a search string.

url:foaf search documents having "foaf" as part of their URLs
url:"http://www.w3.org/2000/01/rdf-schema" search a particular SWD with the URL "http://www.w3.org/2000/01/rdf-schema"
desc:timbl search documents having "timbl" in their document annotations
def:food search documents explicitly defining the term(classes/properties) that include a token "food". Note that the term food is case-insensitive.
ref:food search documents implicitly defining the term(classes/properties) that include a token "food". That is, the term being a class/property is deduced by the domain and range definition of RDF/RDFS and OWL predicates. Note that in the results returned by Swoogle search, only the fields 'desc' and 'def' are highlighted, the field 'ref' and 'pop' are neglected for a neat output.
pop:person search documents that populate the class with a token of 'person' with instances OR use the property with a token of 'person' as predicates
pop:knows search documents that populate the class with a token of 'knows' with instances OR use the property with a token of 'knows' as predicates
ns:"http://xmlns.com/foaf/0.1/" search documents using a namespace prefix "http://xmlns.com/foaf/0.1/"
hasEncoding:shift* search documents encoding with Japanese charset. Note that wildcard search is applied here.
hasLength:[100 TO 500] search documents with a length range of 100 bytes to 500 bytes.
hasFiletype:owl search documents whose URLs have a suffix of 'owl' .
hasDateLastmodified:[2007-07-08 TO 2007-07-11] search documents which are modified between the date Jul 9th, 2007 and the date Jul 11th, 2007.
hasDateCache:2007-07-08 search documents which are found by Swoogle on Jul 8th 2007 of having been modified, compared with Swoogle archives.
hasGrammar:N3 search documents with a syntax of N3.
hasCntSwtDef:[500 TO 2000000] search documents which have at least defined 500 classes/properties.
food  web search documents relevant to "food' and "web". By default, two search terms are connected with AND  boolean operator.
food OR web search documents relevant to either "food' or "web". OR must be written in all capitalized. 
food NOT web search documents relevant to "food" but not to "web".
def:food def:web hasDateLastmodified:[2007-01-01 TO 2100-01-01] search documents which have defined both the term with a token of 'food' and the term with a token of 'web', and got modifed after Jan 1 2007. An abbreviation of the search string can be def:(+food +web) hasDateLastmodified:[2007-01-01 TO 2100-01-01]

Advanced Search using Lucene features

This search service is powered by Lucene, so the user-agents can also directly use Lucene query syntaxes.

manual  o   news  o   faq  o   web-service  o   submit-url  o   sw-archive  o   feedback  o   swoogle2005

Swoogle © 2004-2007, ebiquity group at UMBC
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.