Home>Projects>Semantic Web

Aims

To provide good support in Pike for use as a scripting language for Semantic Web applications. In particular, this includes good support for the RDF and OWL standards.

Status

May 2004: Pike 7.6, with support for basic RDF and OWL, has been released. All features of RDF and OWL are not yet supported, but there is enough to be usable.

Examples

Here is a tiny example of how to use the OWL support in Pike. The program reads an OWL file and lists all OWL classes that occurred in the file.
int main(int argc, array argv)
{
  object owlset = Web.OWL();
  string input = Stdio.read_file(argv[1]);
  owlset->parse_xml(input);

  write("Classes:\n");

  foreach(owlset->find_statements(0,
                                  owlset->rdf_type,
                                  owlset->owl_Class),
          array statement)
     write("- %O\n", statement[0]);

  return 0;
}


More examples can be found on the examples page.