私は OWL で書かれたオントロジーを持っています。Pythonにロードできることを知っている人はいますか? 任意のパッケージまたは手動でさえありますか? 他の質問で言及されているrdflibは、主にRDFに関係しているため、私には適していません。非常に優れたライブラリである「Seth」は機能しません。Webサイトがダウンしているように見える「Pellet」ライブラリが必要であり、 (seth) も JVM 1.4 でしか動作しません!
4083 次
5 に答える
2
commands.pyファイルのrdfAlchemy内には、まさにこの目的のために開始されたコマンド セクションがあります。しばらく使用していませんが、オントロジーから python skel を作成するなど、まさにあなたが尋ねたことの始まりです。
実際、それはパスタの「コマンド」を使用しています。rdfalchemy サブディレクトリに移動して次のように入力すると:
paster rdfSubject -h
君は見るべきだ:
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
于 2012-06-23T20:19:38.837 に答える
2
私はこれを完全には試していませんが、オントロジーをSesameデータベースにロードしてから、Python ラッパーを使用してクエリを実行することを検討してください。私はRDFAlchemyとpySesameで少し遊んだことがありますが、それらがどれほど優れているかはまだわかりません。一般的に、RDF/OWL データベースは私にとって非常に未熟であると感じているので、重大な技術的困難に遭遇することを期待してください。
于 2011-02-23T17:36:37.823 に答える
0
私はこのordfも見つけることができましたが、彼らはちょうど彼らのレベルのためにいくつかのテキストを書いたようです.それを使用する方法がまったく明確ではありません,それは残念です!
于 2011-02-25T11:55:42.280 に答える