This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This Python library helps generating a vector space from very large hierarchies encoded in RDF. An obvious example application is to generate a vector space from a SKOS hierarchy or an RDFS subclass hierarchy.

Getting started

Running the tests:

$ nosetests

Installing:

$ python setup.py install

Example use

$ wget http://downloads.dbpedia.org/3.7/en/skos_categories_en.nt.bz2 $ bunzip2 skos_categories_en.nt.bz2 $ python >>> from rdfsim.space import Space >>> space = Space(‘skos_categories_en.nt’) >>> space.similarity_uri(category1, category2)

Constructing a vector space for the entire DBpedia SKOS category hierarchy (3M triples) takes a couple of minutes on a commodity laptop, and has a memory footprint of about 500M.

Alternatively, a subset of it is available in the examples/ directory.

How it works

For each topic t in the hierarchy, we consider the set of its parents parents(t, k) at a level k. We construct a vector for each t in a space where each dimension corresponds to a topic d in the hierarchy. The value of t on dimension d is defined as follows:

t_d = sum_{k = 0}^{max_depth} sum_{d in parents(t, k)} decay^k

where max_depth and decay are two parameters, which can be used to influence how much importance we attach to ancestors that are high in the category hierarchy.

They can be specified as follows:

>>> Space.max_depth = 8
>>> Space.decay = 0.9

Licensing terms and authorship

See ‘COPYING’ and ‘AUTHORS’ files.

Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rdfsim-0.3.tar.gz (3.6 kB) Copy SHA256 Checksum SHA256 Source Jun 27, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting