图表最小化
graphmin的Python项目详细描述
- Source Code: http://github.com/wwaites/graphmin
- PyPI: http://pypi.python.org/pypi/graphmin
- Home Page: http://river.styx.org/ww/2010/10/graphmin
安装
对于推断,rdflib的一个特殊分支是 需要:
## don't install this stuff system-wide, use virtualenv virtualenv foo . ./foo/bin/activate ## install the prerequisites pip install pyparsing pip install -e svn+http://python-dlp.googlecode.com/svn/trunk/layercake-python#egg=rdflib pip install hg+https://fuxi.googlecode.com/hg/#egg=fuxi ## install this package from git git clone git://github.com/wwaites/graphmin.git cd graphmin python setup.py develop
示例
运行此示例:
graphmin -i examples/ex1.n3 -f n3 -r examples/rdfs-rules.n3
应给出此结果:
@prefix eg: <http://example.org/>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. eg:a a eg:A.
因为ex1.n3中的语句eg:a rdfs:resource由 rdfs推理规则。