您正在打开RDF文件,而不是本体。在<?xml version="1.0"?>
xml:base="http://example.com/ontology"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
[ {"@id" : "http://example.com/ontology",
"@type" : [ "http://www.w3.org/2002/07/owl#Ontology" ]
}, {
"@id" : "http://example.com/ontology#Person",
"@type" : [ "http://www.w3.org/2002/07/owl#Class" ]
}, {
"@id" : "http://example.com/ontology#Woman",
"@type" : [ "http://www.w3.org/2002/07/owl#Class" ],
"http://www.w3.org/2000/01/rdf-schema#subClassOf" : [ {
"@id" : "http://example.com/ontology#Person"
} ]
} ]
用文本编辑器打开文件,查看文件内容类似的内容,然后选择合适的选项。可以使用this online service将RDF文件从一种序列化格式转换为另一种序列化格式。在
RDF(抽象)语法并不是OWL本体论的唯一语法。其他的很少:<?xml version="1.0"?>
xml:base="http://example.com/ontology"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
ontologyIRI="http://example.com/ontology">
Prefix(:=)Prefix(owl:=)
Prefix(rdf:=)
Prefix(xml:=)
Prefix(xsd:=)
Prefix(rdfs:=)
Ontology(
Declaration(Class(:Person))
Declaration(Class(:Woman))
SubClassOf(:Woman :Person)
)Prefix: :
Prefix: owl:
Prefix: rdf:
Prefix: rdfs:
Prefix: xml:
Prefix: xsd:
Ontology:
Class: Person
Class: Woman
SubClassOf:
Person
不过,我们不能使用RDFlib解析这些格式的文件。
您可以使用this online service在这些格式(和RDF格式)之间转换OWL文件。在