Usage: /home/phil/venv/some_path/bin/paster rdfSubject [options]
paster rdfalchemy.commands
Create an rdfSubject subclass with descriptors from an RDF Schema
will set the rdf_type
Descriptors will be created
1. rdfs:domain and rdfs:range are respected
2. rdfSingle is used for properties that are
* owl:InverseFunctionalProperty
* owl:FunctionalProperty
3. rdfList or rdfContainer is used if the proper range is set
4. rdfMultiple is used for all others
The resulting .py file is ment to be a skeleton for the developers confvience.
Do not expect to be able to use the raw results.
Create an rdfSubject subclass with descriptors from an RDF Schema
Options:
-h, --help show this help message and exit
-v, --verbose
-n, --simulate
-s SCHEMA, --schema=SCHEMA
file name or url of rdfSchema for this class
-o FOUT, --fout=FOUT output file name default: stdout (e.g.
../MyRdfModel.py)
-l, --list list valid instances of `owl:Class` in the schema file
我还没有完全尝试过,但是您可以将您的本体加载到Sesame数据库中,然后使用Python包装器查询它。我玩过RDFAlchemy和{a3}一点,但我还是不知道它们有多好。一般来说,RDF/OWL数据库对我来说非常不成熟,因此预计会遇到一些重大的技术问题。在
在commands.py文件的rdfAlchemy中,有一个命令部分正是为此目的而启动的。已经有一段时间没有使用它了,但它正是您所要求的开始,即从本体创建pythonskel。在
事实上,它使用粘贴“命令”。如果转到rdfalchemy子目录并键入:
paster rdfSubject -h
你应该看到:
是的,RDFLib在RDF语义中工作,因此您需要一个用于管理OWL语义的工具箱。在
我通常首先使用另一个工具来获取所有的三元组(OWLAPI或{a2}),然后将其加载到RDFLib中。在
相关问题 更多 >
编程相关推荐