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

1 / 47
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功