您好,欢迎访问三七文档
当前位置:首页 > 办公文档 > 其它办公文档 > Jena对本体推理的支持
Jena对本体推理的支持Jena2InferencesupportThissectionofthedocumentationdescribesthecurrentsupportforinferenceavailablewithinJena2.ItincludesanoutlineofthegeneralinferenceAPI,togetherwithdetailsofthespecificruleenginesandconfigurationsforRDFSandOWLinferencesuppliedwithJena2.NotallofthefinedetailsoftheAPIarecoveredhere:refertotheJena2JavadoctogetthefulldetailsofthecapabilitiesoftheAPI.Notethatthisisapreliminaryversionofthisdocument,someerrorsorinconsistenciesarepossible,andfeedbacktotheauthor(viathejena-devsupportlist)iswelcomed.Index1.Overviewofinferencesupport2.TheinferenceAPI3.TheRDFSreasoner4.TheOWLreasoner5.DAMLsupport6.Thetransitivereasoner7.Thegeneralpurposeruleengine8.Extendingtheinferencesupport9.FuturesOverviewofinferencesupportTheJena2inferencesubsystemisdesignedtoallowarangeofinferenceenginesorreasonerstobepluggedintoJena.SuchenginesareusedtoderiveadditionalRDFassertionswhichareentailedfromsomebaseRDFtogetherwithanyoptionalontologyinformationandtheaxiomsandrulesassociatedwiththereasoner.TheprimaryuseofthismechanismistosupporttheuseoflanguagessuchasRDFSandOWLwhichallowadditionalfactstobeinferredfrominstancedataandclassdescriptions.However,themachineryisdesignedtobequitegeneraland,inparticular,itincludesagenericruleenginethatcanbeusedformanyRDFprocessingortransformationtasks.Wewilltrytousetheterminferencetorefertotheabstractprocessofderivingadditionalinformationandthetermreasonertorefertoaspecificcodeobjectthatperformsthistask.Suchusageisarbitraryandifweslipintousingequivalenttermslikereasoningandinferenceenginepleaseforgiveus.Theoverallstructureoftheinferencemachineryisillustratedbelow.ApplicationsnormallyaccesstheinferencemachinerybyusingtheModelFactorytoassociateadatasetwithsomereasonertocreateanewModel.Queriestothecreatedmodelwillreturnnotonlythosestatementsthatwerepresentintheoriginaldatabutalsoadditionalstatementsthancanbederivedfromthedatausingtherulesorotherinferencemechanismsimplementedbythereasoner.AsillustratedtheinferencemachineryisactuallyimplementedattheleveloftheGraphSPI,sothatanyofthedifferentModelinterfacescanbeconstructedaroundaninferenceGraph.Inparticular,theOntologyAPIprovidesconvenientwaystolinkappropriatereasonersintotheOntModelsthatitconstructs.AspartofthegeneralRDFAPIwealsoprovideanInfModel,thisisanextensiontothenormalModelinterfacethatprovidesadditionalcontrolandaccesstoanunderlyinginferencegraph.ThereasonerAPIsupportsthenotionofspecializingareasonerbybindingittoasetofschemaorontologydatausingthebindSchemacall.Thespecializedreasonercanthenbeattachedtodifferentsetsofinstancedatausingbindcalls.Insituationswherethesameschemainformationistobeusedmultipletimeswithdifferentsetsofinstancedatathenthistechniqueallowsforsomereuseofinferencesacrossthedifferentusesoftheschema.InRDFthereisnostrongseparationbetweenschema(akaOntologyAKAtbox)dataandinstance(AKAabox)dataandsoanydata,whetherclassorinstancerelated,canbeincludedineitherthebindorbindSchemacalls-thenamesaresuggestiveratherthanrestrictive.TokeepthedesignasopenendedaspossibleJena2alsoincludesaReasonerRegistry.Thisisastaticclassthoughwhichthesetofreasonerscurrentlyavailablecanbeexamined.Itispossibletoregisternewreasonertypesandtodynamicallysearchforreasonersofagiventype.TheReasonerRegistryalsoprovidesconvenientaccesstoprebuiltinstancesofthemainsuppliedreasoners.AvailablereasonersIncludedintheJenadistributionareanumberofpredefinedreasoners:TransitivereasonerProvidessupportforstoringandtraversingclassandpropertylattices.Thisimplementsjustthetransitiveandreflexivepropertiesofrdfs:subPropertyOfandrdfs:subClassOf.RDFSrulereasonerImplementsaconfigurablesubsetoftheRDFSentailments.OWL,OWLMini,OWLMicroReasonersAsetofusefulbutincompleteimplementationoftheOWL/LitesubsetoftheOWL/Fulllanguage.DAMLmicroreasonerUsedinternallytoenablethelegacyDAMLAPItoprovideminimal(RDFSscale)inferencing.GenericrulereasonerArulebasedreasonerthatsupportsuserdefinedrules.Forwardchaining,tabledbackwardchainingandhybridexecutionstrategiesaresupported.[index]TheInferenceAPI1.GenericreasonerAPI2.Smallexamples3.Operationsoninferencemodels-Validation-Extendedliststatements-Directandindirectrelations-Derivations-Accessingrawdataanddeductions-Processingcontrol-TracingGenericreasonerAPIFindingareasonerForeachtypeofreasonerthereisafactoryclass(whichconformstotheinterfaceReasonerFactory)aninstanceofwhichcanbeusedtocreateinstancesoftheassociatedReasoner.ThefactoryinstancescanbelocatedbygoingdirectlytoaknownfactoryclassandusingthestatictheInstance()methodorbyretrievalfromaglobalReasonerRegistrywhichstoresfactoryinstancesindexedbyURIassignedtothereasoner.Inaddition,thereareconveniencemethodsontheReasonerRegistryforlocatingaprebuiltinstanceofeachofthemainreasoners(getTransitiveReasoner,getRDFSReasoner,getRDFSSimpleReasoner,getOWLReasoner,getOWLMiniReasoner,getOWLMicroReasoner).Notethatthefactoryobjectsforconstructingreasonersarejusttheretosimplifythedesignandextensionoftheregistryservice.Onceyouhaveareasonerinstance,thesameinstancecanreusedmultipletimesbybindingittodifferentdatasets,without
本文标题:Jena对本体推理的支持
链接地址:https://www.777doc.com/doc-5734904 .html