#!/usr/bin/env python # infertest.py - Test of Pyrple # Author: Sean B. Palmer, inamidst.com # For Roland Hedberg, 2006-05-11 from pyrple import Triple, Graph from pyrple.namespaces import OWL, PYRPLE G = Graph(ntriples='<#father> %s <#dad> .' % OWL.equivalentProperty) L = Graph(ntriples='?p %s ?q .' % OWL.equivalentProperty) R = Graph(ntriples='?q %s ?p .' % OWL.equivalentProperty) G += Graph(triples=[Triple( L.serialize('literal'), PYRPLE.implies, R.serialize('literal') )]) G.think() print G.serialize() # [EOF]